Created
December 8, 2017 10:21
-
-
Save welrbraga/4492237f9cf705b921be4c44c68ceb50 to your computer and use it in GitHub Desktop.
faill2ban status all
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
#!/bin/bash | |
#Save this script on /usr/local/bin | |
#welrbraga - 2017-12-07 | |
fail2ban-client status|awk -F: '/Jail list:/ { split($2,jail,",") ; for (i in jail) { gsub(/[\t ]/,"",jail[i]); system("fail2ban-client status "jail[i]); }; }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fail2ban has no way to show individual status for each jail. So, in this git I use awk to get all jails and show their status.
Save it in file on /usr/local/bin with executable permission and have fun.