Created
December 2, 2015 20:47
-
-
Save jameshartig/d28f36617772903d3aa5 to your computer and use it in GitHub Desktop.
fail2unban
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
function fail2unban() { for j in $(fail2ban-client status | grep "list:" | tr "\t" "\n" | sed -n 2p | tr -d "[:space:]" | tr "," "\n"); do fail2ban-client set $j unbanip $1; done;} |
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
[root@ike ~]# fail2unban 127.0.0.1 | |
ERROR NOK: ('IP 127.0.0.1 is not banned',) | |
IP 127.0.0.1 is not banned | |
ERROR NOK: ('IP 127.0.0.1 is not banned',) | |
IP 127.0.0.1 is not banned |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment