• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Resolved Fail2Ban is ignoring maxretry/ ip found after ban

KarleyLo

New Pleskian
We are Blocking a Bruteforce with Fail2Ban and i discovered that sometimes the IPs are not blocked after the maxretry or the IP is found after ban.

We have set the maxretry to 3 :

[ssh]
enabled = true
filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp]
iptables-allports[chain="INPUT", name="default", port="ssh", protocol="tcp", blocktype="REJECT --reject-with icmp-port-unreachable", returntype="RETURN", lockingopt="-w", iptables="iptables <lockingopt>"]
logpath = /var/log/secure
maxretry = 3

but when i check the logs i can see that sometime, the same ip is found more than 3 times :

/var/log/fail2ban.log:
ban1.PNG

grep "Failed pass" /var/log/secure:
ban2.PNG

Can someone help us with this?
 
Regarding @Brujo 's comment: It is correct that in this case Fail2Ban simply isn't fast enough to block the IP before it exceeds the set limit. No worries about that. Simply leave your configuraton as it is.

Regarding the "WARNING" message: If your system is not using Fail2Ban version 0.10 or new that can utilize ip6tables to block IPv6 attacks, it is strongly recommended to disable IPv6 altogether on the system, because else attacks can be launched successfully using an IPv6 route. These will never be blocked by the normal Fail2Ban and iptables.
 
Back
Top