Limit DHCP requests with iptables - problem: Router

Simon Hobson dhcp1 at thehobsons.co.uk
Mon Feb 7 12:50:09 UTC 2011


Alex Bligh wrote:

>>Is there a possibility in iptables to read the dhcp-header for the mac
>>address and put THIS mac-address in the rule for traffic limitation?
>
>Theoretically. See (e.g.) the iptables "u32" option which can examine
>arbitrary 32 bits words within the packets.
>
>You might, however, find it easier to patch dchpd to do a token leaky
>bucket rate limit.

Shouldn't be too hard to match, it's in a fixed place - I think it 
starts at byte 28 in the packet and is 16 bytes long.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the dhcp-users mailing list