#!/Bashblog.net

Display all Fail2ban jails

Categories: [1-liners]
Tags: [bash]

Here is neat command to display all Fail2ban jails with block stats.

fail2ban-client status|awk -F: '/Jail list:/ { split($2,jail,",") ; for (i in jail) { gsub(/[\t ]/,"",jail[i]); system("fail2ban-client status "jail[i]); }; }'

« Previous Next »