<br><br><div class="gmail_quote">2011/2/8 Ingen Schenau, Jeroen van (ICTS) <span dir="ltr"><<a href="mailto:j.vaningenschenau@utwente.nl">j.vaningenschenau@utwente.nl</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<div class="im"><br>
> The second one is filter by the fields of the request. You may use the<br>
> "u32" iptables module to do it, as sugested by Alan Bligh in the very<br>
> first response to your thread. This may also be combined with the<br>
> "limit" and/or the "recent" iptables modules, giving you a way to<br>
> control how long a specific client have to wait before it can re-send<br>
> the dhcp request.<br>
><br>
> iptables -A INPUT -p udp --dport 67 --u32 "28 = 0xaa && 29 = 0xbb &&<br>
> 30 = 0xcc && 31 = 0xdd && 32 = 0xee && 33 = 0xff" -j BLOCK_DHCP_CLIENT<br>
><br>
> iptables -A BLOCK_DHCP_CLIENT -m recent --update --seconds 60 -j DROP<br>
> iptables -A BLOCK_DHCP_CLIENT -m recent --set -j ACCEPT<br>
><br>
> This will match the CHADDR field having the MAC "aa-bb-cc-dd-ee" (and<br>
> not the source mac address of the frame) and divert processing to a<br>
> new chain (you need to create it with "iptables -N" first). In this<br>
> chain, we'll accept the first request, and drop any subsequent<br>
> requests within 60 seconds from the last one.<br>
><br>
> As "normal" clients will not trigger this new chain, they'll not get<br>
> blocked.<br>
<br>
</div>Just checking: if a client does a DHCPDISCOVER, it's generally responded<br>
to immediately. Suppose the server sends an OFFER; wouldn't the<br>
following DHCPREQUEST from the client be dropped by the rules above?<br>
<br></blockquote><div><br>Only if the DISCOVER/REQUEST/INFO is coming from the offending mac-address, as marked by the CHADDR field.<br>Well-behaviored clients shall not be affected.<br><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

To be on the safe side, I'd personally prefer to limit any DHCP client<br>
to about 10 pps; in our network setup, both DHCP servers receive each<br>
discover twice because we have two access routers on each segment with<br>
both DHCP servers configured as helpers. So in a normal DHCP<br>
transaction, our servers each receive 4 packets from a client within one<br>
second.<br>
<div class="im"><br></div></blockquote><div><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
<br>
Regards,<br>
<br>
Jeroen van Ingen<br>
ICT Service Centre<br>
University of Twente, P.O.Box 217, 7500 AE Enschede, The Netherlands<br>
<br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
</div></div></blockquote></div><br>