add fail2ban scripts

This commit is contained in:
RaineAllDay
2026-03-18 04:22:42 -06:00
parent 968fd69eb1
commit c3d9c52129
4 changed files with 115 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
[Definition]
# Match lines from nginx access log with 4xx/5xx responses
# Nginx combined log format:
# 1.2.3.4 - - [18/Mar/2026:09:45:00 +0000] "GET /backend/config/default.yml HTTP/1.1" 404 ...
failregex = ^<HOST> .+ "(GET|POST|HEAD|PUT|DELETE|OPTIONS|PATCH) .+ HTTP/\d\.\d" 40[0-9] .+$
^<HOST> .+ "(GET|POST|HEAD|PUT|DELETE|OPTIONS|PATCH) .+ HTTP/\d\.\d" 5[0-9]{2} .+$
ignoreregex =