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

    Unbound not resolving queries for static mappings in DHCP range [SOLVED]

    Scheduled Pinned Locked Moved DHCP and DNS
    12 Posts 4 Posters 1.8k 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.
    • C
      cetteup
      last edited by cetteup

      Hi all,

      I am having a weird issue with one of my PfSense installs.

      PfSense version: 2.4.4-RELEASE-p1 (amd64)
      Hardware: PC Engines APU2

      I have a couple of static DHCP mappings configured - some outside the DHCP range with a manually specified IP address, some inside the DHCP range. My PfSense is set up to "Register DHCP static mappings in the DNS Resolver". This works fine for any static mapping with a manually specified IP address (outside DHCP range). However, I keep getting NXDOMAIN-errors when trying to resolve a hostname for a machine with a static mapping within the DHCP range. I have turned all relevant settings off and on again, restarted the respective services, restarted the firewall itself, tested this both on a few clients and the nslookup tool in PfSense - it just won't work. Once I simply add an IP address to the static mapping and apply the changes, the hostname can be resolved instantly.

      I have another PfSense box that is configured very, very similarly that resolves queries for hostnames both within and outside the DHCP range without any issues.

      Any ideas what I messed up here?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Are you testing using short names or are you adding the domain of the firewall on when trying to look them up?

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        C 1 Reply Last reply Reply Quote 0
        • C
          cetteup @jimp
          last edited by

          @jimp I have tested both, neither works. Both variants work on the other PfSense box I have (same hardware; seemingly identical setup for DHCP and DNS).

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            What do you have in /var/unbound/dhcpleases_entries.conf? Is the dhcpleases daemon running?

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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

              /var/unbound/dhcpleases_entries.conf appears to be empty:

              [2.4.4-RELEASE][admin@pfSense.domain]/root: cat /var/unbound/dhcpleases_entries.conf
              [2.4.4-RELEASE][admin@pfSense.domain]/root:
              

              dhcpleases is not running:

              [2.4.4-RELEASE][admin@pfSense.domain]/root: ps aux | grep dhcpleases
              root    53138   0.0  0.1  6564  2464  0  S+   16:13       0:00.01 grep dhcpleases
              
              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                Do you have Register DHCP leases in the DNS Resolver checked under Services > DNS Resolver? It's a separate option from the static mappings checkbox.

                Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                4 1 Reply Last reply Reply Quote 0
                • C
                  cetteup
                  last edited by

                  Register DHCP leases in the DNS Resolver is disabled (on both boxes).

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    You need to have that checked. Otherwise it can't determine the hostname/IP address pairing for dynamic allocations.

                    Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

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

                      Ok, thank you very much for your help. ๐Ÿ‘

                      That setting used to be turned on on my other box and the contents of /var/unbound/dhcpleases_entries.conf apparently don't get "flushed" if the setting is disabled. So that box was still able to resolve the hostnames even though the setting had already been turned off.

                      1 Reply Last reply Reply Quote 0
                      • 4
                        4o4rh @jimp
                        last edited by

                        @jimp The "Register DHCP leases in the DNS Resolver" checkbox no longer appears on 24.03 and static DHCP addresses are not being resolved

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

                          @4o4rh

                          57523df6-7f1a-4f73-829f-6424a38e62ef-image.png

                          d81ed7e5-db63-4aaa-9cd1-d186f5e850b8-image.png

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

                          4 1 Reply Last reply Reply Quote 0
                          • 4
                            4o4rh @Gertjan
                            last edited by

                            @Gertjan you are a devil ๐Ÿ˜€ that only exists with ISC DHCP and not Kea DHCP.
                            I have reverted back to ISC until the enhancements to Kea are done

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