FAIL2BAN - Filter.d - http-401
From IT-Arts.net
! Should be customized to your needs !
Filter.d
# Fail2Ban filter for HTTP 401 Unauthorized errors
[Definition]
# Match 401 errors on POST and GET requests with URL patterns that suggest protected resources (e.g., /admin/, /api/)
failregex = ^<HOST> - - \[.*\] "POST /.* HTTP/.*" 401
^<HOST> - - \[.*\] "GET /.* HTTP/.*" 401
ignoreregex =
Jail.conf
enabled = true banaction = %(banaction_allports)s logpath = /var/log/nginx/*access*.log maxretry = 11 findtime = 3d backend = polling
