192 |
- |
1 |
# Fail2Ban configuration file
|
|
|
2 |
#
|
|
|
3 |
# Author: Cyril Jaquier
|
|
|
4 |
# Modified: Yaroslav O. Halchenko <debian@onerussian.com>
|
|
|
5 |
# made active on all ports from original iptables.conf
|
|
|
6 |
#
|
|
|
7 |
#
|
|
|
8 |
|
|
|
9 |
[INCLUDES]
|
|
|
10 |
|
|
|
11 |
before = iptables-common.conf
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
[Definition]
|
|
|
15 |
|
|
|
16 |
# Option: actionstart
|
|
|
17 |
# Notes.: command executed on demand at the first ban (or at the start of Fail2Ban if actionstart_on_demand is set to false).
|
|
|
18 |
# Values: CMD
|
|
|
19 |
#
|
|
|
20 |
actionstart = <iptables> -N f2b-<name>
|
|
|
21 |
<iptables> -A f2b-<name> -j <returntype>
|
|
|
22 |
<iptables> -I <chain> -p <protocol> -j f2b-<name>
|
|
|
23 |
|
|
|
24 |
# Option: actionstop
|
|
|
25 |
# Notes.: command executed at the stop of jail (or at the end of Fail2Ban)
|
|
|
26 |
# Values: CMD
|
|
|
27 |
#
|
|
|
28 |
actionstop = <iptables> -D <chain> -p <protocol> -j f2b-<name>
|
|
|
29 |
<actionflush>
|
|
|
30 |
<iptables> -X f2b-<name>
|
|
|
31 |
|
|
|
32 |
# Option: actioncheck
|
|
|
33 |
# Notes.: command executed once before each actionban command
|
|
|
34 |
# Values: CMD
|
|
|
35 |
#
|
|
|
36 |
actioncheck = <iptables> -n -L <chain> | grep -q 'f2b-<name>[ \t]'
|
|
|
37 |
|
|
|
38 |
# Option: actionban
|
|
|
39 |
# Notes.: command executed when banning an IP. Take care that the
|
|
|
40 |
# command is executed with Fail2Ban user rights.
|
|
|
41 |
# Tags: See jail.conf(5) man page
|
|
|
42 |
# Values: CMD
|
|
|
43 |
#
|
|
|
44 |
actionban = <iptables> -I f2b-<name> 1 -s <ip> -j <blocktype>
|
|
|
45 |
|
|
|
46 |
# Option: actionunban
|
|
|
47 |
# Notes.: command executed when unbanning an IP. Take care that the
|
|
|
48 |
# command is executed with Fail2Ban user rights.
|
|
|
49 |
# Tags: See jail.conf(5) man page
|
|
|
50 |
# Values: CMD
|
|
|
51 |
#
|
|
|
52 |
actionunban = <iptables> -D f2b-<name> -s <ip> -j <blocktype>
|
|
|
53 |
|
|
|
54 |
[Init]
|
|
|
55 |
|