1# Fail2Ban configuration file 2# 3# Author: Cyril Jaquier 4# 5# 6 7[INCLUDES] 8 9before = sendmail-common.conf 10 mail-whois-common.conf 11 helpers-common.conf 12 13[Definition] 14 15# bypass ban/unban for restored tickets 16norestored = 1 17 18# Option: actionban 19# Notes.: command executed when banning an IP. Take care that the 20# command is executed with Fail2Ban user rights. 21# Tags: See jail.conf(5) man page 22# Values: CMD 23# 24actionban = ( printf %%b "Subject: [Fail2Ban] <name>: banned <ip> from <fq-hostname> 25 Date: `LC_ALL=C date +"%%a, %%d %%h %%Y %%T %%z"` 26 From: <sendername> <<sender>> 27 To: <dest>\n 28 Hi,\n 29 The IP <ip> has just been banned by Fail2Ban after 30 <failures> attempts against <name>.\n\n 31 Here is more information about <ip> :\n" 32 %(_whois_command)s; 33 printf %%b "\nLines containing failures of <ip> (max <grepmax>)\n"; 34 %(_grep_logs)s; 35 printf %%b "\n 36 Regards,\n 37 Fail2Ban" ) | <mailcmd> 38 39[Init] 40 41# Default name of the chain 42# 43name = default 44 45# Path to the log files which contain relevant lines for the abuser IP 46# 47logpath = /dev/null 48 49# Number of log lines to include in the email 50# 51#grepmax = 1000 52#grepopts = -m <grepmax> 53