| 3 |
- |
1 |
# Fail2Ban configuration file
|
|
|
2 |
#
|
|
|
3 |
# Author: Cyril Jaquier
|
|
|
4 |
# Copied from iptables.conf and modified by Yaroslav Halchenko
|
| 6 |
- |
5 |
# to fulfill the needs of bugreporter dbts#350746.
|
| 3 |
- |
6 |
#
|
|
|
7 |
#
|
|
|
8 |
|
|
|
9 |
[INCLUDES]
|
|
|
10 |
|
| 33 |
- |
11 |
before = iptables-common.conf
|
| 3 |
- |
12 |
|
|
|
13 |
[Definition]
|
|
|
14 |
|
|
|
15 |
# Option: actionstart
|
|
|
16 |
# Notes.: command executed once at the start of Fail2Ban.
|
|
|
17 |
# Values: CMD
|
|
|
18 |
#
|
| 33 |
- |
19 |
actionstart = iptables -N f2b-<name>
|
|
|
20 |
iptables -A f2b-<name> -j RETURN
|
|
|
21 |
iptables -I <chain> -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
|
| 3 |
- |
22 |
|
|
|
23 |
# Option: actionstop
|
|
|
24 |
# Notes.: command executed once at the end of Fail2Ban
|
|
|
25 |
# Values: CMD
|
|
|
26 |
#
|
| 33 |
- |
27 |
actionstop = iptables -D <chain> -m state --state NEW -p <protocol> --dport <port> -j f2b-<name>
|
|
|
28 |
iptables -F f2b-<name>
|
|
|
29 |
iptables -X f2b-<name>
|
| 3 |
- |
30 |
|
|
|
31 |
# Option: actioncheck
|
|
|
32 |
# Notes.: command executed once before each actionban command
|
|
|
33 |
# Values: CMD
|
|
|
34 |
#
|
| 33 |
- |
35 |
actioncheck = iptables -n -L <chain> | grep -q 'f2b-<name>[ \t]'
|
| 3 |
- |
36 |
|
|
|
37 |
# Option: actionban
|
|
|
38 |
# Notes.: command executed when banning an IP. Take care that the
|
|
|
39 |
# command is executed with Fail2Ban user rights.
|
|
|
40 |
# Tags: See jail.conf(5) man page
|
|
|
41 |
# Values: CMD
|
|
|
42 |
#
|
| 33 |
- |
43 |
actionban = iptables -I f2b-<name> 1 -s <ip> -j <blocktype>
|
| 3 |
- |
44 |
|
|
|
45 |
# Option: actionunban
|
|
|
46 |
# Notes.: command executed when unbanning an IP. Take care that the
|
|
|
47 |
# command is executed with Fail2Ban user rights.
|
|
|
48 |
# Tags: See jail.conf(5) man page
|
|
|
49 |
# Values: CMD
|
|
|
50 |
#
|
| 33 |
- |
51 |
actionunban = iptables -D f2b-<name> -s <ip> -j <blocktype>
|
| 3 |
- |
52 |
|
|
|
53 |
[Init]
|
|
|
54 |
|