| 192 |
- |
1 |
# Fail2Ban configuration file
|
|
|
2 |
#
|
|
|
3 |
# Author: Viktor Szépe
|
|
|
4 |
#
|
|
|
5 |
#
|
|
|
6 |
|
|
|
7 |
[INCLUDES]
|
|
|
8 |
|
|
|
9 |
before = sendmail-common.conf
|
|
|
10 |
helpers-common.conf
|
|
|
11 |
|
|
|
12 |
[Definition]
|
|
|
13 |
|
|
|
14 |
# bypass ban/unban for restored tickets
|
|
|
15 |
norestored = 1
|
|
|
16 |
|
|
|
17 |
# Option: actionban
|
|
|
18 |
# Notes.: Command executed when banning an IP. Take care that the
|
|
|
19 |
# command is executed with Fail2Ban user rights.
|
|
|
20 |
# You need to install geoiplookup and the GeoLite or GeoIP databases.
|
|
|
21 |
# (geoip-bin and geoip-database in Debian)
|
|
|
22 |
# The host command comes from bind9-host package.
|
|
|
23 |
# Tags: See jail.conf(5) man page
|
|
|
24 |
# Values: CMD
|
|
|
25 |
#
|
|
|
26 |
actionban = ( printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from <fq-hostname>
|
|
|
27 |
Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"`
|
|
|
28 |
From: <sendername> <<sender>>
|
|
|
29 |
To: <dest>\n
|
|
|
30 |
Hi,\n
|
|
|
31 |
The IP <ip> has just been banned by Fail2Ban after
|
|
|
32 |
<failures> attempts against <name>.\n\n
|
|
|
33 |
Here is more information about <ip> :\n
|
|
|
34 |
http://bgp.he.net/ip/<ip>
|
|
|
35 |
http://www.projecthoneypot.org/ip_<ip>
|
|
|
36 |
http://whois.domaintools.com/<ip>\n\n
|
|
|
37 |
Country:`geoiplookup -f /usr/share/GeoIP/GeoIP.dat "<ip>" | cut -d':' -f2-`
|
|
|
38 |
AS:`geoiplookup -f /usr/share/GeoIP/GeoIPASNum.dat "<ip>" | cut -d':' -f2-`
|
|
|
39 |
hostname: <ip-host>\n\n
|
|
|
40 |
Lines containing failures of <ip> (max <grepmax>)\n";
|
|
|
41 |
%(_grep_logs)s;
|
|
|
42 |
printf %%b "\n
|
|
|
43 |
Regards,\n
|
|
|
44 |
Fail2Ban" ) | <mailcmd>
|
|
|
45 |
|
|
|
46 |
[Init]
|
|
|
47 |
|
|
|
48 |
# Default name of the chain
|
|
|
49 |
#
|
|
|
50 |
name = default
|
|
|
51 |
|
|
|
52 |
# Path to the log files which contain relevant lines for the abuser IP
|
|
|
53 |
#
|
|
|
54 |
logpath = /dev/null
|
|
|
55 |
|
|
|
56 |
# Number of log lines to include in the email
|
|
|
57 |
#
|
|
|
58 |
#grepmax = 1000
|
|
|
59 |
#grepopts = -m <grepmax>
|