im checking ddos using this script:
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
it will show something like this
24 220.160.239.126
25 42.80.231.240
26 182.109.15.223
29 218.64.39.93
im blocking the ip using:
route add 218.64.39.93 reject
how do i combine the checking netstat with the route add reject if the count more than 20.
thanks