Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Integrate Local DNS Server for Local and remote Open VPN clients

    Scheduled Pinned Locked Moved DHCP and DNS
    5 Posts 2 Posters 541 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Bambos
      last edited by

      Hello everyone,

      I have implemented a local DNS server using dnsmasq on Debian VM. This dns server is forwarding to local IP's succesfully.

      What is the proper method of integrate this into pfSense configuration for local users ? Do i have to set it in General Settings, or in DHCP Server settings, or something else ?

      Last, we have a VPN Server configured using Open VPN, and we need to have dns queries over VPN also. How this configuration can be implemented ?

      Thanks for any guidance and comments !

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @Bambos
        last edited by

        @bambos said in Integrate Local DNS Server for Local and remote Open VPN clients:

        I have implemented a local DNS server using dnsmasq on Debian VM. This dns server is forwarding to local IP's succesfully.
        What is the proper method of integrate this into pfSense configuration for local users ?

        DNS is not related to the concept of "users". More like "IP addresses" and networks.

        @bambos said in Integrate Local DNS Server for Local and remote Open VPN clients:

        or something else ?

        Do know what you are doing, and why.
        Why is the default resolver DNS set up not good for you ?

        @bambos said in Integrate Local DNS Server for Local and remote Open VPN clients:

        we have a VPN Server configured using Open VPN, and we need to have dns queries over VPN also. How this configuration can be implemented ?

        Bt adding the OpenVPN server interface into this list :

        affe987b-4590-4f1d-b6c8-f69bccae3bf6-image.png

        so dnsmasq listens also on that interface for DNS requests.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        B 1 Reply Last reply Reply Quote 0
        • B
          Bambos @Gertjan
          last edited by

          @gertjan Hello Sir,

          with "users" meant the local network 192.168.6.0/24 and also the Open VPN Remote Access network 172.16.6.0/24.

          The dnsmasq server is setup locally, on 192.168.6.2
          to make this work, i have enabled the dns forwarder on pfsense, with domain override:
          47683521-fca3-4efc-9a01-9143e433db02-image.png

          so for whatever host on the local domain, the dns server on 192.168.6.2 is able to return the IP succesfully.
          In case DNS forwarder is enabled, DNS resolver can not be enabled at the same time.

          This is just to explain that most probably, i know what i'm doing.

          I have checked the screenshot of you, but something is not right, the interface OpenVPN (for remote users) that exists under firewall, does not exists on the DNS interfaces menu.

          So coming back to my question, how to configure the OpenVPN remote users network, to have also DNS functionality from the local DNS server ?

          GertjanG 1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan @Bambos
            last edited by

            @bambos said in Integrate Local DNS Server for Local and remote Open VPN clients:

            I have checked the screenshot of you, but something is not right, the interface OpenVPN (for remote users) that exists under firewall, does not exists on the DNS interfaces menu

            Go to Interfaces > Interface Assignments, after the "Available network ports: ", then pull down the interface list, select what is probably named "ovpns1" (from OpenVPN Server 1).
            and then Add a new interface (green button).

            Then rename it to something more useful : I've chosen OPENVPN (that wasn't the smartest choice) :

            26bab33a-f274-44d4-8f78-c6435a645ec1-image.png

            Now you have a new interface.
            Populate it with firewall rules as empty == block all.
            This newly created interface can be used by unbound, the forwarder, etc.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            B 1 Reply Last reply Reply Quote 0
            • B
              Bambos @Gertjan
              last edited by

              @gertjan Thank you my friend.

              with openvpn remote access tunnels, I'm using the default "OpenVPN" ta for firewall rules, so i don't have to assign interfaces for each remote access tunnel.
              I have to assign interfaces for site to site only.

              I get the DNS working for remote clients by pushing a DNS server the IP of pfsense. Assuming that the firewall can perform the forwarding succesfully, remote users have a routing to LAN, but not DNS or internet gateway. (We have used VPN only for remote access to servers).

              So under advanced client settings in Open VPN Server configuration, i just push a DNS server, the pfsense address, like below:

              b8472410-f012-4133-a21e-54860390c989-image.png

              Simple thing but i didn't knew that , because i never needed that until today.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.