Files
selfhosted/fail2ban/filter.d/nginx-4xx.conf

6 lines
373 B
Plaintext

[Definition]
# Match either x_forwarded_for (preferred) or remote_addr
failregex = ^.*"x_forwarded_for":"<HOST>".*"status":4\d\d.*$
^.*"remote_addr":"<HOST>".*"status":4\d\d.*$
ignoreregex = ^.*"request_uri":"\/(?:stub_status|health\/system|health\/worker|pgadmin4(?:\/|$)|\.well-known\/acme-challenge\/|.*\.(?:css|js|png|jpg|jpeg|gif|svg|ico|webp|woff2?))".*$