Closed
Description
Description
The provided fail2ban configuration is outdated and does not work. The format of the access log has apparently been changed.
This is what an entry on the access log looks like:
Failed login attempt {"remoteAddress":"::ffff:127.0.0.1","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0","timestamp":1573554454}
This does not match with the fail regex provided in the sample fail2ban configuration:
failregex = ^INFO\s+Failed login attempt\s+{\"password\":\"(\\.|[^"])*\",\"remoteAddress\":\"<HOST>\"
datepattern = "timestamp":{EPOCH}}$
I have attempted to modify the fail regex for the new log format but have not been able to get the syntax correct. My regex is the following:
failregex=^Failed login attempt {\"remoteAddress\":\"<HOST>\"
datepattern = "timestamp":{EPOCH}}$
I am unable to get a match when testing with fail2ban-regex.
Metadata
Metadata
Assignees
Labels
No labels