解决方案:使用CIDR错误地设置了ignoreip中的IP范围。应该是192.168.2.0/24,而不是192.168.2.1/32。
原始员额:
另一用户也有一个类似的问题,它是由相互冲突的ignoreip造成的(jail.local的ignoreip代替jail.conf的)。然而,我所使用的唯一不光彩的是jail.local中的一个,而且我根本没有编辑过jail.conf,所以用户的解决方案不适用于我。
我在jail.local中做了以下更改:
87c87 &32;#ignoreself = true -> ignoreself = true 92c92 < #ignoreip =192.168.2.0/255 -> ignoreip = 192.168.2.1/32::1 101c101 < bantime = 10m --> bantime =-1 stackline208c208stackackNewaction=iptables -=iptables
所有这些更改都在默认设置块中。
我已经多次>sudo /etc/init.d/fail2ban重新启动‘’ed‘,>sudo关闭-r 0'd也多次。尽管如此,每次我尝试从192.168.2.13开始故意失败ssh登录时,在5次尝试之后,IP就会被阻塞。在此之后,我必须使用>sudo故障2ban-客户端集sshd unbanip 192.168.2.13手动取消它。
2021-08-20 21:43:57,190 fail2ban.jail 1703年:INFO监狱'sshd‘启动 2021-08-20 21:44:04,082 fail2ban.filter 1703年:INFO sshd找到192.168.2.13 - 2021-08-20 21:44:03 2021-08-20 :44:05,792 fail2ban.filter 1703年:INFO sshd05 2021-08-20 21:44:10,357 fail2ban.filter 1703年:INFO sshd发现192.168.2.13 - 2021-08-20 :44:09 2021-08-20 :44:15 fail2ban.filter 1703年:INFO sshd Found 192.168.2.13 - 2021-08-20 21:15 2021-20 21:44:19 166 fail2ban.filter 1703年:INFO sshd发现192.168.2.13 - 2021-08-20 21:44:19 2021-08-20 21:44:19,216 fail2ban.actions 1703年:sshd Ban192.168.2.13
复制jail.local (与适当的不光彩等)因为jail.conf也不起作用。
有什么想法吗?
发布于 2021-08-21 15:15:50
忽略192.168.2.1/32将意味着您将忽略该IP单独。但在日志中,您已经显示您禁止192.168.2.13。我觉得你做错了。我觉得你的卑鄙行为应该是
ignoreip = 192.168.2.13/32 ::1https://serverfault.com/questions/1075257
复制相似问题