Finding IPs Hitting Webserver Print

  • 0

Guidelines to determine which IP addresses are hitting your web site the most. A quick learning tutorials for self learners.

If your webserver has started to come under increased load and you want to see which IPs have been most actively hitting your website, you can do the following:

1. SSH into your server

2. Go to the directory where the access_logs are stored for Apache.

  • For cPanel servers this is done by typing: cd /etc/httpd/logs/
  • Other locations include: /var/log/apache2/ or /var/log/httpd or /etc/apache2/logs

3. Type the following command: tail -50000 access_log | awk '{print $1}' | sort | uniq -c | sort -n | tail

Was this answer helpful?

« Back