docs(ops): note caddy epoch ts datepattern in fail2ban filter
This commit is contained in:
@@ -43,6 +43,9 @@ action = iptables-multiport[name=vesti, port="http,https", protocol=tcp]
|
|||||||
failregex = ^.*"remote_ip":"<HOST>".*"status":401.*$
|
failregex = ^.*"remote_ip":"<HOST>".*"status":401.*$
|
||||||
^.*"remote_ip":"<HOST>".*"method":"POST","host":"vesti\.nixg\.ru","uri":"/login".*"status":302.*"Location":\["/login\?error=1"\].*$
|
^.*"remote_ip":"<HOST>".*"method":"POST","host":"vesti\.nixg\.ru","uri":"/login".*"status":302.*"Location":\["/login\?error=1"\].*$
|
||||||
ignoreregex =
|
ignoreregex =
|
||||||
|
# Caddy пишет ts как epoch с дробной частью; без datepattern fail2ban брал «сейчас»
|
||||||
|
# и писал `Found a match but no valid date/time found` на КАЖДОЕ совпадение.
|
||||||
|
datepattern = ^\{"level":"[^"]*","ts":{EPOCH}
|
||||||
```
|
```
|
||||||
Важно: 401-строка от Caddy не содержит `"method":"POST"...` — общий префикс только `remote_ip`;
|
Важно: 401-строка от Caddy не содержит `"method":"POST"...` — общий префикс только `remote_ip`;
|
||||||
порядок полей в JSON-логе стабилен (`level`, `ts`, `logger`, `msg`, `request{remote_ip,...}`), это
|
порядок полей в JSON-логе стабилен (`level`, `ts`, `logger`, `msg`, `request{remote_ip,...}`), это
|
||||||
|
|||||||
Reference in New Issue
Block a user