I have a box connected to a largish local IPv4 network (no IPv6 at all) through a single Ethernet interface; normally, it is assigned an IP address from the 172.16.0.0
range.
From time to time, however, somebody plugs in a DHCP server by mistake, and I get an address from the 192.168.0.0
range (and a bogus set of routes). Is there a way of telling dhcpcd
(or another DHCP client for Linux) to only accept offers from a specific IP range? Or perhaps a way to filter DHCPOFFER at iptables level, dropping bogus offers?
DHCPCD's manpage lists blacklist
and whitelist
options, but these seem to apply to the server's IP address, which is in the correct/expected range.
I am only in control of this box (and a few others in a similar role); network management is beyond my control.