2007-01-08 21:40:37 +00:00
|
|
|
# Fail2Ban configuration file
|
|
|
|
#
|
|
|
|
# Author: Cyril Jaquier
|
|
|
|
# Copied from iptables.conf and modified by Yaroslav Halchenko
|
2014-01-07 04:38:52 +00:00
|
|
|
# to fulfill the needs of bugreporter dbts#350746.
|
2007-01-08 21:40:37 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
|
2013-05-07 21:52:08 +00:00
|
|
|
[INCLUDES]
|
|
|
|
|
2014-06-18 10:04:57 +00:00
|
|
|
before = iptables-common.conf
|
2013-05-07 21:52:08 +00:00
|
|
|
|
2007-01-08 21:40:37 +00:00
|
|
|
[Definition]
|
|
|
|
|
|
|
|
# Option: actionstart
|
2018-09-12 14:00:40 +00:00
|
|
|
# Notes.: command executed on demand at the first ban (or at the start of Fail2Ban if actionstart_on_demand is set to false).
|
2007-01-08 21:40:37 +00:00
|
|
|
# Values: CMD
|
|
|
|
#
|
2015-07-24 01:38:10 +00:00
|
|
|
actionstart = <iptables> -N f2b-<name>
|
|
|
|
<iptables> -A f2b-<name> -j <returntype>
|
|
|
|
<iptables> -I <chain> -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
|
2007-01-08 21:40:37 +00:00
|
|
|
|
2008-03-04 22:41:28 +00:00
|
|
|
# Option: actionstop
|
2018-09-12 14:00:40 +00:00
|
|
|
# Notes.: command executed at the stop of jail (or at the end of Fail2Ban)
|
2007-01-08 21:40:37 +00:00
|
|
|
# Values: CMD
|
|
|
|
#
|
2015-07-24 01:38:10 +00:00
|
|
|
actionstop = <iptables> -D <chain> -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
|
2017-03-29 21:20:43 +00:00
|
|
|
<actionflush>
|
2015-07-24 01:38:10 +00:00
|
|
|
<iptables> -X f2b-<name>
|
2007-01-08 21:40:37 +00:00
|
|
|
|
|
|
|
# Option: actioncheck
|
|
|
|
# Notes.: command executed once before each actionban command
|
|
|
|
# Values: CMD
|
|
|
|
#
|
2015-07-24 01:38:10 +00:00
|
|
|
actioncheck = <iptables> -n -L <chain> | grep -q 'f2b-<name>[ \t]'
|
2007-01-08 21:40:37 +00:00
|
|
|
|
|
|
|
# Option: actionban
|
|
|
|
# Notes.: command executed when banning an IP. Take care that the
|
|
|
|
# command is executed with Fail2Ban user rights.
|
2013-03-16 23:52:49 +00:00
|
|
|
# Tags: See jail.conf(5) man page
|
2007-01-08 21:40:37 +00:00
|
|
|
# Values: CMD
|
|
|
|
#
|
2015-07-24 01:38:10 +00:00
|
|
|
actionban = <iptables> -I f2b-<name> 1 -s <ip> -j <blocktype>
|
2007-01-08 21:40:37 +00:00
|
|
|
|
|
|
|
# Option: actionunban
|
|
|
|
# Notes.: command executed when unbanning an IP. Take care that the
|
|
|
|
# command is executed with Fail2Ban user rights.
|
2013-03-16 23:52:49 +00:00
|
|
|
# Tags: See jail.conf(5) man page
|
2007-01-08 21:40:37 +00:00
|
|
|
# Values: CMD
|
|
|
|
#
|
2015-07-24 01:38:10 +00:00
|
|
|
actionunban = <iptables> -D f2b-<name> -s <ip> -j <blocktype>
|
2007-01-08 21:40:37 +00:00
|
|
|
|
|
|
|
[Init]
|
|
|
|
|