Skip to content

Instantly share code, notes, and snippets.

@Hendrik44
Created February 6, 2019 21:22
Show Gist options
  • Save Hendrik44/9fb50070ba14092b01aba4f3e2454fa2 to your computer and use it in GitHub Desktop.
Save Hendrik44/9fb50070ba14092b01aba4f3e2454fa2 to your computer and use it in GitHub Desktop.
Show status of all fail2ban-jails
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment