Hi Antonio Volpe,
such issues can appear, when your website coding is inadequate and leads to missing images, non-existent links and so on.
But to inform you, it is NOT the "recidive" jail, which is blocking IPs for "bad behaviour" of your visitor - it's for example the jail "apache-nohome.conf", with failregex - expressions, as for example:
Code:
...
failregex = ^%(_apache_error_client)s (AH00128: )?File does not exist: .*/~.*
ignoreregex =
...
Example:
Let's assume, that you coded your website to serve "favicon", with the URL "https//
www.YOUR-DOMAIN.COM/favicon.ico", but your icon is not existent at this URL, then visitors will get punished for this inadequate coding, because YOU directed them with your website - code to ask for a icon at the above path, but each time your visitor request the file, your webserver doesn't serve the icon with the answer "
File does not exist" ( Pls. see your domain - specific log - files for such issues/problems/errors - so you can correct your inadequate coding! ).
As you can see, Fail2Ban doesn't do anything wrong here, it just bans IPs, with the filters, that YOU define.
The "recidive" - jail just bans "returning" IPs, so when Fail2Ban recognizes a returning IP, which get banned again and again, then it will ban this specific IP for a longer time now ( as defined in your jail! ). The "recidive" - jail monitors your "fail2ban.log" and not any webserver - log - files.