Files
selfhosted/fail2ban/filter.d/http-get-dos.conf

8 lines
499 B
Plaintext

[Definition]
# Count lots of requests from same IP regardless of status code.
# Prefer X-Forwarded-For (client IP behind proxy), fallback to remote_addr.
failregex = ^.*"x_forwarded_for":"<HOST>".*"(GET|POST|HEAD)".*$
^.*"remote_addr":"<HOST>".*"(GET|POST|HEAD)".*$
# Ignore health and stub_status hits
ignoreregex = ^.*"request_uri":"\/(?:stub_status|health\/system|health\/worker|pgadmin4(?:\/|$)|\.well-known\/acme-challenge\/|.*\.(?:css|js|png|jpg|jpeg|gif|svg|ico|webp|woff2?))".*$