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

    OpenVPN only recognizes the first of two DNS servers

    Scheduled Pinned Locked Moved OpenVPN
    5 Posts 4 Posters 889 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.
    • F
      ffarkas
      last edited by ffarkas

      Hi everyone,
      I have a pfSense with a configured OpenVPN server. I have entered two DNS servers in the configuration. The first (192.168.3.8) is from the domain controller and the second (192.168.3.1) is pfSense.
      0_1547813588358_DNS_config_pfsense.PNG
      I already tried to fix the problem with the settings "Block Outside DNS" and "Force DNS cache update", unfortunately this did not help.

      My clients are Windows 10 and OpenVPN GUI. When I connect to pfSense, however, only the first DNS server configured in pfSense is used by Windows. The second one is ignored. I can only reach the first DNS server via nslookup and ping.

      How can I fix that both DNS servers are used?

      pfSense version: 2.4.4-RELEASE-p2
      OpenVPN GUI version: 11.10.0.0

      Thank you very much for your help
      ffarkas

      K 1 Reply Last reply Reply Quote 0
      • K
        Konstanti @ffarkas
        last edited by Konstanti

        @ffarkas said in OpenVPN only recognizes the first of two DNS servers:

        192.168.3.1

        Hey
        As far as I understand, two DNS servers , it is the main and spare. If the first is not available, then there is an appeal to the second , third,....
        To be able to use two DNS servers, you need to configure 192.168.3.8 so that when the DNS query is not for a domain, it would refer to 192.168.3.1. Then the client will use two DNS servers

        Therefore, internal requests will handle 192.168.3.8 , and external requests will be forwarded to 192.168.3.1
        And it will be enough for the client to specify only one server in the settings 192.168.3.8

        1 Reply Last reply Reply Quote 0
        • F
          ffarkas
          last edited by

          Hello @Konstanti,
          I actually intended both DNS servers to resolve in the same zone (testdomain.local). The Microsoft DNS server should take over all Active Directory integrated devices and the pfSense all others as well as the external ones. So I thought if I specified both in OpenVPN, the Windows clients would automatically search on the other DNS server when a name cannot be resolved.

          I will probably have to rethink the entire network structure.

          Thank you

          1 Reply Last reply Reply Quote 0
          • DerelictD
            Derelict LAYER 8 Netgate
            last edited by

            All DNS servers configured on a client need to resolve the same answers for the same queries.

            Your solution is likely two AD DNS servers if you want redundancy (and you should).

            Chattanooga, Tennessee, USA
            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
            Do Not Chat For Help! NO_WAN_EGRESS(TM)

            1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator
              last edited by johnpoz

              @ffarkas said in OpenVPN only recognizes the first of two DNS servers:

              Windows clients would automatically search on the other DNS server when a name cannot be resolved

              One of the most common misconceptions to how dns works at a basic level.

              As stated by Derelict all NS pointed to by a client need to be able to resolve the the same stuff the same way or your going to have a bad day.

              If a NS returns NX for something that is asked for - then the client stops asking.. Because it was told that doesn't exist, so why should it go ask anything else for something that doesn't exist. The only time a client will go ask the other NS is if there is a time out.. And you can never be sure which NS a client will be asking out of the NS listed..

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

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