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

    DNS Resolver failing to resolve random domains from time to time

    DHCP and DNS
    4
    8
    1.1k
    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
      leonroy
      last edited by

      I have a simple pfSense setup using pfSense for DHCP + DNS Resolver. After updating to 2.4.4 pfSense fails to resolve DNS lookups to certain domains randomly. Directly looking up to 8.8.8.8 always works though. A restart fixes the issue for a while.

      Originally I was using Unbound in forwarding mode to Cloudflare's DNS servers but while trying to debug this issue I implemented pfSense best practise with root hints instead as follows:

      DNS settings in General Setup are:
      0_1545211450738_524cc598-820c-4522-9fd1-2e4d52c5c9d1-image.png

      And in the Resolver:
      0_1545211519636_7fc7333e-7393-4ace-bc79-5133a548af95-image.png

      Any suggestions or areas I can look to troubleshoot?

      thanks!

      1 Reply Last reply Reply Quote 0
      • bepoB
        bepo
        last edited by

        Try to uncheck the "DHCP Registration" setting. This setting causes the dns resolver to restart in short intervalls depending on the amount of clients in your network.

        Please use the thumbs up button if you received a helpful advice. Thank you!

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

          thanks @bepo you are right though about restarts - looking at resolver.log I see:

          [2.4.4-RELEASE][root@gateway.XXXXX]/var/log: grep -i restart resolver.log
          Dec 18 21:04:03 gateway unbound: [13769:0] notice: Restart of unbound 1.8.1.
          Dec 18 09:34:19 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          Dec 18 09:38:50 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          Dec 18 09:53:00 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          Dec 18 09:57:24 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          Dec 18 09:58:09 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          Dec 18 09:59:34 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          Dec 18 10:04:52 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          Dec 18 10:04:59 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          Dec 18 10:07:31 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          Dec 18 10:13:12 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          Dec 18 10:13:12 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          Dec 18 10:13:45 gateway unbound: [22689:0] notice: Restart of unbound 1.8.1.
          

          Just checked, I only have 32 registrations in the DHCP table...it was also working fine up until recently. Do you really think the DHCP registration setting could be the problem?

          1 Reply Last reply Reply Quote 0
          • bepoB
            bepo
            last edited by

            @leonroy said in DNS Resolver failing to resolve random domains from time to time:

            Do you really think the DHCP registration setting could be the problem?

            Try and see. I had this problem on multiple pfSense firewalls and unchecking this setting resolves it.
            If it works please don't forget to upvote :-)

            Please use the thumbs up button if you received a helpful advice. Thank you!

            1 Reply Last reply Reply Quote 1
            • C
              chrcoluk
              last edited by

              I second the suggestion, you dont want your DNS resolver restarting every time a DHCP client connects ot disconnects.

              Static DHCP will still be resolved.

              pfSense CE 2.7.2

              1 Reply Last reply Reply Quote 1
              • L
                leonroy
                last edited by

                Thanks @bepo @chrcoluk - is there a way to ensure my DHCP clients are able to resolve each other by name with this unchecked?

                Most of my stuff on the network uses FQDN rather than IP to communicate.

                I'm happy forgoing Unbound altogether but unsure what's best practise here.

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

                  If you have devices that need to resolve their names to IP... Why not just setup reservations for them, so they always get the same IP.. Having unbound register static reservations does not cause the reboot on every dhcp renewal, etc.

                  Other thing you could do is lengthen the dhcp lease so that you don't have clients renewing all the time.. So unbound will restart less.

                  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.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • C
                    chrcoluk
                    last edited by

                    yes use reservation, thats what I meant by static DHCP.

                    Once this is done, unbound will resolve the hostnames and without the restarts.

                    pfSense CE 2.7.2

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