From 63403bc7fb63464e1e5a88814f9aeaf886d33822 Mon Sep 17 00:00:00 2001 From: lostcontrol Date: Mon, 12 Feb 2007 21:50:50 +0000 Subject: [PATCH] - Added new filter for spam bots - Added new action for buffered mails git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@549 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- CHANGELOG | 1 + MANIFEST | 1 + config/action.d/mail-buffered.conf | 88 +++++++++++++++++++++++++++++ config/filter.d/apache-badbots.conf | 25 ++++++++ config/jail.conf | 13 +++++ 5 files changed, 128 insertions(+) create mode 100644 config/action.d/mail-buffered.conf create mode 100644 config/filter.d/apache-badbots.conf diff --git a/CHANGELOG b/CHANGELOG index a113b396..0590250f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,7 @@ Fail2Ban (version 0.7.7) 2007/02/08 ver. 0.?.? (2007/??/??) - ??? ---------- - Fixed asctime pattern in datedetector.py +- Added new filters/actions. Thanks to Yaroslav Halchenko ver. 0.7.7 (2007/02/08) - release candidate ---------- diff --git a/MANIFEST b/MANIFEST index 28edae13..d49b19bc 100644 --- a/MANIFEST +++ b/MANIFEST @@ -78,6 +78,7 @@ config/action.d/ipfw.conf config/action.d/mail-whois.conf config/action.d/mail-whois-lines.conf config/action.d/mail.conf +config/action.d/mail-buffered.conf config/action.d/hostsdeny.conf config/action.d/shorewall.conf config/fail2ban.conf diff --git a/config/action.d/mail-buffered.conf b/config/action.d/mail-buffered.conf new file mode 100644 index 00000000..6be60a63 --- /dev/null +++ b/config/action.d/mail-buffered.conf @@ -0,0 +1,88 @@ +# Fail2Ban configuration file +# +# Author: Cyril Jaquier +# +# $Revision: 510 $ +# + +[Definition] + +# Option: actionstart +# Notes.: command executed once at the start of Fail2Ban. +# Values: CMD +# +actionstart = echo -en "Hi,\n + The jail has been started successfuly.\n + Output will be buffered until lines are available.\n + Regards,\n + Fail2Ban"|mail -s "[Fail2Ban] : started" + +# Option: actionend +# Notes.: command executed once at the end of Fail2Ban +# Values: CMD +# +actionstop = if [ -d ]; then + echo -en "Hi,\n + These hosts have been banned by Fail2Ban.\n + `cat ` + Regards,\n + Fail2Ban"|mail -s "[Fail2Ban] : Summary" + rm + fi + echo -en "Hi,\n + The jail has been stopped.\n + Regards,\n + Fail2Ban"|mail -s "[Fail2Ban] : stopped" + +# Option: actioncheck +# Notes.: command executed once before each actionban command +# Values: CMD +# +actioncheck = + +# Option: actionban +# Notes.: command executed when banning an IP. Take care that the +# command is executed with Fail2Ban user rights. +# Tags: IP address +# number of failures +#