Questions? Feedback? powered by Olark live chat software
Author Avatar

Finding IPs Hitting Webserver

Written by: on 25 July 2014 03:00 PM 25 July 2014 03:00 PM

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

(0 vote(s))
Not helpful