How does the CentOS system remove IP from the Fail2ban blacklist

  
                

Fail2ban in Linux is a tool to protect servers from network attacks. Fail2ban can blacklist IP addresses. Since there is a banned IP, the question is, how does the CentOS system remove the IP from the Fail2ban blacklist.

How to List banned IP To view all blocked ip address, run the following command:

# iptables -L

Chain INPUT (policy ACCEPT)

target prot opt ​​source destination

f2b-AccessForbidden tcp -- anywhere anywhere tcp dpt:http

f2b-WPLogin tcp -- anywhere anywhere tcp dpt:http< Br>

f2b-ConnLimit tcp -- anywhere anywhere tcp dpt:http

f2b-ReqLimit tcp -- anywhere anywhere tcp dpt:http

f2b-NoAuthFailures tcp -- anywhere anywhere tcp Dpt:http

f2b-SSH tcp -- anywhere anywhere tcp dpt:ssh

f2b-php-url-open tcp -- anywhere anywhere tcp dpt:http

f2b -nginx-http-auth tcp -- anywhere anywhere multiport dports http,https

ACCEPT all -- anywhere anywhere state RELATED, ESTABLISHED

ACCEPT icmp -- anywhere anywhere

ACCEPT all -- anywhere anywhere

ACCEPT tcp -- anywhere anywhere tcp dpt:Ether Net/IP-1

ACCEPT tcp -- anywhere anywhere tcp dpt:http

REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain FORWARD ( Policy ACCEPT)

target prot opt ​​source destination

REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)

target prot opt ​​source destination

Chain f2b-NoAuthFailures (1 references)

target prot opt ​​source destination

REJECT all -- 64.68.50.128 anywhere reject-with icmp -port-unreachable

REJECT all -- 104.194.26.205 anywhere reject-with icmp-port-unreachable

RETURN all -- anywhere anywhere

How to remove from Fail2ban IP

# iptables -D f2b-NoAuthFailures -s banned_ip -j REJECT

The above is how the CentOS system removes IP from the Fail2ban blacklist. The IP address is removed from the Fail2ban blacklist. After the removal, it will be lifted. IP restrictions on server access.

Copyright © Windows knowledge All Rights Reserved