2013-10-30 13:02:59 +00:00
|
|
|
# Fail2Ban filter for repeat bans
|
2012-01-26 22:33:01 +00:00
|
|
|
#
|
|
|
|
# This filter monitors the fail2ban log file, and enables you to add long
|
|
|
|
# time bans for ip addresses that get banned by fail2ban multiple times.
|
2013-10-30 13:02:59 +00:00
|
|
|
#
|
2012-01-26 22:33:01 +00:00
|
|
|
# Reasons to use this: block very persistent attackers for a longer time,
|
|
|
|
# stop receiving email notifications about the same attacker over and
|
|
|
|
# over again.
|
|
|
|
#
|
|
|
|
# This jail is only useful if you set the 'findtime' and 'bantime' parameters
|
|
|
|
# in jail.conf to a higher value than the other jails. Also, this jail has its
|
|
|
|
# drawbacks, namely in that it works only with iptables, or if you use a
|
|
|
|
# different blocking mechanism for this jail versus others (e.g. hostsdeny
|
|
|
|
# for most jails, and shorewall for this one).
|
2013-09-15 15:22:42 +00:00
|
|
|
|
|
|
|
[INCLUDES]
|
|
|
|
|
|
|
|
# Read common prefixes. If any customizations available -- read them from
|
|
|
|
# common.local
|
|
|
|
before = common.conf
|
2012-01-26 22:33:01 +00:00
|
|
|
|
2024-03-11 16:49:06 +00:00
|
|
|
[DEFAULT]
|
2012-01-26 22:33:01 +00:00
|
|
|
|
2018-03-09 12:56:38 +00:00
|
|
|
_daemon = (?:fail2ban(?:-server|\.actions)\s*)
|
2013-09-15 15:22:42 +00:00
|
|
|
|
2018-03-09 12:56:38 +00:00
|
|
|
# The name of the jail that this filter is used for. In jail.conf, name the jail using
|
2024-06-21 11:24:46 +00:00
|
|
|
# this filter 'recidive', or supply another name with `filter = recidive[_jailname="jail"]`,
|
|
|
|
# default all jails excepting recidive
|
|
|
|
_jailname = (?!recidive\])[^\]]*
|
2012-01-26 22:33:01 +00:00
|
|
|
|
2024-06-21 11:24:46 +00:00
|
|
|
failregex = ^%(__prefix_line)s(?:\s*fail2ban\.actions\s*%(__pid_re)s?:\s+)?NOTICE\s+\[<_jailname>\]\s+Ban\s+<HOST>
|
2024-03-11 16:49:06 +00:00
|
|
|
|
|
|
|
[lt_short]
|
|
|
|
_daemon = (?:fail2ban(?:-server|\.actions)?\s*)
|
2024-06-21 11:24:46 +00:00
|
|
|
failregex = ^%(__prefix_line)s(?:\s*fail2ban(?:\.actions)?\s*%(__pid_re)s?:\s+)?(?:NOTICE\s+)?\[<_jailname>\]\s+Ban\s+<HOST>
|
2013-05-09 23:15:07 +00:00
|
|
|
|
2024-03-11 16:49:06 +00:00
|
|
|
[lt_journal]
|
|
|
|
_daemon = <lt_short/_daemon>
|
|
|
|
failregex = <lt_short/failregex>
|
|
|
|
|
|
|
|
[Definition]
|
|
|
|
|
|
|
|
_daemon = <lt_<logtype>/_daemon>
|
|
|
|
failregex = <lt_<logtype>/failregex>
|
|
|
|
|
2018-03-09 12:56:38 +00:00
|
|
|
datepattern = ^{DATE}
|
2014-11-12 10:05:56 +00:00
|
|
|
|
2018-03-09 12:56:38 +00:00
|
|
|
ignoreregex =
|
2013-05-09 23:15:07 +00:00
|
|
|
|
2024-03-10 09:56:35 +00:00
|
|
|
journalmatch = _SYSTEMD_UNIT=fail2ban.service
|
2013-11-02 04:59:05 +00:00
|
|
|
|
2013-10-30 13:02:59 +00:00
|
|
|
# Author: Tom Hendrikx, modifications by Amir Caspi
|