OPNsense Forum

English Forums => 25.1, 25.4 Series => Topic started by: jamesaepp on July 22, 2025, 03:02:13 AM

Title: [SOLVED] Dnsmasq DHCP - Not possible to delete dynamic lease?
Post by: jamesaepp on July 22, 2025, 03:02:13 AM
I'm feeling like an idiot right now. I tried STFW and the forum and not finding an obvious answer. I swear I read something recently that this was a (recently new?) feature but I'm struggling.

Is it seriously not possible to delete a DHCP lease under DNSmasq? I am looking at Services > Dnsmasq DNS & DHCP > Leases and staring at a table of leases, but there's no UI indication on a way to delete/forget a lease.

I tried rebooting the OPNsense firewall as a hail mary but unsurprisingly that didn't do anything.
Title: Re: Dnsmasq DHCP - Not possible to delete dynamic lease?
Post by: Monviech (Cedrik) on July 22, 2025, 06:48:02 AM
It did not make the cut:

https://github.com/opnsense/core/pull/8899
Title: Re: Dnsmasq DHCP - Not possible to delete dynamic lease?
Post by: jamesaepp on July 22, 2025, 01:32:11 PM
Thanks for sharing. If I'm reading that right, the "issue" that caused me to ask the question (reservation not seeming to take effect) is likely an issue with the client system in question not doing a release.
Title: Re: [SOLVED] Dnsmasq DHCP - Not possible to delete dynamic lease?
Post by: Monviech (Cedrik) on July 22, 2025, 02:34:07 PM
Yeah the client system either needs a reboot or a DHCP RELEASE, but it would need one anyway even if you delete a lease from dnsmasq.

There is no mechanism to tell the client "hey get rid of your current dhcp lease and take a new one".

Only the client can do this via a DHCP RELEASE, or when it asks via a new DHCP DISCOVER after e.g. restarting the network interface or a reboot.

Dnsmasq will then offer the new IP address that was reserved during the next DHCP DISCOVER cycle.
Title: Re: [SOLVED] Dnsmasq DHCP - Not possible to delete dynamic lease?
Post by: jamesaepp on July 22, 2025, 03:00:09 PM
What's funny is I did reboot the client system and that didn't influence the behavior either. Idk. Don't want to overthink it.