Created
March 30, 2015 21:28
-
-
Save ntbrock/c6110dd8520a25d75c70 to your computer and use it in GitHub Desktop.
geoFail2Ban.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat geoFail2Ban.sh | |
#!/bin/sh | |
export TMP_F2B='/tmp/fail2ban.cut' | |
cat /var/log/fail2ban.log|grep Ban|cut -f 7 -d ' ' > $TMP_F2B | |
while read p; do | |
echo -n $p | |
geoiplookup $p | |
done <$TMP_F2B |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment