Hello,
I installed Fail2ban on the server and added the following settings in the jail.local
file to protect Nginx:
[nginx-common]
enabled = true
port = http,https
filter = nginx-common
logpath = /var/log/nginx/access.log
maxretry = 5
findtime = 600
bantime = 48h
In the filter.d
directory, I also created a file called nginx-common.conf
with the following contents:
[Definition]
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).*$
ignoreregex =
Fail2ban blocks a number of IP addresses, including mine, for no reason. Why?
Thank you.