Subversion Repositories configs

Rev

Rev 4 | Rev 34 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
# Fail2Ban configuration file
2
#
3
# Author: Cyril Jaquier
4
# Copied from iptables.conf and modified by Yaroslav Halchenko
5 - 5
#  to fulfill the needs of bugreporter dbts#350746.
4 - 6
#
7
#
8
 
9
[INCLUDES]
10
 
11
before = iptables-blocktype.conf
12
 
13
 
14
[Definition]
15
 
16
# Option:  actionstart
17
# Notes.:  command executed once at the start of Fail2Ban.
18
# Values:  CMD
19
#
20
actionstart = iptables -N fail2ban-<name>
21
              iptables -A fail2ban-<name> -j RETURN
22
              iptables -I <chain> -m state --state NEW -p <protocol> --dport <port> -j fail2ban-<name>
23
 
24
# Option:  actionstop
25
# Notes.:  command executed once at the end of Fail2Ban
26
# Values:  CMD
27
#
28
actionstop = iptables -D <chain> -m state --state NEW -p <protocol> --dport <port> -j fail2ban-<name>
29
             iptables -F fail2ban-<name>
30
             iptables -X fail2ban-<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 'fail2ban-<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 fail2ban-<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 fail2ban-<name> -s <ip> -j <blocktype>
53
 
54
[Init]
55
 
56
# Default name of the chain
57
#
58
name = default
59
 
60
# Option:  port
61
# Notes.:  specifies port to monitor
62
# Values:  [ NUM | STRING ]  Default:
63
#
64
port = ssh
65
 
66
# Option:  protocol
67
# Notes.:  internally used by config reader for interpolations.
68
# Values:  [ tcp | udp | icmp | all ] Default: tcp
69
#
70
protocol = tcp
71
 
72
# Option:  chain
73
# Notes    specifies the iptables chain to which the fail2ban rules should be
74
#          added
75
# Values:  STRING  Default: INPUT
76
chain = INPUT