标签:
统计访问频次最高的10个ip:
cat /var/log/httpd/access_log |awk ‘{print $1}‘|sort|uniq -c|sort -nr|head -10
统计恶意ip(结果为403的请求)
cat /var/log/httpd/access_log|awk ‘{if($9==‘403‘){print $1}}‘|sort|uniq|sort -nr
请求样本如下:
61.160.207.44 - - [17/Mar/2015:06:30:55 +0000] "CONNECT reg.163.com:443 HTTP/1.0" 403 1374 "-" "Mozilla/5.0"
标签:
原文地址:http://www.cnblogs.com/chutianyao/p/4223778.html