Subversion Repositories configs

Rev

Rev 3 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 - 1
# Fail2Ban configuration file
2
#
6 - 3
# Author: Russell Odom <russ@gloomytrousers.co.uk>, Daniel Black
3 - 4
# Sends a complaint e-mail to addresses listed in the whois record for an
5
# offending IP address.
6 - 6
# This uses the https://abusix.com/contactdb.html to lookup abuse contacts.
3 - 7
#
6 - 8
# DEPENDANCIES:
9
# This requires the dig command from bind-utils
10
#
3 - 11
# You should provide the <logpath> in the jail config - lines from the log
12
# matching the given IP address will be provided in the complaint as evidence.
13
#
14
# WARNING
15
# -------
16
#
17
# Please do not use this action unless you are certain that fail2ban
18
# does not result in "false positives" for your deployment.  False
19
# positive reports could serve a mis-favor to the original cause by
20
# flooding corresponding contact addresses, and complicating the work
21
# of administration personnel responsible for handling (verified) legit
22
# complains.
23
#
24
# Please consider using e.g. sendmail-whois-lines.conf action which
25
# would send the reports with relevant information to you, so the
26
# report could be first reviewed and then forwarded to a corresponding
27
# contact if legit.
28
#
29
 
30
 
31
[Definition]
32
 
33
# Option:  actionstart
34
# Notes.:  command executed once at the start of Fail2Ban.
35
# Values:  CMD
36
#
37
actionstart =
38
 
39
# Option:  actionstop
40
# Notes.:  command executed once at the end of Fail2Ban
41
# Values:  CMD
42
#
43
actionstop =
44
 
45
# Option:  actioncheck
46
# Notes.:  command executed once before each actionban command
47
# Values:  CMD
48
#
49
actioncheck =
50
 
51
# Option:  actionban
52
# Notes.:  command executed when banning an IP. Take care that the
53
#          command is executed with Fail2Ban user rights.
54
# Tags:    See jail.conf(5) man page
55
# Values:  CMD
56
#
6 - 57
actionban = oifs=${IFS}; IFS=.;SEP_IP=( <ip> ); set -- ${SEP_IP}; ADDRESSES=$(dig +short -t txt -q $4.$3.$2.$1.abuse-contacts.abusix.org); IFS=${oifs}
3 - 58
	    IP=<ip>
59
            if [ ! -z "$ADDRESSES" ]; then
6 - 60
                (printf %%b "<message>\n"; date '+Note: Local timezone is %%z (%%Z)'; grep -E '(^|[^0-9])<ip>([^0-9]|$)' <logpath>) | <mailcmd> "Abuse from <ip>" <mailargs> ${ADDRESSES//,/\" \"}
3 - 61
            fi
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]
6 - 72
message = Dear Sir/Madam,\n\nWe have detected abuse from the IP address $IP, which according to a abusix.com is on your network. We would appreciate if you would investigate and take action as appropriate.\n\nLog lines are given below, but please ask if you require any further information.\n\n(If you are not the correct person to contact about this please accept our apologies - your e-mail address was extracted from the whois record by an automated process.)\n\n This mail was generated by Fail2Ban.\nThe recipient address of this report was provided by the Abuse Contact DB by abusix.com. abusix.com does not maintain the content of the database. All information which we pass out, derives from the RIR databases and is processed for ease of use. If you want to change or report non working abuse contacts please contact the appropriate RIR. If you have any further question, contact abusix.com directly via email (info@abusix.com). Information about the Abuse Contact Database can be found here: https://abusix.com/global-reporting/abuse-contact-db\nabusix.com is neither responsible nor liable for the content or accuracy of this message.\n
3 - 73
 
74
# Path to the log files which contain relevant lines for the abuser IP
75
#
76
logpath = /dev/null
77
 
78
# Option:  mailcmd
79
# Notes.:  Your system mail command. Is passed 2 args: subject and recipient
80
# Values:  CMD
81
#
82
mailcmd = mail -s
83
 
84
# Option:  mailargs
85
# Notes.:  Additional arguments to mail command. e.g. for standard Unix mail:
86
#          CC reports to another address:
87
#              -c me@example.com
88
#          Appear to come from a different address - the '--' indicates
89
#          arguments to be passed to Sendmail:
90
#              -- -f me@example.com
91
# Values:  [ STRING ]
92
#
93
mailargs =
94