mirror of https://github.com/fail2ban/fail2ban
padding with space, prefregex, regex review (simplifying, capture user name, consider possible space char in user name)
parent
2367ad115c
commit
ec4e0dd65b
|
@ -6,15 +6,16 @@ before = apache-common.conf
|
|||
[Definition]
|
||||
|
||||
# patterns: [Mon Mar 28 16:50:49.522240 2016] [:error] [pid 1795] [client 10.1.1.1:50700] WAR [Login denied for user "username1"], referer: https://zoneminder/
|
||||
# [Sun Mar 28 16:53:00.472693 2021] [php7:notice] [pid 11328] [client 10.1.1.1:39568] ERR [Could not retrieve user test details], referer: https://zm/
|
||||
# [Sun Mar 28 16:59:14.150625 2021] [php7:notice] [pid 11336] [client 10.1.1.1:39654] ERR [Login denied for user "john"], referer: https://zm/
|
||||
# [Sun Mar 28 16:53:00.472693 2021] [php7:notice] [pid 11328] [client 10.1.1.1:39568] ERR [Could not retrieve user test details], referer: https://zm/
|
||||
# [Sun Mar 28 16:59:14.150625 2021] [php7:notice] [pid 11336] [client 10.1.1.1:39654] ERR [Login denied for user "john"], referer: https://zm/
|
||||
#
|
||||
# Option: failregex
|
||||
# Notes.: regex to match the login failure and non-existent user error messages in the logfile.
|
||||
|
||||
failregex = ^%(_apache_error_client)s WAR \[Login denied for user "[^"]*"\]
|
||||
^%(_apache_error_client)s ERR \[Login denied for user "[^"]*"\]
|
||||
^%(_apache_error_client)s ERR \[Could not retrieve user \w* details\]
|
||||
prefregex = ^%(_apache_error_client)s (?:ERR|WAR) <F-CONTENT>\[(?:Login denied|Could not retrieve).*</F-CONTENT>$
|
||||
|
||||
failregex = ^\[Login denied for user "<F-USER>[^"]*</F-USER>"\]
|
||||
^\[Could not retrieve user <F-USER>\S*</F-USER>
|
||||
|
||||
ignoreregex =
|
||||
|
||||
|
|
Loading…
Reference in New Issue