Subversion Repositories configs

Rev

Rev 4 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 34
Line 6... Line 6...
6
#
6
#
7
#
7
#
8
 
8
 
9
[INCLUDES]
9
[INCLUDES]
10
 
10
 
11
before = iptables-blocktype.conf
11
before = iptables-common.conf
12
 
12
 
13
 
13
 
14
[Definition]
14
[Definition]
15
 
15
 
16
# Option:  actionstart
16
# Option:  actionstart
17
# Notes.:  command executed once at the start of Fail2Ban.
17
# Notes.:  command executed once at the start of Fail2Ban.
18
# Values:  CMD
18
# Values:  CMD
19
#
19
#
20
actionstart = iptables -N fail2ban-<name>
20
actionstart = iptables -N f2b-<name>
21
              iptables -A fail2ban-<name> -j RETURN
21
              iptables -A f2b-<name> -j RETURN
22
              iptables -I <chain> -p <protocol> -j fail2ban-<name>
22
              iptables -I <chain> -p <protocol> -j f2b-<name>
23
 
23
 
24
# Option:  actionstop
24
# Option:  actionstop
25
# Notes.:  command executed once at the end of Fail2Ban
25
# Notes.:  command executed once at the end of Fail2Ban
26
# Values:  CMD
26
# Values:  CMD
27
#
27
#
28
actionstop = iptables -D <chain> -p <protocol> -j fail2ban-<name>
28
actionstop = iptables -D <chain> -p <protocol> -j f2b-<name>
29
             iptables -F fail2ban-<name>
29
             iptables -F f2b-<name>
30
             iptables -X fail2ban-<name>
30
             iptables -X f2b-<name>
31
 
31
 
32
# Option:  actioncheck
32
# Option:  actioncheck
33
# Notes.:  command executed once before each actionban command
33
# Notes.:  command executed once before each actionban command
34
# Values:  CMD
34
# Values:  CMD
35
#
35
#
36
actioncheck = iptables -n -L <chain> | grep -q 'fail2ban-<name>[ \t]'
36
actioncheck = iptables -n -L <chain> | grep -q 'f2b-<name>[ \t]'
37
 
37
 
38
# Option:  actionban
38
# Option:  actionban
39
# Notes.:  command executed when banning an IP. Take care that the
39
# Notes.:  command executed when banning an IP. Take care that the
40
#          command is executed with Fail2Ban user rights.
40
#          command is executed with Fail2Ban user rights.
41
# Tags:    See jail.conf(5) man page
41
# Tags:    See jail.conf(5) man page
42
# Values:  CMD
42
# Values:  CMD
43
#
43
#
44
actionban = iptables -I fail2ban-<name> 1 -s <ip> -j <blocktype>
44
actionban = iptables -I f2b-<name> 1 -s <ip> -j <blocktype>
45
 
45
 
46
# Option:  actionunban
46
# Option:  actionunban
47
# Notes.:  command executed when unbanning an IP. Take care that the
47
# Notes.:  command executed when unbanning an IP. Take care that the
48
#          command is executed with Fail2Ban user rights.
48
#          command is executed with Fail2Ban user rights.
49
# Tags:    See jail.conf(5) man page
49
# Tags:    See jail.conf(5) man page
50
# Values:  CMD
50
# Values:  CMD
51
#
51
#
52
actionunban = iptables -D fail2ban-<name> -s <ip> -j <blocktype>
52
actionunban = iptables -D f2b-<name> -s <ip> -j <blocktype>
53
 
53
 
54
[Init]
54
[Init]
55
 
55
 
56
# Default name of the chain
-
 
57
#
-
 
58
name = default
-
 
59
 
-
 
60
# Option:  protocol
-
 
61
# Notes.:  internally used by config reader for interpolations.
-
 
62
# Values:  [ tcp | udp | icmp | all ] Default: tcp
-
 
63
#
-
 
64
protocol = tcp
-
 
65
 
-
 
66
# Option:  chain
-
 
67
# Notes    specifies the iptables chain to which the fail2ban rules should be
-
 
68
#          added
-
 
69
# Values:  STRING  Default: INPUT
-
 
70
chain = INPUT
-