[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reject dhclient offer from wrong subnet



On Wed, Dec 15, 2021 at 04:26:42PM +0100, Tuxo wrote:
> Hi list
> 
> My router and my docsys modem power on at the same time. the modem is
> handing out dhcp offers of 192.168.100/24 . I assume they are meant for
> internal set up purposes and dhclient on my router should not catch or
> respond to them. Only the final offer after modem bootup has completed does
> contain the WAN subnet and a lease time of 4 hours.
> 
> Can I configure dhclient on my router to discard lease offers from a certain
> subnet? I could also try to match the lease time, the 192.168.100/24 lease
> time is only several seconds (!!) short, the real one will be 4 hours or
> more and come with a valid WAN subnet mask.
> 
> I never had this problem before, so I don't know how to change dhclient's
> behaviour to a bogus lease offer.
> 
> Maybe iptables could assist and block multicast traffic from/to the wrong
> subnet? I'm not sure I would still get the actual WAN lease then.

Which dhcp client?

if dhclient, the config allows specifying a reject subnet range, so you
could do something like:
reject 192.168.100.0/24

-- 
Len Sorensen


Reply to: