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

Finding IPs Hitting Webserver

Written by: on 31 May 2016 03:20 PM 31 May 2016 03:20 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))
Helpful
Not helpful