Q. How to block ddos attacks manually with iptables?
netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
1150 83.135.33.116
iptables -I INPUT -s 83.135.33.116 -j DROP
You should block all ips with more than 300 connections,and you should check your apache server-status
|