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

    Internal DNS Not Working

    DHCP and DNS
    dns resolver forwarder localhost wan
    4
    51
    13.5k
    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.
    • A
      aiden21c
      last edited by aiden21c

      I am struggling to get my DNS resolver to work. I just want to get my DNS up and running in the simplest way possible. Ive tried as many configurations as I can think of and nothing seems to work.
      It is a very unique case, where the pfSense itself is unable to 'ping' hostnames, but any clients set with the pfSense as it's DNS are able to ping hostnames. This means that my pfsense is unable to check for updates and access the package manager. I have set up my DNS as follows:
      1.png
      2.png
      3.png

      As is shown in the below testing, I am in fact able to successully complete DNS lookups using the lookup tool, however I am unable to ping the hostname from the LAN interface (or any interface for that matter).
      4.png
      5.png
      Running a traceroute from my own laptop, which is using the pfSense for both DNS and as a gateway, shows that i can in fact reach hostnames from client devices. I'm just very confused why this doesn't translate the same to the pfSense itself.
      6.png

      S NightlySharkN 3 Replies Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @aiden21c
        last edited by

        @aiden21c If forwarding, uncheck DNSSEC. It caused problems for me and apparently several others in 23.01.

        https://support.quad9.net/hc/en-us/articles/4433380601229-Setup-pfSense-and-DNS-over-TLS
        “Disable Enable DNSSEC Support if enabled.
        DNSSEC is already enforced by Quad9, and enabling DNSSEC at the forwarder level can cause false DNSSEC failures.”

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote 👍 helpful posts!

        A 1 Reply Last reply Reply Quote 0
        • A
          aiden21c @SteveITS
          last edited by

          @steveits this hasn't resolved the issue for me as I tried both with and without this setting enabled. I think this setting would mainly effect clients, which isn't the case with me as the clients are successfully resolving for me

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

            @aiden21c

            Show your LAN firewall rules please.

            You've shown a Diagnostic > DNS Lookup, and a Diagnostics > Ping

            The DNS Lookup did return an IPv4, 31.13.78.35.
            The PING did show that it uses the correct IP :

            1ebe6f9a-fa2f-451d-adc7-e29fda4a186f-image.png

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

            A 1 Reply Last reply Reply Quote 0
            • A
              aiden21c @Gertjan
              last edited by

              @gertjan thank you very much. I had a feeling it is more than likely a firewall issue.

              I apologise I am not near my pfSense ATM but I will do my best to remember the few firewall rules I have set on the LAN side.

              • The default http/s anti lockout rule
              • A rule that forwards any traffic for destination 192.168.6.0 network to WAN1 interface
              • A rule that forwards any traffic to 10.128.32.0 network to WAN1 interface
              • A rule that forwards all and any other Lan traffic to the WAN2 interface
              • Default http pass rule
              • Default https pass rule
              • Default pfsense DNS rule
                I have already tried moving the default DNS rule above the Lan->WAN2 rule but this had no success.
                These rules are in about the other I remember them being in. Sorry for the lack of info I should have taken a photo before. I can send more details in the morning.
              GertjanG 1 Reply Last reply Reply Quote 0
              • GertjanG
                Gertjan @aiden21c
                last edited by

                @aiden21c said in Internal DNS Not Working:

                The default http/s anti lockout rule
                A rule that forwards any traffic for destination 192.168.6.0 network to WAN1 interface
                A rule that forwards any traffic to 10.128.32.0 network to WAN1 interface
                A rule that forwards all and any other Lan traffic to the WAN2 interface
                Default http pass rule
                Default https pass rule
                Default pfsense DNS rule

                Check if there is a rule that passes ICMP (that is not TCP, neither UDP).
                If there is none, then that explains why you can't "ping" (ping uses the ICMP protocol) from LAN.

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

                A 1 Reply Last reply Reply Quote 0
                • A
                  aiden21c @Gertjan
                  last edited by

                  @gertjan At this stage, I don't believe there is any rule incorporating ICMP (outside of the allow all traffic rule using WAN2 gateway). This rule has no restriction set on the type of traffic it passes.
                  Also the lack of and icmp rule doesn't explain why pfsense is unable to reach the update servers or the package servers, as the traffic that it would be sending to and from these servers would likely not be ICMP traffic.

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

                    @aiden21c said in Internal DNS Not Working:

                    At this stage, I don't believe there is any rule incorporating ICMP

                    Rules like these on LAN

                    79635576-d759-4604-a266-a4aab717c361-image.png

                    will do the job.

                    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
                    • NightlySharkN
                      NightlyShark @aiden21c
                      last edited by

                      @aiden21c
                      Hi! What you are seeing may be the expected behavior, because:
                      This here is not what DNS servers PfSense uses per WAN connection, but rather (as per your choice to use local DNS first):

                      • First try localhost (self) DNS
                      • If not working, try 1.1.1.1 and send all queries from opt1
                      • If not working, try 1.0.0.1 and send all queries from wan
                        bf33849f-ac65-4c99-bfe4-c0eb59132558-image.png
                        b4f70402-8731-4a43-a4ec-6a1dd951905a-image.png
                        Next, you specified in Unbound (forwarding mode), that all queries should be sent from WAN2. Unbound then grabs the first DNS from above (1.1.1.1), sends queries through WAN, but expects answers from WAN2, answers that never come (on that interface).
                        5c88f8c6-c781-4fc1-8414-daaf6e1c3250-image.png
                        You should either set the DNS interface to "None" in general setup, or create another 2 entries for the WAN interface.
                        And, in any event, 1.1.1.1 cannot receive queries from the Office interface, it should be either WAN or WAN2 (or, if you want my advice, none).

                      If you want to see what DNS is used in each query (to confirm what is happening) see dig and nslookup (for Windows clients).

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        aiden21c @NightlyShark
                        last edited by aiden21c

                        @nightlyshark I have done the following to no avail. I have also hard restarted the pfsense to see if that helps but it did not. By setting "none" in general setup it actually meant that even the clients weren't able to resolve any host names until I changed this back.
                        7.png
                        8.png

                        NightlySharkN 4 Replies Last reply Reply Quote 0
                        • NightlySharkN
                          NightlyShark @aiden21c
                          last edited by NightlyShark

                          @aiden21c
                          Please follow all instructions.
                          Set Unbound to recursive mode (disable forwarding mode).
                          After that, make sure that you have no DNS servers in DHCP Server and in DHCP-v6-RA

                          1 Reply Last reply Reply Quote 0
                          • NightlySharkN
                            NightlyShark @aiden21c
                            last edited by

                            @aiden21c 71c705ca-117c-4493-9974-25a737b5a112-image.png

                            1 Reply Last reply Reply Quote 0
                            • NightlySharkN
                              NightlyShark @aiden21c
                              last edited by

                              @aiden21c c1446dbf-d8ea-4246-8d38-adbd7a1bdf66-image.png

                              1 Reply Last reply Reply Quote 0
                              • NightlySharkN
                                NightlyShark @aiden21c
                                last edited by

                                @aiden21c You should also enable DoT in Unbound. You will need a rule for port 853.
                                bfe4d76b-198f-4fab-b15f-069916bb2867-image.png

                                1 Reply Last reply Reply Quote 0
                                • NightlySharkN
                                  NightlyShark @aiden21c
                                  last edited by

                                  @aiden21c Just noticed that... Did you use the LAN interface address of PfSense to query DNS? Try WAN or WAN2, first. LAN network is NATed, LAN address is not.

                                  A 1 Reply Last reply Reply Quote 0
                                  • A
                                    aiden21c @NightlyShark
                                    last edited by

                                    @nightlyshark I apologise, your instructions weren't very clear so I'm not too sure exactly what to change. What I have done:

                                    • Unchecked "Enable forwarding mode" in the DNS resolver
                                    • Set "Network interfaces" to "All" in the DNS resolver
                                    • Tried both enabling and disabling the "Enable SSL/TLS Service"
                                      All this did was actually take my client down and my client was no longer able to resolve DNS quieries.
                                      I have set all the settings back to how they were originally in order to get my client back online. I then ran a "dig" from the pfsense shell and obtained these results.
                                      9.png
                                    S NightlySharkN 4 Replies Last reply Reply Quote 0
                                    • S
                                      SteveITS Galactic Empire @aiden21c
                                      last edited by

                                      @aiden21c said in Internal DNS Not Working:

                                      Set "Network interfaces" to "All" in the DNS resolver

                                      If you're using IPv6 there is a bug where using All doesn't set up the ACL entries to allow clients to query DNS.

                                      Patch ID: 46b159032fef8c78783aa1a749d2238cfed7ac0d
                                      https://forum.netgate.com/topic/176989/problems-with-pfsense-ipv6-dns-function-does-it-exist/36

                                      Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                                      When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                                      Upvote 👍 helpful posts!

                                      A 1 Reply Last reply Reply Quote 0
                                      • A
                                        aiden21c @SteveITS
                                        last edited by

                                        @steveits I am not using any IPv6. I have also reset this setting back to only responding to queries from "LAN" and "LocalHost".

                                        1 Reply Last reply Reply Quote 0
                                        • NightlySharkN
                                          NightlyShark @aiden21c
                                          last edited by

                                          @aiden21c Let's take it in steps:

                                          1. (If it were me) Remove the extra servers in General Setup (for now)
                                          2. Set DNS Resolver as:
                                            f71de06e-9e3b-46f5-b782-c2a5498f1ece-image.png
                                          3. Set all interfaces with DHCP in DHCP server as:
                                            d36b0725-3348-4130-890c-73de277e4932-image.png
                                          4. Allow LAN to DNS (both TCP and UDP), LAN to DoT (TCP)
                                          5. Setup NTP correctly (DoT may have problems if clock is wrong)
                                          6. Provide a diagram of your network (along with exactly how you connect to WAN), so I (or others) can direct you what to do (and explain each step so you will be able to change config later by yourself)
                                          1 Reply Last reply Reply Quote 1
                                          • NightlySharkN
                                            NightlyShark @aiden21c
                                            last edited by

                                            @aiden21c Also, as per dig, all is OK. You just tried pinging from the LAN ip of PfSense, which isn't NATed (meaning, it can't reach the internet, only WAN can).

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