Skip to content

Instantly share code, notes, and snippets.

@josuecau
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josuecau/79c2fd40214ac78159f4 to your computer and use it in GitHub Desktop.
Save josuecau/79c2fd40214ac78159f4 to your computer and use it in GitHub Desktop.
Top 10 of blocked IP by Fail2ban
#!/bin/sh
awk '($(NF-1) = /Ban/){print $NF}' /var/log/fail2ban.log | sort | uniq -c | sort -r -n -k 1,1 | head -n 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment