I'm running Fail2ban on a Raspberry Pi 3 with Buster. Fail2ban version v0.10.2. One applicaton on it is running a simple python HTTP server script.
I'm trying to match this kind of record from the log file:
Dec 4 07:50:00 Pi-New HTTP_Server[585]: 123.456.789.123 - - [04/Dec/2022 07:50:00] code 400, message Bad request version ('\xc0\x13\xc0')
I have tried numerous regex lines. These are the latest lines, all without success
1. '^.*\]: <HOST> - - .* 400, $'
2. "^.*\]: <HOST> - - \[\+0000\].* 400, $"
The latter when I read a posting that fail2ban deletes out the date section before passing to the regex line
The output from fail2ban-regex is always like this:
Running tests
Use failregex line : ^.]: - - [+0000]. 400, $ Use
single line : Dec 4 07:50:00 Pi-New HTTP_Server[585]:...
Results
Failregex: 0 total
Ignoreregex: 0 total
Date template hits: |- [# of hits] date format | [1] {^LN-BEG}(?:DAY
)?MON Day %k:Minute:Second(?:.Microseconds)?(?: ExYear)? `-
Lines: 1 lines, 0 ignored, 0 matched, 1 missed [processed in 0.03 sec]
|- Missed line(s): | Dec 4 07:50:00 Pi-New
HTTP_Server[585]: 123.456.789.123 - - [04/Dec/2022 07:50:00] code 400,
message Bad request version ('\xc0\x13\xc0')
which seems to indicate that it found the date but after that did not find any matches. What am I doing wrong?...RDK