alexander Posted July 14, 2009 Report Posted July 14, 2009 Post random one liners and approximately describe what they do :) Note: authors are not responsible for people who carelessly use their scripts... if you dont know what it does, chances are, you shouldnt be running it ;) Today, I basically rewrote the scirpt in this article: Rule-based DoS attacks prevention shell script LG #137 tmp="iptables -F" && while ip in `cat /etc/sysconfig/iptables /var/log/secure | grep 'DROP|Invalid user|Maximum login|Did' | awk '{i=1; while ($i!=""){{print $i}; i++}}' | grep "^([0-9]{1,3}.){3}.[0-9]{1,3}$" | sort -u`; do tmp=`echo $tmp" && iptables -A INPUT -s "$ip" -j DROP"`; done and to get it fully working you can add a " && echo $tmp | bash" at the end... but DONT, you should always examine the command line before running it :lol: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.