OPNsense Forum

English Forums => 25.1, 25.4 Production Series => Topic started by: NeoDragon on June 24, 2025, 10:39:51 PM

Title: dnsmasq-hosts warnings after changing ip leases
Post by: NeoDragon on June 24, 2025, 10:39:51 PM
Hi,

I recently re-ordered my network to remove a few vlans and make it simpler. However, dnsmasq is throwing a few warnings like this :
Quotenot giving name hostname.local.tld to the DHCP lease of 192.168.1.5 because the name exists in /var/etc/dnsmasq-hosts with address 192.168.3.3

I cannot remove them manually from /var/etc/dnsmasq-hosts, they always come back after restarting the service.

Any ideas ?
Title: Re: dnsmasq-hosts warnings after changing ip leases
Post by: Monviech (Cedrik) on June 25, 2025, 06:36:36 AM
Yeah these warnings happen if you have a dhcp host reservation for e.g. host.example.com, and another host with the name "host" tries to register in a dhcp range which has example.com as domain.
Title: Re: dnsmasq-hosts warnings after changing ip leases
Post by: NeoDragon on June 25, 2025, 05:50:43 PM
Since I'm not using those reservation anymore, is there anyway i can remove them ? They don't appear in the gui anymore since I changed them.
Title: Re: dnsmasq-hosts warnings after changing ip leases
Post by: Monviech (Cedrik) on June 25, 2025, 05:53:12 PM
I dont understand. Are they not appearing in the dnsmasq host tab anymore, but the file they generated in var/etc/dnsmasq-hosts is still getting populated?
Title: Re: dnsmasq-hosts warnings after changing ip leases
Post by: NeoDragon on June 25, 2025, 06:19:36 PM
Exactly.

Under Hosts tab, i changed the ip address to reflect the changed ranged/subnet, but it seems to have created new ones and did not delete the old ones.

Therefore, under /var/etc/dnsmasq-hosts, both entry exist for the same host. I'm trying to delete the old one.
Title: Re: dnsmasq-hosts warnings after changing ip leases
Post by: Monviech (Cedrik) on June 25, 2025, 06:41:13 PM
If you think there is a bug please open an issue on github and the steps how to reproduce it.

Thank you.
Title: Re: dnsmasq-hosts warnings after changing ip leases
Post by: NeoDragon on June 25, 2025, 07:08:05 PM
Done

https://github.com/opnsense/core/issues/8870