OPNsense Forum

Archive => 20.1 Legacy Series => Topic started by: tre4bax on February 21, 2020, 12:00:34 pm

Title: DHCP Leases and DNS registration
Post by: tre4bax on February 21, 2020, 12:00:34 pm
Just trying to work out why my DNS is not returning the right address for DHCP registered names, even after flushing the DNS cache.

When I look at the DHCP leases there is a column for Offline/Online.  This does not seem to accurately flag whether something is online or offline, you can happily ping devices marked as offline.  Is this right or an aberation on my box.

Anyway the box I should see is showing up there with the hostname in place and an ipaddress which although shows offline is actually pingable and I can access the box using the ip address.  If I try to ping the name, or do an NSLookup it gets a different address, potentially one that it had earlier?  I tried flushing the local cache on the box I'm working on but this still happens.

Is there anyway to see directly the DHCP registered names in Unbound?  It feels like there should be however I cannot find one.  How do I go about debugging this kind of thing?  I know I can put in Overrides, I was just looking to avoid that if possible due to the additional management involved. 
Title: Re: DHCP Leases and DNS registration
Post by: Maurice on February 21, 2020, 02:41:03 pm
Is there anyway to see directly the DHCP registered names in Unbound?

On the console:
Code: [Select]
cat /var/unbound/dhcpleases.conf
Cheers

Maurice
Title: Re: DHCP Leases and DNS registration
Post by: tre4bax on February 21, 2020, 02:51:37 pm
Thanks Maurice.

That is interesting as the names it returns is a small faction of the names that should be there and that do resolve if I use them in a web browser or a ping.

That suggests that something else is resolving them, probably in windows I guess.  All a bit of a mess really.