User Tools

Site Tools


vps:ddos
[root@2gsg ~]# cat /root/check.sh
#!/bin/sh
netstat -na | grep $1 | awk '{print $5}' | cut -d: -f1 | sort -n | uniq -c | sort -n
# cat bugaga.sh
#/bin/sh
iptables-save |grep DROP|awk '{print $4}' > ipt.list
/root/check.sh 80|tail -n 10|awk '{print $2}' > net.lst
cat ipt.list ipt.list net.lst|sort -n|uniq -c|grep "1 "|awk '{print "iptables -A INPUT -s "$2" -j DROP"}'
vps/ddos.txt · Last modified: 2008/01/09 16:15 (external edit)