Only allocate static DHCP requests?

Hi,
Is it possible to configure Pi-hole to only allocate IP addresses to known MAC addresses?

I know how to block a specific MAC address from getting assigned an IP address, but I'd like to do this for all devices on my network that do not have a static DHCP lease entry set up in Pi-hole.

Many thanks,
Myles

Pi-hole doesn't expose such an option via its UI.

But Pi-hole's embedded DNS server pihole-FTL is a tailored fork of dnsmasq.
As such, it can be configured in any way dnsmasq can be, as long as that wouldn't conflict with Pi-hole's own configuration options.That would extend to any DHCP option supported by dnsmasq, making it more of a question for dnsmasq.

Quoting from dnsmasq docs:

When a host matches any --dhcp-host directive (or one implied by /etc/ethers) then the special tag "known" is set. This allows dnsmasq to be configured to ignore requests from unknown machines using --dhcp-ignore=tag:!known

You could add dhcp-ignore=tag:!known to a custom configuration file (e.g. /etc/dnsmasq.d/42-disallow-unknown-hosts.conf) and run pihole restartdns for those settings to take effect.

2 Likes

Amazing! Many thanks Bucking_Horn, I'll give that a try.

That works perfectly!

Thank you so much Bucking_Horn!