for i in $(cat /tmp/dropip)
do
/sbin/iptables -A INPUT -s $i -j DROP
echo “$i kill at `date`” >>/var/log/ddos
done
#------------------------
if [ "$a" == "" ]
then
if [ "$b" -gt 7000 ]
then
iptables -D INPUT 1
fi
iptables -I INPUT -s $i -p tcp --dport 80 -j DROP
echo $i >> /opt/bad_ip.txt
fi
done
sleep 2
done