Skip to main content

Fail2ban

nano -w /etc/fail2ban/jail.local
[nginx-bad-request]
enabled = true
port     = http,https
filter   = nginx-bad-request
logpath  = %(nginx_error_log)s

[nginx-botsearch]
enabled = true
port     = http,https
filter   = nginx-botsearch
logpath  = %(nginx_access_log)s

[nginx-forbidden]
enabled = true
port     = http,https
filter   = nginx-forbidden
logpath  = %(nginx_access_log)s

[nginx-http-auth]
enabled = true
port     = http,https
filter   = nginx-http-auth
logpath  = %(nginx_error_log)s

[nginx-limit-req]
enabled = true
port     = http,https
filter   = nginx-limit-req
logpath  = %(nginx_error_log)s