Check bots success POSTs in apache access log
Thu, 05/19/2011 - 16:20 — sandipHere is a one liner to check for IPs of bots that are misusing your site.
$ awk '$6 ~ /POST/ && $9 ~ /200/ {print $1 " " $7}' /var/log/httpd/access_log | sort | uniq -c | sort -n | tail
This will give you the top 10 IPs and URIs with a hit count.
Consider blocking those rogue IPs with a high hit count via iptables.
- sandip's blog
- Login or register to post comments
- Read more