Remove DHCP leases over webGUI

I don't need that frequently. In an error case I thought it would be usefull.
Back then I had a problem with DHCP which only resolved be removing the lease.

A little delete button would be nice :slight_smile:

2 Likes

you forgot the file hosting service.

Linking for reference:

1 Like

I too would like this feature.. would be cool to have a "remove this DNS entry now please" button in the UI, something like this:

Otherwise I guess we just wait for the leases to time out I guess .. not the end of the world but a nice to have :kissing_heart:

1 Like

You should be able to sed out the actual lease in the leasefile and then kick pihole-FTL to reread everything. @DL6ER That's possible, right?

Edit: Sorry, that's a few posts up already. In my defense, my brain is broken cause it's 97F in my office today.

1 Like

All good, no idea what 97°F is in any useful unit but I get it's too hot :slight_smile:

I should maybe also point out that the lease time is configurable since always.

Screenshot at 2020-08-20 00-03-24

I'm not a big fan of 24 hours as lease time, I like my clients to check back with the DHCP server more frequently so they could also pick up changed network configuration, etc. The web interface setting has the granularity of hours, however, defining minutes and seconds is possible as well, you'd just have to edit a local file for this.

I don't know about "frequently" but occasionally I would like the terminate a lease prior to the 744 hours lease I have configured.

This comes about as I have every one of my known devices statically leased in the DHCP server. When a new one comes in; e.g. a new iPhone, Tablet, Vacuum, etc. I allow it to join the network dynamically, do whatever data crossover I need to between old device and new, and then assign the new device the original device's IP.

Let's say my iPhone is always 192.168.1.7. The new one comes is at God know what, but will have that lease for a month. Granted in a month the old device will not be there as it has been decommissioined. But that's an entire month of the IP Scheme being "wrong".

Or, I am working on reorganizing my IP scheme. Group like devices in to IP ranges; e.g. all networking devices in 192.168.1.X, all servers into 192.168.1.1X, all printers into 192.168.1.2X, etc. In order for them all to fall into place once the reservations are set I'd need to

?

Many commercial routers offer what Cheesman97 is referring to.

I'm not saying that Pi-Hole is any less because it doesn't do this, nor is it a necessary function, but since it is out in the wild and we have seen its convenience we respectfully request that you consider it.

BTW I have a 1 month lease configured because I like to see what's joined the network when I wasn't looking. I have a renter that doesn't follow the rules and allows any idiot he invites over to plug in to the switch that is in his room.

Would you like to sponsor this feature?

Please forgive my ignorance, what does that mean?

Would you like to financially sponsor the feature request?

I extrapolated that much. That kind of investment is the organization looking for?

Since we're an open source project that runs exclusively on donations, yes.

I have made a contribution already. And willing to do so again. Do we have a number in mind?

I guess it would depend on the value of the feature for your use? No set number in mind.

I guess that answer is yes.

I can sponsor the feature, per my mockup! :point_up_2: How does $250 sound? Just add a little red trashcan button next to the copy button, press it, and bam, DHCP lease cleared for that entry?

It sounds very generous and we're talking over how to implement it, both for the server and how to affect the client that holds that lease.

1 Like

An update midway: We implemented a new method in FTL to unlink existing leases without the need to restart the DNS/DHCP server (pi-hole/FTL//887dc2). This ensures uninterrupted operation. Next steps are implementing the button on the API (shouldn't be too hard) and final testing. Stay tuned!

1 Like

Done, see

and

Awaiting code review and approval, this feature is very likely to be included in the next Pi-hole release (we're loosely targeting something in December).

1 Like