Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to list banned IP ubuntu

#list all currently blocked ips:

fail2ban-client status | grep "Jail list:" | sed "s/ //g" | awk '{split($2,a,",");for(i in a) system("fail2ban-client status " a[i])}' | grep "Status|IP list"

#unban an ip:

fail2ban-client set postfix-mail unbanip 111.222.333.444
Source by askubuntu.com #
 
PREVIOUS NEXT
Tagged: #list #banned #IP #ubuntu
ADD COMMENT
Topic
Name
4+5 =