Clearing DNS records created by DHCP
-
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?
-
Are you sure the old IP address isn't being cached on each client?
-
@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.
-
@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
-
And your using unbound, the forwarder? What? Was this client a static dhcp reservation before.. Did you remove the reservation off pfsense?
-
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
-
Ok look in
dhcpleases_entries.confOr
host_entries.confin /var/unbound do you see this old entry?
-
Ok look in
dhcpleases_entries.confOr
host_entries.confin /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.
-
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.
-
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
-
This is working now. Just had to give it some time it seems
-
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.