Find IP with Most Access from Apache Log

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

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *