fail2ban变更iptables封禁策略为DROP

2017/12/11 23:07:13      点击:
fail2ban的默认iptables封禁策略为 REJECT --reject-with icmp-port-unreachable
在/etc/fail2ban/action.d/目录下创建文件 iptables-blocktype.local

[Init]
blocktype = DROP

重启fail2ban服务后,iptables封禁策略变更为DROP

另外一个方法就是
vi /etc/fail2ban/action.d/iptables-multiport.conf 
修改:blocktype = REJECT –reject-with icmp-port-unreachable (可以注释掉) 
blocktype = DROP

解锁特定的IP地址
fail2ban-client set ssh-iptables unbanip xx.xx.xx.xx(替换成IP地址)