First commit to filter/jails Fail2ban

This commit is contained in:
Yuri-Lima
2025-09-01 13:09:39 +02:00
parent 16c737c816
commit c1ce709c41
11 changed files with 166 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
[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?))".*$