CentOS下使用Fail2ban来禁止指定IP访问的方法

2020-01-30 14:51:10丽君

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

从 Fail2ban 中移除 IP

复制代码
# iptables -D f2b-NoAuthFailures -s banned_ip -j REJECT