Remove DHCP leases over webGUI


#1

Hello there,

A couple days ago, I turned on the DHCP service on my pihole.
It worked pretty well. But one device wouldn’t take my reserved address, so i removed the lease manually from the leases file. Then it took the reserved address.
To cut a long story short, it would be cool if we could remove/revoke the leases over the website.


#2

This would be useful.
:+1:


#3

Very much yes! I took dhcp away from my router, but I feel like dhcp on the pihole should have more of the dhcp related features that other devices have.

Overall, I think the settings page could use some TLC. With the newer features added, it’s starting to look cluttered.

I think that the “Settings” button in the left-had pane should expand like the “Tools” and “Disable” buttons.

There should then be multiple options.
“DHCP” should be it’s own page,
“DNS Settings”, and
"Administration" just move

  • The non-editable “Networking”
  • “Web User Interface” options
  • “System Administration”
  • “Pi-hole Teleporter”

Doing that would leave room on the pages to get rid of the “expanding plus buttons”, and make the interface nicer to use in general.


#4

I’m definitely on board with deathbybandaid’s idea. For users that take advantage of the DHCP functionality, it’s a very important feature of the system, and having to go to the generic “Settings” page and expand a couple of menus makes it feel buried away.

Also, would love the ability to release leases via the GUI.


#5

Good idea! The DHCP part should get a little more priority, cause its an important service in a network. An rearrangement of the frontend would be nice.


#6

Pi-Hole, a DNS forwarder, is the gateway drug to getting a better router. :smiley:


#7

Wake-On-Lan would be awesome


#8

That would be interesting, (rant-mode enabled)

Imagine building a custom box “Gateway device” (router)

  • 24 Ethernet ports
  • dhcp
  • WOL
  • Long term data stats
  • openvpn server built in
  • Site-to-site VPN
  • a webui access to speedtest-cli
  • dns adblocking
  • firewall
  • integration with dynamic dns services like No-IP
  • nginx reverse proxy
  • an internal service that pings various network equipment and notifies when down. Kinda like this program
  • CUPS print server
  • Some sort of RDP Gateway

I guy can dream, eh?


#9

My NAS can do all that (and much more) but with only 4 eth ports :wink:


#10

Any other inputs/critics for this feature request?


#11

This gets my vote 2. I am running Pi-Hole on my Synology NAS, and it replaces the Synology SHCP server which has this functionality and I would find it very useful to have the ability to delete leases available.


#12

Voted on this, DHCP definately deserves its own config page !


#13

The was a community submitted effort to separate the config pages a while back, however it appears go have gone stale…


#14

a shame, it looks /looked promising… implementing this might not be a huge job, most of the nitty-gritte seems to have been taken care of.


#15

True. We aim to focus on stability first, sexy features later. Something like this is actually a larger undertaking than it first appears, as it would involve a lot of smaller changes under the hood to make sure it works correctly. That said, we’re not dismissing it just yet!


#16

This is implemented if I’m not mistaken?


#17

No, this is not implemented.
My feature request was to be able to remove leases handed out by the DHCP server not the static leases.)


#18

I don’t think dnsmasq (and FTLDNS as it’s an in-house fork of dnsmasq) has the ability to revoke an active lease (unless disable/delete/enable).

Editing the lease file and removing the line, will not help either with dnsmasq (or FTLDNS) active because the lease file is read at program start and after start it uses a cached version (in memory) of the file.

One would need to stop dnsmasq (or FTLDNS) edit/remove the line and then restart dnsmasq (or FTLDNS).

But disabling dnsmasq (of FTLDNS) while in use, for a lease entry removal will definitely affect the other devices.

Instead of removing a lease like that, why not use a lease time of one hour ?


#19

I have set it back to the Feature Request category. Sorry about the mix up.


#20

Is this really a feature you need frequently? If so, why?

You can delete/modify a lease by doing the following:

  1. Stop pihole-FTL
  2. Manually edit the /etc/pihole/dhcp.leases file
  3. Restart pihole-FTL

Any automated implementation would have to use the same way.