Subversion Repositories configs

Rev

Rev 5 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
# Fail2Ban configuration file
2
#
3
# Author: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
4
#
5
#
6
 
7
[INCLUDES]
8
 
9
before = iptables-blocktype.conf
10
 
11
 
12
[Definition]
13
 
14
# Option:  actionstart
15
# Notes.:  command executed once at the start of Fail2Ban.
16
# Values:  CMD
17
#
18
# Changing iptables rules requires root privileges. If fail2ban is
19
# configured to run as root, firewall setup can be performed by
20
# fail2ban automatically. However, if fail2ban is configured to run as
21
# a normal user, the configuration must be done by some other means
22
# (e.g. using static firewall configuration with the
23
# iptables-persistent package).
24
#
25
# Explanation of the rule below:
26
#    Check if any packets coming from an IP on the fail2ban-<name>
27
#    list have been seen in the last 3600 seconds. If yes, update the
28
#    timestamp for this IP and drop the packet. If not, let the packet
29
#    through.
30
#
31
#    Fail2ban inserts blacklisted hosts into the fail2ban-<name> list
32
#    and removes them from the list after some time, according to its
33
#    own rules. The 3600 second timeout is independent and acts as a
34
#    safeguard in case the fail2ban process dies unexpectedly. The
35
#    shorter of the two timeouts actually matters.
36
actionstart = iptables -I INPUT -m recent --update --seconds 3600 --name fail2ban-<name> -j <blocktype>
37
 
38
# Option:  actionstop
39
# Notes.:  command executed once at the end of Fail2Ban
40
# Values:  CMD
41
#
42
actionstop = echo / > /proc/net/xt_recent/fail2ban-<name>
43
 
44
# Option:  actioncheck
45
# Notes.:  command executed once before each actionban command
46
# Values:  CMD
47
#
48
actioncheck = test -e /proc/net/xt_recent/fail2ban-<name>
49
 
50
# Option:  actionban
51
# Notes.:  command executed when banning an IP. Take care that the
52
#          command is executed with Fail2Ban user rights.
53
# Tags:    See jail.conf(5) man page
54
# Values:  CMD
55
#
56
actionban = echo +<ip> > /proc/net/xt_recent/fail2ban-<name>
57
 
58
# Option:  actionunban
59
# Notes.:  command executed when unbanning an IP. Take care that the
60
#          command is executed with Fail2Ban user rights.
61
# Tags:    See jail.conf(5) man page
62
# Values:  CMD
63
#
64
actionunban = echo -<ip> > /proc/net/xt_recent/fail2ban-<name>
65
 
66
[Init]
67
 
68
# Default name of the chain
69
#
70
name = default
71
 
72
# Option:  protocol
73
# Notes.:  internally used by config reader for interpolations.
74
# Values:  [ tcp | udp | icmp | all ] Default: tcp
75
#
76
protocol = tcp