• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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.6k 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.
  • F
    farhank
    last edited by Mar 9, 2018, 12:20 PM Mar 8, 2018, 6:16 PM

    I created a new machine which got an IP address through DHCP. Pfsense is configured to register these to DNS.

    I then gave the new machine a static IP address and added that to DNS then removed the DHCP lease from Pfsense but can't find the DNS record anywhere.

    I get both the new and old IP addresses from nslookup from multiple machines. How can remove the old DNS records created by the DHCP service?

    1 Reply Last reply Reply Quote 0
    • K
      KOM
      last edited by Mar 8, 2018, 6:22 PM

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

      1 Reply Last reply Reply Quote 0
      • J
        JKnott
        last edited by Mar 8, 2018, 7:17 PM Mar 8, 2018, 6:28 PM

        @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 Mar 8, 2018, 6:31 PM

          @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
          • J
            johnpoz LAYER 8 Global Moderator
            last edited by Mar 8, 2018, 6:36 PM

            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 Mar 8, 2018, 6:45 PM

              @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
              • J
                johnpoz LAYER 8 Global Moderator
                last edited by Mar 8, 2018, 6:56 PM

                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 Mar 9, 2018, 10:36 AM

                  @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
                  • J
                    johnpoz LAYER 8 Global Moderator
                    last edited by Mar 9, 2018, 10:43 AM

                    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 Mar 9, 2018, 10:50 AM

                      @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 Mar 9, 2018, 12:19 PM

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

                        1 Reply Last reply Reply Quote 0
                        • J
                          johnpoz LAYER 8 Global Moderator
                          last edited by Mar 9, 2018, 1:14 PM

                          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
                          12 out of 12
                          • First post
                            12/12
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                            This community forum collects and processes your personal information.
                            consent.not_received