(solved) Empty static lease not removable

Started by RamSense, January 29, 2021, 06:40:48 PM

Previous topic - Next topic
January 29, 2021, 06:40:48 PM Last Edit: February 05, 2021, 05:34:41 PM by RamSense
I have somehow managed to get an empty static lease and I see no way to delete it.

On services -DHCPv4 - leases I have an static address on top <empty>:
Interface:  empty
IP address: empty
MAC address: empty
Hostname: Samsung
Description: Samsung
status: " offline sign"
lease type: static

There is no delete option behind it.

When I go to: services - DHCPv4 - [LAN]:
there is a complete list of the static addresses under "DHCP Static Mappings for this interface." But the <empty> one above on the other page is not showing, and I can not delete it.

I can use "deny unknown clients", but I can not also enable static arp. When I do I get the following error message:
Cannot enable static ARP when you have static map entries without IP addresses. Ensure all static maps have IP addresses and try again.

But the list shown have all an ip. Only the one showing only on the leases page has not, and I am not able to change it...

How to get rid of this entry?

(This is the case on opnsense 20.7.x as on 21.1 I am running now.)
Thank you for your help!
Deciso DEC850v2

somebody with knowledge on opnsense?
Deciso DEC850v2

Note sure why it won't allow you to delete, however it's pretty simple. Download the config using System:Configuration:Backups. Open it in an editor and look for <staticmap> entries, it will look like this:

  <staticmap>
        <mac>00:16:01:0a:58:24</mac>
        <ipaddr>10.4.12.5</ipaddr>
        <hostname>Terrastatiion</hostname>
        <winsserver/>
        <dnsserver/>
        <ntpserver/>
  </staticmap>


just remove the entry and save the config.xml to your pc. Then import the config using Restore configuration.
OPNsense 25.7a - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member

@marjohn56, thank you. Your method worked! Thnx! Sometimes it is easy :-)

Deciso DEC850v2