I want to Only allow certain MAC addresses to get a IP from my DHCP server, currently I use dnsmasq and I rather not change dhcp server but I'm open to other software aswell.
However, I need to be able to set static IP addresses for specific MAC addresses.
currently my dnsmasq conf file has a bunch of entries that specify static IPs for a range of MAC addresses like so:
dhcp-host=00:11:22:33:44:55,192.168.1.100
dhcp-host=00:11:22:33:44:56,192.168.1.101
dhcp-host=00:11:22:33:44:57,192.168.1.102
Is there a way so that All MAC addresses that are Not specified in the above fashion doensn't get an IP?
Best Answer
You can do this by specifying only a static range
dhcp-range=192.168.0.0,static
EDIT: Change the address range above to meet your requirements.
With no dynamic ranges specified dnsmask will only provide addresses to hosts that have a corresponding dhcp-host configuration