| 3 |
- |
1 |
# Fail2Ban configuration file
|
|
|
2 |
#
|
|
|
3 |
# Author: Cyril Jaquier
|
|
|
4 |
#
|
|
|
5 |
#
|
|
|
6 |
|
|
|
7 |
[INCLUDES]
|
|
|
8 |
|
|
|
9 |
before = sendmail-common.conf
|
|
|
10 |
|
|
|
11 |
[Definition]
|
|
|
12 |
|
|
|
13 |
# Option: actionstart
|
|
|
14 |
# Notes.: command executed once at the start of Fail2Ban.
|
|
|
15 |
# Values: CMD
|
|
|
16 |
#
|
|
|
17 |
actionstart = printf %%b "Subject: [Fail2Ban] <name>: started on `uname -n`
|
|
|
18 |
Date: `LC_TIME=C date -u +"%%a, %%d %%h %%Y %%T +0000"`
|
|
|
19 |
From: <sendername> <<sender>>
|
|
|
20 |
To: <dest>\n
|
|
|
21 |
Hi,\n
|
|
|
22 |
The jail <name> has been started successfully.\n
|
|
|
23 |
Regards,\n
|
|
|
24 |
Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest>
|
|
|
25 |
|
|
|
26 |
# Option: actionstop
|
|
|
27 |
# Notes.: command executed once at the end of Fail2Ban
|
|
|
28 |
# Values: CMD
|
|
|
29 |
#
|
|
|
30 |
actionstop = printf %%b "Subject: [Fail2Ban] <name>: stopped on `uname -n`
|
|
|
31 |
Date: `LC_TIME=C date -u +"%%a, %%d %%h %%Y %%T +0000"`
|
|
|
32 |
From: <sendername> <<sender>>
|
|
|
33 |
To: <dest>\n
|
|
|
34 |
Hi,\n
|
|
|
35 |
The jail <name> has been stopped.\n
|
|
|
36 |
Regards,\n
|
|
|
37 |
Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest>
|
|
|
38 |
|
|
|
39 |
# Option: actioncheck
|
|
|
40 |
# Notes.: command executed once before each actionban command
|
|
|
41 |
# Values: CMD
|
|
|
42 |
#
|
|
|
43 |
actioncheck =
|
|
|
44 |
|
|
|
45 |
# Option: actionban
|
|
|
46 |
# Notes.: command executed when banning an IP. Take care that the
|
|
|
47 |
# command is executed with Fail2Ban user rights.
|
|
|
48 |
# Tags: See jail.conf(5) man page
|
|
|
49 |
# Values: CMD
|
|
|
50 |
#
|
|
|
51 |
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from `uname -n`
|
|
|
52 |
Date: `LC_TIME=C date -u +"%%a, %%d %%h %%Y %%T +0000"`
|
|
|
53 |
From: <sendername> <<sender>>
|
|
|
54 |
To: <dest>\n
|
|
|
55 |
Hi,\n
|
|
|
56 |
The IP <ip> has just been banned by Fail2Ban after
|
|
|
57 |
<failures> attempts against <name>.\n\n
|
| 6 |
- |
58 |
Here is more information about <ip>:\n
|
|
|
59 |
`/usr/bin/whois <ip> || echo missing whois program`\n
|
| 3 |
- |
60 |
Regards,\n
|
|
|
61 |
Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest>
|
|
|
62 |
|
|
|
63 |
# Option: actionunban
|
|
|
64 |
# Notes.: command executed when unbanning an IP. Take care that the
|
|
|
65 |
# command is executed with Fail2Ban user rights.
|
|
|
66 |
# Tags: See jail.conf(5) man page
|
|
|
67 |
# Values: CMD
|
|
|
68 |
#
|
|
|
69 |
actionunban =
|
|
|
70 |
|
|
|
71 |
[Init]
|
|
|
72 |
|
|
|
73 |
# Default name of the chain
|
|
|
74 |
#
|
|
|
75 |
name = default
|
|
|
76 |
|