OPNsense Forum

English Forums => General Discussion => Topic started by: revnelson on March 05, 2020, 07:17:26 AM

Title: How to remove DHCP reservation from removed interface?
Post by: revnelson on March 05, 2020, 07:17:26 AM
I had an IoT VLAN interface that I have since replaced with a different interface. The initial interface has been removed. As you can see in the image, the interface column is empty for those entries on the Services>DHCPv4>Leases table. They don't show up at the bottom of the IOT DHCP Server page. I created a new interface on the same VLAN with the same DHCP settings as the initial interface and they still didn't show up on the DHCP Server page.

Is there a file I can edit through the CLI to remove these manually? They weren't listed in var/dhcpd/var/db/dhcpd.leases* and clearing those and restarting didn't help either.
Title: Re: How to remove DHCP reservation from removed interface?
Post by: hbc on March 05, 2020, 11:00:34 AM
Just download the configuration, remove the old entries and reimport just the dhcp section or edit /etc/config.xml directly and reconfigure dhcp.
Title: Re: How to remove DHCP reservation from removed interface?
Post by: revnelson on March 08, 2020, 09:25:46 AM
Thank you for your reply!

Unfortunately there didn't seem to be any such file at /etc/config.xml as I got this returned:
cat: /etc/config.xml: No such file or directory

However, downloading the configuration, editing those parts out, and restoring from that edited configuration seems to have worked. I got an error from OPNSense on restore, but after rebooting those entries are gone from the Services>DHCPv4>Leases page.
Title: Re: How to remove DHCP reservation from removed interface?
Post by: franco on March 08, 2020, 01:11:14 PM
It's /conf/config.xml
Title: Re: How to remove DHCP reservation from removed interface?
Post by: hbc on March 08, 2020, 10:10:59 PM
Right, it's /conf directory.