i am trying to get a regex for an ical service on my host working without success. This is a part of the logfile:
Tue Jul 23 13:55:23 2019: ical|T720] [info ] Accepted connection from [::ffff:2.3.4.5]:56450
Tue Jul 23 13:55:23 2019: [net/[::ffff:5.6|T5234] [error ] HrLogon server "http://localhost:123/" user "Admin": logon failed
Tue Jul 23 13:55:23 2019: [net/[::ffff:5.6|T5234] [warning] Login failed (0x80040111 logon failed), resending authentication request
Tue Jul 23 13:55:23 2019: [net/[::ffff:5.6|T5234] [notice ] [::ffff:5.61.48.194]:56450 - Admin [23/Jul/2019:13:55:23 +0200] "GET / HTTP/1.1" 401 0 "-" "Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1"
Tue Jul 23 13:55:23 2019: [net/[::ffff:5.6|T5234] [info ] Connection closed
This is the part of the log file and i tried already different things to get this into a filter. The important parts are "Login failed" and in the next line the part with the IP. But how can i get this working? Any help would be great!!!
Thanks in advance
icey
Actual configs looking like: ical.conf:
[INCLUDES]
before = common.conf
[Definition]
failregex = ^*Login failed\n^.*\[notice \] \[::ffff:<HOST>\]$
ignoreregex =
[Init]
maxlines = 2
and the jail conf:
[ical]
enabled = false
port = 8443
filter = kopano-ical
logpath = /var/log/ical.log
maxtetry = 3
bantime = 3600
I believe your regex is not correct. You're missing dot (.) at the beginning right after ^
, .*
before \n
and since you used $
and the end you need to put .*
before $
, ]
is not the last character.
failregex = ^.*Login failed.*\n^.*\[notice \] \[::ffff:<HOST>\].*$
User contributions licensed under CC BY-SA 3.0