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

    Clearing DNS records created by DHCP

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

      Are you sure the old IP address isn't being cached on each client?

      1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott
        last edited by

        @KOM:

        Are you sure the old IP address isn't being cached on each client?

        If it is in the DNS cache, it should be deleted after a period of time.  Regardless, it's possible to flush the cache.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

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

          @KOM:

          Are you sure the old IP address isn't being cached on each client?

          I get the same results from different machines. Including Linux machines which don't have a DNS cache

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

            And your using unbound, the forwarder?  What?  Was this client a static dhcp reservation before.. Did you remove the reservation off pfsense?

            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 0
            • F
              farhank
              last edited by

              @johnpoz:

              And your using unbound, the forwarder?  What?  Was this client a static dhcp reservation before.. Did you remove the reservation off pfsense?

              Using unbound. The old IP address wasn't static, it was assigned by the DHCP server. I removed the DHCP lease. A static mapping wasn't configured

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

                Ok look in
                dhcpleases_entries.conf

                Or
                host_entries.conf

                in /var/unbound do you see this old entry?

                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 0
                • F
                  farhank
                  last edited by

                  @johnpoz:

                  Ok look in
                  dhcpleases_entries.conf

                  Or
                  host_entries.conf

                  in /var/unbound do you see this old entry?

                  Yes I can see the old IP address in dhcpleases_entries.conf and the new one in host_entries.conf.

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

                    well remove it from dhcpleases._entries.conf

                    You stated you had removed the old lease - if so it should of been removed from there when you did that.

                    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 0
                    • F
                      farhank
                      last edited by

                      @johnpoz:

                      well remove it from dhcpleases._entries.conf

                      You stated you had removed the old lease - if so it should of been removed from there when you did that.

                      I removed it from dhcpleases._entries.conf. Does anything need restarting for the changes to take effect? I still get the old IP from nslookup

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

                        This is working now. Just had to give it some time it seems

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

                          well you would need to clear the cache on dns server, and or clients local copy which would time out after the ttl expired which most likely would of been at most 1 hour.

                          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 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.