Skip to content

Instantly share code, notes, and snippets.

@keinwort
Forked from ahmadawais/.zshrc
Last active July 21, 2021 00:33
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 keinwort/af3748df800bf86135fb7cfa89a2e1d3 to your computer and use it in GitHub Desktop.
Save keinwort/af3748df800bf86135fb7cfa89a2e1d3 to your computer and use it in GitHub Desktop.
Print status for all fail2ban jails.
# Print status for all fail2ban jails. a little bit more space between
f2stall() { JAILS=($(fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'))
for JAIL in ${JAILS[@]}
do
echo " "
echo "--------------- 👀 JAIL STATUS: $JAIL ... ---------------"
fail2ban-client status $JAIL
echo "### --------- ### ... ### --------- ### ... ### --------- ###"
echo " "
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment