Skip to content

Instantly share code, notes, and snippets.

@fkztw
Forked from kamermans/fail2ban-allstatus.sh
Created December 12, 2018 09:20
Show Gist options
  • Save fkztw/ce8c6c7995d898d2bc89d01876d52908 to your computer and use it in GitHub Desktop.
Save fkztw/ce8c6c7995d898d2bc89d01876d52908 to your computer and use it in GitHub Desktop.
Show status of all fail2ban jails at once
#!/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