Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 1
# Fail2Ban configuration file
2
#
3
# Author: Daniel Black
4
#
5
# This is for ipset protocol 4 (ipset v4.2). If you have a later version
6
# of ipset try to use the iptables-ipset-proto6.conf as it does some things
7
# nicer.
8
#
9
# This requires the program ipset which is normally in package called ipset.
10
#
11
# IPset was a feature introduced in the linux kernel 2.6.39 and 3.0.0 kernels.
12
#
13
# If you are running on an older kernel you make need to patch in external
14
# modules. Debian squeeze can do this with:
15
#   apt-get install xtables-addons-source
16
#   module-assistant auto-install xtables-addons
17
#
18
# Debian wheezy and above uses protocol 6
19
 
20
[INCLUDES]
21
 
22
before = iptables-common.conf
23
 
24
[Definition]
25
 
26
# Option:  actionstart
27
# Notes.:  command executed on demand at the first ban (or at the start of Fail2Ban if actionstart_on_demand is set to false).
28
# Values:  CMD
29
#
30
actionstart = ipset --create f2b-<name> iphash
31
              <iptables> -I <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
32
 
33
 
34
# Option:  actionflush
35
# Notes.:  command executed once to flush IPS, by shutdown (resp. by stop of the jail or this action)
36
# Values:  CMD
37
#
38
actionflush = ipset --flush f2b-<name>
39
 
40
# Option:  actionstop
41
# Notes.:  command executed at the stop of jail (or at the end of Fail2Ban)
42
# Values:  CMD
43
#
44
actionstop = <iptables> -D <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
45
             <actionflush>
46
             ipset --destroy f2b-<name>
47
 
48
# Option:  actionban
49
# Notes.:  command executed when banning an IP. Take care that the
50
#          command is executed with Fail2Ban user rights.
51
# Tags:    See jail.conf(5) man page
52
# Values:  CMD
53
#
54
actionban = ipset --test f2b-<name> <ip> ||  ipset --add f2b-<name> <ip>
55
 
56
# Option:  actionunban
57
# Notes.:  command executed when unbanning an IP. Take care that the
58
#          command is executed with Fail2Ban user rights.
59
# Tags:    See jail.conf(5) man page
60
# Values:  CMD
61
#
62
actionunban = ipset --test f2b-<name> <ip> && ipset --del f2b-<name> <ip>
63
 
64
[Init]
65