| 3 |
- |
1 |
# Fail2Ban configuration file
|
|
|
2 |
#
|
|
|
3 |
# Author: Cyril Jaquier
|
|
|
4 |
# Edited for cross platform by: James Stout, Yaroslav Halchenko and Daniel Black
|
|
|
5 |
#
|
|
|
6 |
#
|
|
|
7 |
|
|
|
8 |
[Definition]
|
|
|
9 |
|
|
|
10 |
# Option: actionstart
|
|
|
11 |
# Notes.: command executed once at the start of Fail2Ban.
|
|
|
12 |
# Values: CMD
|
|
|
13 |
#
|
|
|
14 |
actionstart =
|
|
|
15 |
|
|
|
16 |
# Option: actionstop
|
|
|
17 |
# Notes.: command executed once at the end of Fail2Ban
|
|
|
18 |
# Values: CMD
|
|
|
19 |
#
|
|
|
20 |
actionstop =
|
|
|
21 |
|
|
|
22 |
# Option: actioncheck
|
|
|
23 |
# Notes.: command executed once before each actionban command
|
|
|
24 |
# Values: CMD
|
|
|
25 |
#
|
|
|
26 |
actioncheck =
|
|
|
27 |
|
|
|
28 |
# Option: actionban
|
|
|
29 |
# Notes.: command executed when banning an IP. Take care that the
|
|
|
30 |
# command is executed with Fail2Ban user rights.
|
|
|
31 |
# Tags: See jail.conf(5) man page
|
|
|
32 |
# Values: CMD
|
|
|
33 |
#
|
|
|
34 |
actionban = IP=<ip> &&
|
|
|
35 |
printf %%b "<daemon_list>: $IP\n" >> <file>
|
|
|
36 |
|
|
|
37 |
# Option: actionunban
|
|
|
38 |
# Notes.: command executed when unbanning an IP. Take care that the
|
|
|
39 |
# command is executed with Fail2Ban user rights.
|
|
|
40 |
# Tags: See jail.conf(5) man page
|
|
|
41 |
# Values: CMD
|
|
|
42 |
#
|
|
|
43 |
actionunban = echo "/^<daemon_list>: <ip>$/<br>d<br>w<br>q" | ed <file>
|
|
|
44 |
|
|
|
45 |
[Init]
|
|
|
46 |
|
|
|
47 |
# Option: file
|
|
|
48 |
# Notes.: hosts.deny file path.
|
|
|
49 |
# Values: STR Default: /etc/hosts.deny
|
|
|
50 |
#
|
|
|
51 |
file = /etc/hosts.deny
|
|
|
52 |
|
|
|
53 |
# Option: daemon_list
|
|
|
54 |
# Notes: The list of services that this action will deny. See the man page
|
|
|
55 |
# for hosts.deny/hosts_access. Default is all services.
|
|
|
56 |
# Values: STR Default: ALL
|
|
|
57 |
daemon_list = ALL
|