mirror of https://github.com/fail2ban/fail2ban
Load logpath only after findtime is configured
When new log paths are configured, their start offset is immediately determined by a filter searching for (now - findTime). But, since findTime is configured *after* the log is loaded and searched, logs are only searched back by the default 10 minute findTime, regardless of user configuration of jail settings. So, findTime must be configured before logpath or else the default findtime is used, which ignores any findtime time defined by the user. This fixes new reads on startup for actual log files. The systemd filter always performed as expected due to being setup after the jail's findtime config submission.pull/2173/head
parent
857d6954c4
commit
00a0e98041
|
@ -90,12 +90,12 @@ class JailReader(ConfigReader):
|
|||
opts1st = [["bool", "enabled", False],
|
||||
["string", "filter", ""]]
|
||||
opts = [["bool", "enabled", False],
|
||||
["string", "logpath", None],
|
||||
["string", "logtimezone", None],
|
||||
["string", "logencoding", None],
|
||||
["string", "backend", "auto"],
|
||||
["int", "maxretry", None],
|
||||
["string", "findtime", None],
|
||||
["string", "logpath", None],
|
||||
["string", "logtimezone", None],
|
||||
["string", "logencoding", None],
|
||||
["string", "bantime", None],
|
||||
["string", "usedns", None], # be sure usedns is before all regex(s) in stream
|
||||
["string", "failregex", None],
|
||||
|
|
Loading…
Reference in New Issue