Find IP with Most Access from Apache Log

Written by Yujin Boby

Edit in WordPress

To find IP with most access from Apache or other web server log file, run

cat APACHE_ACCESS_LOG_FILE | awk -F' ' '{print $1}' | sort | uniq -c | sort -n

If you want to see IP that made most POST request

cat APACHE_ACCESS_LOG_FILE | grep POST | awk -F' ' '{print $1}' | sort | uniq -c | sort -n

See Hacked log