Subversion Repositories configs

Rev

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

Rev 3 Rev 33
Line 17... Line 17...
17
#
17
#
18
# Debian wheezy and above uses protocol 6
18
# Debian wheezy and above uses protocol 6
19
 
19
 
20
[INCLUDES]
20
[INCLUDES]
21
 
21
 
22
before = iptables-blocktype.conf
22
before = iptables-common.conf
23
 
23
 
24
[Definition]
24
[Definition]
25
 
25
 
26
# Option:  actionstart
26
# Option:  actionstart
27
# Notes.:  command executed once at the start of Fail2Ban.
27
# Notes.:  command executed once at the start of Fail2Ban.
28
# Values:  CMD
28
# Values:  CMD
29
#
29
#
30
actionstart = ipset --create fail2ban-<name> iphash
30
actionstart = ipset --create f2b-<name> iphash
31
              iptables -I INPUT -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j <blocktype>
31
              iptables -I <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
32
 
32
 
33
# Option:  actionstop
33
# Option:  actionstop
34
# Notes.:  command executed once at the end of Fail2Ban
34
# Notes.:  command executed once at the end of Fail2Ban
35
# Values:  CMD
35
# Values:  CMD
36
#
36
#
37
actionstop = iptables -D INPUT -p <protocol> -m multiport --dports <port> -m set --match-set fail2ban-<name> src -j <blocktype>
37
actionstop = iptables -D <chain> -p <protocol> -m multiport --dports <port> -m set --match-set f2b-<name> src -j <blocktype>
38
             ipset --flush fail2ban-<name>
38
             ipset --flush f2b-<name>
39
             ipset --destroy fail2ban-<name>
39
             ipset --destroy f2b-<name>
40
 
40
 
41
# Option:  actionban
41
# Option:  actionban
42
# Notes.:  command executed when banning an IP. Take care that the
42
# Notes.:  command executed when banning an IP. Take care that the
43
#          command is executed with Fail2Ban user rights.
43
#          command is executed with Fail2Ban user rights.
44
# Tags:    See jail.conf(5) man page
44
# Tags:    See jail.conf(5) man page
45
# Values:  CMD
45
# Values:  CMD
46
#
46
#
47
actionban = ipset --test fail2ban-<name> <ip> ||  ipset --add fail2ban-<name> <ip>
47
actionban = ipset --test f2b-<name> <ip> ||  ipset --add f2b-<name> <ip>
48
 
48
 
49
# Option:  actionunban
49
# Option:  actionunban
50
# Notes.:  command executed when unbanning an IP. Take care that the
50
# Notes.:  command executed when unbanning an IP. Take care that the
51
#          command is executed with Fail2Ban user rights.
51
#          command is executed with Fail2Ban user rights.
52
# Tags:    See jail.conf(5) man page
52
# Tags:    See jail.conf(5) man page
53
# Values:  CMD
53
# Values:  CMD
54
#
54
#
55
actionunban = ipset --test fail2ban-<name> <ip> && ipset --del fail2ban-<name> <ip>
55
actionunban = ipset --test f2b-<name> <ip> && ipset --del f2b-<name> <ip>
56
 
56
 
57
[Init]
57
[Init]
58
 
58
 
59
# Default name of the ipset
-
 
60
#
-
 
61
name = default
-
 
62
 
-
 
63
# Option:  port
-
 
64
# Notes.:  specifies port to monitor
-
 
65
# Values:  [ NUM | STRING ]  Default: ssh
-
 
66
#
-
 
67
port = ssh
-
 
68
 
-
 
69
# Option:  protocol
-
 
70
# Notes.:  internally used by config reader for interpolations.
-
 
71
# Values:  [ tcp | udp | icmp | all ] Default: tcp
-
 
72
#
-
 
73
protocol = tcp
-