Does Fail2ban work properly?
Briefly

The Fail2ban configuration for Nginx can lead to accidental bans due to overly permissive or incorrect regex patterns in custom filters. The current patterns, which include common web application vulnerabilities, may match legitimate traffic, causing your IP to be incorrectly flagged and banned. To solve this issue, it is essential to refine the regex definitions in the nginx-common.conf file to prevent false positives, ensuring that only malicious activity triggers Fail2ban's banning mechanism for IP addresses.
failregex = ^<HOST> -.*GET.*(\.php|\.asp|\.exe|\.pl|\.cgi|\.scgi) ^<HOST> -.*(wp-login|xmlrpc).*php.*^<HOST> -.*(HTTP/1\\.1|HTTP/1\\.0|HTTP/2).*(404|403|400).*$ This regular expression may be too broad or improperly formatted.
Fail2ban is a powerful tool, but improper filtering rules can lead to false positives, causing legitimate users to be banned mistakenly.
Read at SitePoint Forums | Web Development & Design Community
[
|
]