From 31abe6f37cb2265d577d358e78a342b205536ae7 Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Wed, 26 Oct 2005 21:45:37 +0000 Subject: [PATCH] - Added "fwcheck", "reinittime" and "maxreinits" - Added "
" in email git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@203 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- config/fail2ban.conf.default | 45 ++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/config/fail2ban.conf.default b/config/fail2ban.conf.default index a8c8f80d..e2c29567 100644 --- a/config/fail2ban.conf.default +++ b/config/fail2ban.conf.default @@ -85,6 +85,21 @@ cmdend = # polltime = 1 +# Option: reinittime +# Notes.: minimal number of seconds between the re-initialization of +# firewalls due to external changes in their rules (see fwcheck) +# Values: NUM Default: 100 +# +reinittime = 10 + +# Option: maxreinits +# Notes.: maximal number of re-initialization of firewalls due to external +# changes. -1 stays for infinite, so only reinittime is of importance +# Values: NUM Default: -1 +# +maxreinits = -1 + + [MAIL] # Option: enabled # Notes.: enable mail notification when banning an IP address. @@ -119,16 +134,18 @@ to = root # Option: subject # Notes.: subject of the e-mail. -# Tags: IP address +# Tags:
active section (eg ssh, apache, etc) +# IP address # number of failures # unix timestamp of the last failure -# Values: TEXT Default: [Fail2Ban] Banned +# Values: TEXT Default: [Fail2Ban]
: Banned # -subject = [Fail2Ban] Banned +subject = [Fail2Ban]
: Banned # Option: message # Notes.: message of the e-mail. -# Tags: IP address +# Tags:
active section (eg ssh, apache, etc) +# IP address # number of failures # unix timestamp of the last failure #
new line @@ -136,7 +153,7 @@ subject = [Fail2Ban] Banned # message = Hi,
The IP has just been banned by Fail2Ban after - attempts.
+ attempts against
.
Regards,
Fail2Ban @@ -145,6 +162,7 @@ message = Hi,
# options: logfile, fwban, fwunban, timeregex, timepattern, # failregex. + [Apache] # Option: enabled # Notes.: enable monitoring for this section. @@ -171,9 +189,15 @@ fwstart = iptables -N fail2ban-http # Values: CMD Default: # fwend = iptables -D INPUT -p tcp --dport http -j fail2ban-http - iptables -D fail2ban-http -j RETURN + iptables -F fail2ban-http iptables -X fail2ban-http +# Option: fwcheck +# Notes.: command executed once before each fwban command +# Values: CMD Default: +# +fwcheck = iptables -L INPUT | grep -q fail2ban-http + # Option: fwban # Notes.: command executed when banning an IP. Take care that the # command is executed with Fail2Ban user rights. @@ -217,6 +241,7 @@ timepattern = %%a %%b %%d %%H:%%M:%%S %%Y # failregex = authentication failure|user .* not found + [SSH] # Option: enabled # Notes.: enable monitoring for this section. @@ -243,9 +268,15 @@ fwstart = iptables -N fail2ban-ssh # Values: CMD Default: # fwend = iptables -D INPUT -p tcp --dport ssh -j fail2ban-ssh - iptables -D fail2ban-ssh -j RETURN + iptables -F fail2ban-ssh iptables -X fail2ban-ssh +# Option: fwcheck +# Notes.: command executed once before each fwban command +# Values: CMD Default: +# +fwcheck = iptables -L INPUT | grep -q fail2ban-ssh + # Option: fwbanrule # Notes.: command executed when banning an IP. Take care that the # command is executed with Fail2Ban user rights.