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
|
|
|
|
|
|
|
[Definition]
|
|
|
|
|
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
|
|
|
|
# this filter 'recidive', or supply another name with `filter = recidive[_jailname="jail"]`
|
2012-01-26 22:33:01 +00:00
|
|
|
_jailname = recidive
|
|
|
|
|
2018-03-09 12:56:38 +00:00
|
|
|
failregex = ^%(__prefix_line)s(?:\s*fail2ban\.actions\s*%(__pid_re)s?:\s+)?NOTICE\s+\[(?!%(_jailname)s\])(?:.*)\]\s+Ban\s+<HOST>\s*$
|
2013-05-09 23:15:07 +00:00
|
|
|
|
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
|
|
|
|
2014-03-15 13:29:44 +00:00
|
|
|
journalmatch = _SYSTEMD_UNIT=fail2ban.service PRIORITY=5
|
2013-11-02 04:59:05 +00:00
|
|
|
|
2013-10-30 13:02:59 +00:00
|
|
|
# Author: Tom Hendrikx, modifications by Amir Caspi
|