fail2ban 如何手动设置,求解答
我使用fail2ban可以自动封ip (当然,这是正常的)自动封ip的时候iptables例如是这样:
iptables -L
Chain fail2ban-httpd (2 references)
target prot opt source destination
DROP all--192.168.2.137 anywhere
RETURN all--anywhere anywhere
RETURN all--anywhere anywhere
我现在需要手动添加封锁的ip
我查看fail2ban-client的帮助,有这样两条:
set <JAIL> bantime <TIME> sets the number of seconds <TIME>
a host will be banned for <JAIL>
set <JAIL> banip <IP> manually Ban <IP> for <JAIL>
fail2ban-client set apache-access-2 banip 192.168.2.137 bantime 10或者 fail2ban-client set apache-access-2 banip 192.168.2.137
执行以上命令iptables并没有规则,没有生效,还是可以访问。
(命令中的apache-access-2是fail.conf内的一个规则,已经确定可以使用没有问题)
求解答,谢谢
页:
[1]