Red Hat Enterprise Linux 7 高薪入门pdf下载
FILE=/home/wwwlogs/www.kuitao8.com.log;
for ip in `cat $FILE |cut -d ' ' -f 1 |sort |uniq`;
do { COUNT=`grep ^$ip $FILE |wc -l`;
if [[ "$COUNT" -gt "100" ]]; then
iptables -I INPUT -p tcp -s $ip --dport 80 -j DROP
fi }; done