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

    openvpn client cannot resolve pfsense dns entries

    Scheduled Pinned Locked Moved DHCP and DNS
    6 Posts 2 Posters 468 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.
    • L
      lassesj
      last edited by

      Hi,

      I have a simple network setup: 5 windows servers and a server with pfsense DHCP, pfsense DNS and pfsense OpenVPN running. All windows servers on the LAN can resolve all other windows server names.

      Then I have 30 VPN clients (windows) and none can resolve any server name. Why?

      The following resolves when run from a computer on the LAN, but does not resolve when through a vpn client:

      nslookup fileserver 10.44.0.3

      In both cases nslookup connects to the dns server (10.44.0.3)

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

        @lassesj said in openvpn client cannot resolve pfsense dns entries:

        Then I have 30 VPN clients (windows) and none can resolve any server name. Why?

        A possible answer :
        Even when you force the client to use the "DNS proposed by the VPN connection" with an option like this :

        7dfc934f-b176-4e18-885a-6efb74d3b01b-image.png

        and this :

        fa4c6656-3d10-4d71-bf8d-e05946bb4477-image.png

        people (your OpenVPN clients) can have, for example, browsers on their devices that don't respect that, and go DoH or 8.8.8.8 for their DNS requests.

        And needles to say : any DoH DNS server, or 8.8.8.8, or anybody else, won't know anything about your local (on OpenVPN server) host names.

        @lassesj said in openvpn client cannot resolve pfsense dns entries:

        In both cases nslookup connects to the dns server (10.44.0.3)

        nslookup, a OS command, will respect the connection's registered DNS.

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

        1 Reply Last reply Reply Quote 0
        • L
          lassesj
          last edited by

          I am not an DNS expert, so bare with me. Can you explain why this happens:

          When connecting directly to the dns server over vpn, I cannot resolve name
          When connecting directly to the dns server from the lan, I can resolve name

          connecting directly means logging in to dns server via nslookup and then ask to resolve e.g.:

          nslookup - 10.44.0.3
          

          and then type

          fileserver
          

          I don't understand why the connection registered dns has something to do with the lookup if I connect directly to the dns server.

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

            @lassesj said in openvpn client cannot resolve pfsense dns entries:

            When connecting directly to the dns server over vpn, I cannot resolve name

            Who is the server that you want to reach over VPN ?

            Can you go to the place where this DNS server is, and check with the extended query logs, or packet capture, if this DNS server actually received your query ? (did the request arrive ?)

            @lassesj said in openvpn client cannot resolve pfsense dns entries:

            fileserver

            "fileserver" ?
            If you were using 8.8.8.8 : it doesn't' know nothing about your local resources. It knows only about publicly available host names.

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

            L 1 Reply Last reply Reply Quote 0
            • L
              lassesj @Gertjan
              last edited by

              @Gertjan: Thanks for the reply. I started to look at the logs and now I know what is wrong! I do connect to the DNS server both over VPN and from LAN. However, when I query from my LAN it adds my DNS suffix to the query, e.g. fileserver > fileserver.home.arpo. When I do it over VPN, it does not add any suffix.

              I have an idea on how to solve this...
              As I read from the docs, it is a requirement to have a domain in general setup, and this is used as a DNS suffix when querying from LAN. How can I configure the VPN clients to have the same dns suffix?

              Or is there anther, better way to do this?

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

                @lassesj said in openvpn client cannot resolve pfsense dns entries:

                I have an idea on how to solve this.

                Use your keyboard ?
                Normally, you should not be able to use a host name like 'file-server' to reach this device, even it's on your own LAN.
                The correct way is : fileserver.yournetwork.tld which is the full device location.

                Like this :

                C:\Users\Gauche>ping -4 dvr.bhf.tld
                
                Envoi d’une requête 'ping' sur dvr.bhf.tld [192.168.1.8] avec 32 octets de données :
                Réponse de 192.168.1.8 : octets=32 temps=9 ms TTL=64
                Réponse de 192.168.1.8 : octets=32 temps=2 ms TTL=64
                Réponse de 192.168.1.8 : octets=32 temps=3 ms TTL=64
                Réponse de 192.168.1.8 : octets=32 temps=4 ms TTL=64
                

                True, Windows spoiled us a bit by adding a local network domain to the host name.

                So, start being less lazy ^^, and always use the fill host name with domain name and your done ^^

                @lassesj said in openvpn client cannot resolve pfsense dns entries:

                Or is there anther, better way to do this?

                You mean :

                2284e0f5-7703-44c1-9e0d-a927ce5da562-image.png

                ? 😊

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

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