Just real quick:<br><br>What about one of the BSDs and pf? The latter is said to be the world&#39;s best firewall. Real elegant syntax too:<br><br>block quick from &lt;bruteforce&gt;<br><br>pass in on $ext_if inet proto tcp from any to any port 80 keep state (max-src-conn 100, max-src-conn-rate 15/5, overload &lt;bruteforce&gt; flush global)<br>
<br>That takes care of all my DDoS protection needs. Some of y&#39;all mentioned big guns though, I don&#39;t know about that.<br><br>Thanks!<br><br><div class="gmail_quote">On Thu, Nov 4, 2010 at 3:30 AM, malte <span dir="ltr">&lt;<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">unclepieman Wrote:<br>
-------------------------------------------------------<br>
<div class="im">&gt; Hi,<br>
&gt;<br>
&gt; Agreed, what Ive done in the past to get around<br>
&gt; that issue is to setup a span port on our edge so<br>
&gt; it takes a packet and mirrors it to another<br>
&gt; server, say nic1. You run a script on that server<br>
&gt; that does all the number crunching, based on what<br>
&gt; it sees, you can have your script modify routing<br>
&gt; on the edge router, inject iptables rules into<br>
&gt; your server or any gw devices above the server.<br>
&gt; You can then not only provide a layer3-4<br>
&gt; protection (while taking away the immediate threat<br>
&gt; away) but now can allow the attack to go on for<br>
&gt; say 1-5 min, monitor the uri and log files and<br>
&gt; create a behavior for the traffic which then you<br>
&gt; can block dirty and allow good traffic back in.<br>
&gt;<br>
&gt; having a feedback loop system allows you to get<br>
&gt; rid of any false positives. If say a good ip is<br>
&gt; somehow redirected to localhost:81 (where there is<br>
&gt; a valid link with captcha saying &quot;if you are in<br>
</div>&gt; fact a GOOD user, answer the question and click &quot;.<br>
<div class="im">&gt; Then have that action inject a cookie into the<br>
&gt; session which then gets matched at the edge and<br>
&gt; passes down to the proper segment.<br>
&gt;<br>
&gt; there are dozens of ways to mitigate the issue,<br>
&gt; just depends on how you want to go about it. Ive<br>
&gt; worked on designing advance ddos mitigation<br>
&gt; networks/software and server based appliances.<br>
<br>
</div>This would work to mitigate a small DDoS, but if they bring the bigger<br>
guns out, a massive problem using the DDoS deflate mechanism you<br>
describe here (blocking the attackers with IP tables, or other SW based<br>
firewall) becomes impossible, because the Linux kernel (in the case of<br>
IP tables) will spend HUGE amounts of cpu time scrutinizing all network<br>
traffic, making sure its not going to or from a blocked IP. I<br>
experienced this first hand after IP tables reached around 20k blocked<br>
IPs. The attack was getting blocked effectively, but the machines load<br>
was now higher than it was before the blocking began, due to all this<br>
processing the kernel is forced to do on behalf of the firewall.<br>
<br>
So I found that it was a lot more effective to just use the nginx limit<br>
modules to deny the attackers ability to simply request any amount of<br>
pages they wanted. It still meant serving some pages to the attackers,<br>
but at least the kernel did not have to devote 90% of its time to IP<br>
table processing.<br>
<div class="im"><br>
&gt;<br>
&gt; Having said this, i do think that nginx requires a<br>
&gt; native ddos mitigation module, it would save a lot<br>
&gt; of time and effort in the long run! =)<br>
<br>
</div>I concur. I&#39;ve seen a few DDoS attacks before which could easily be<br>
mitigated with DDoS deflate techniques, but a module like I described<br>
above sure would be helpful when the attack grows more serious.<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,147105,147489#msg-147489" target="_blank">http://forum.nginx.org/read.php?2,147105,147489#msg-147489</a><br>
<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.home.no/reddvinylene">http://www.home.no/reddvinylene</a><br>