• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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