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

    Windows Server DNS Server can't forward to pfSense

    Scheduled Pinned Locked Moved DHCP and DNS
    52 Posts 3 Posters 10.1k 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.
    • H
      Hekmil
      last edited by

      Hi,

      I have a lab which contain a pfSense behind a VMware NAT and 4 LANs. In one of my LAN I have a Windows Server 2016 (DC and DNS Server) and all my machines have this WS2016 as primary DNS (172.16.1.5).

      On the WS2016 I have set the primary DNS to the loopback address (127.0.0.1). In its DNS server parameters I have set the forward address to my pfSense IP (LAN or WAN interface does it matter ?) which has set my NAT gateway (192.168.101.2) as DNS Server.

      • pfSense LAN Interface : 172.16.1.2
      • pfSense WAN Interface : 192.168.101.40

      My pfSense can resolve hostname but my Windows Server cannot, nslookup fails everytime whereas the traffic is allowed and seen in the logs.

      I truly don't know when I misconfigured something here.

      N 1 Reply Last reply Reply Quote 0
      • N
        netblues @Hekmil
        last edited by

        @Hekmil Always lan interface of pf should be used

        1 Reply Last reply Reply Quote 0
        • H
          Hekmil
          last edited by

          Alright then the issue doesn't come from this, it was already the case.

          N 1 Reply Last reply Reply Quote 0
          • N
            netblues @Hekmil
            last edited by

            @Hekmil Lan rules allowing port 53 tcp and udp?

            H 1 Reply Last reply Reply Quote 0
            • H
              Hekmil @netblues
              last edited by

              @netblues At first only udp but to find the issue and test I allow all traffic from my Windows Server to ANY

              N 1 Reply Last reply Reply Quote 0
              • N
                netblues @Hekmil
                last edited by

                @Hekmil You need tcp for nslookup.
                try nslookup from windows.
                server ip.of.pfsense.lan
                cnn.com

                H 1 Reply Last reply Reply Quote 0
                • H
                  Hekmil @netblues
                  last edited by

                  @netblues Yeah everything is allowed at the moment so it's fine

                  1f1ddd0a-6270-405a-b6d6-ce5a8e73dc06-image.png

                  N 1 Reply Last reply Reply Quote 0
                  • N
                    netblues @Hekmil
                    last edited by

                    @Hekmil Is dns resolver service running on pf? is it listening on lan interface?

                    H 1 Reply Last reply Reply Quote 0
                    • H
                      Hekmil @netblues
                      last edited by Hekmil

                      @netblues yes it's running, I can resolve any domain from the pfSense.

                      The configuration is the default one, listening on all interfaces.

                      It's like the Windows machine can't forward the DNS request to the pfSense.

                      N 1 Reply Last reply Reply Quote 0
                      • N
                        netblues @Hekmil
                        last edited by

                        @Hekmil No. You run nslookup
                        What is the lan ip of pf sense?
                        Try running nslookup from pf cli
                        pf sense it self can resolve without a local resolver if configured to use wan connection dns for example.

                        H 1 Reply Last reply Reply Quote 0
                        • H
                          Hekmil @netblues
                          last edited by

                          @netblues Yes I was talking about running a nslookup from the pfSense CLI, sorry if it wasn't clear. From the CLI it manage to resolve.

                          My LAN ip of my pfSense is 172.16.1.2

                          Yes the pfSense does use the WAN connection when resolving

                          N 1 Reply Last reply Reply Quote 0
                          • N
                            netblues @Hekmil
                            last edited by

                            @Hekmil not much left to do.
                            can you ping pfsense lan from windows server?

                            H 1 Reply Last reply Reply Quote 0
                            • H
                              Hekmil @netblues
                              last edited by Hekmil

                              @netblues Yeah that's why i'm asking here, because I'm out of option

                              Yes all my machines can ping together. But only pfSense can ping outside the NAT (for example 8.8.8.8).

                              799e6859-8721-4192-8c02-61dd9471d053-image.png
                              Here is a tracert command to 8.8.8.8 which timeout after reaching pfSense LAN interface. The firewall log : 494a5509-7e94-488f-96de-064c6aee3a2b-image.png

                              N 1 Reply Last reply Reply Quote 0
                              • N
                                netblues @Hekmil
                                last edited by

                                And you cant nslookup from everywhere else with pfsense lan ip but you can from pfsense cli using lan ip.
                                Anything on floating rules?

                                H 1 Reply Last reply Reply Quote 0
                                • H
                                  Hekmil @netblues
                                  last edited by Hekmil

                                  @netblues Wait I was only trying to do nslookup cnn.com on the cli not using lan IP. If I do that it doesn't work of course sorry. It's like the resolving DNS service was not enabled for all interfaces except it is.

                                  Floating rules are empty.

                                  N 1 Reply Last reply Reply Quote 0
                                  • N
                                    netblues @Hekmil
                                    last edited by

                                    @Hekmil please post services resolver settings.
                                    Have you tried restarting resolver service?

                                    H 1 Reply Last reply Reply Quote 0
                                    • H
                                      Hekmil @netblues
                                      last edited by Hekmil

                                      @netblues Here are my setting of my resolver :
                                      548011a5-9ff7-441a-a1a6-d7d114e92209-image.png
                                      b5f626b7-0800-4cac-a0ee-ecc16ad1d66c-image.png

                                      8790a151-06e7-4743-be59-cc5f2e009758-image.png
                                      192.168.101.2 = NAT Gateway

                                      Yes the service and even the machine has been restarted trying fixing the issue

                                      N 1 Reply Last reply Reply Quote 0
                                      • N
                                        netblues @Hekmil
                                        last edited by

                                        @Hekmil you dont really need any dns servers if pf can reach the internet..
                                        However this is irrelevant.
                                        Dns resolver should be listening on lan anyway.
                                        Do restart the srrvice and look at status system logs resolver logs for anything strange.

                                        H 1 Reply Last reply Reply Quote 0
                                        • H
                                          Hekmil @netblues
                                          last edited by

                                          @netblues True that

                                          Nothing really usefull from the logs :
                                          7c03c5f9-c237-44cb-97c4-e613b2a307cd-image.png

                                          N 1 Reply Last reply Reply Quote 0
                                          • N
                                            netblues @Hekmil
                                            last edited by

                                            @Hekmil output of sockstat -l please

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