mirror of https://github.com/fail2ban/fail2ban
- Replaced "echo" with "printf" in actions. Fix #1839673
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_8@660 a942ae1a-1317-0410-a47c-b1dcaea8d605_tent/ipv6_via_aInfo
parent
331ae7155a
commit
0afa6fb2be
|
@ -37,6 +37,7 @@ ver. 0.8.2 (2008/??/??) - stable
|
||||||
fail2ban.conf.
|
fail2ban.conf.
|
||||||
- Added Mac OS/X startup script. Thanks to Bill Heaton.
|
- Added Mac OS/X startup script. Thanks to Bill Heaton.
|
||||||
- Absorbed some Debian patches. Thanks to Yaroslav Halchenko.
|
- Absorbed some Debian patches. Thanks to Yaroslav Halchenko.
|
||||||
|
- Replaced "echo" with "printf" in actions. Fix #1839673
|
||||||
|
|
||||||
ver. 0.8.1 (2007/08/14) - stable
|
ver. 0.8.1 (2007/08/14) - stable
|
||||||
----------
|
----------
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstart = touch /tmp/fail2ban.dummy
|
actionstart = touch /tmp/fail2ban.dummy
|
||||||
echo "<init>" >> /tmp/fail2ban.dummy
|
printf %%b "<init>\n" >> /tmp/fail2ban.dummy
|
||||||
|
|
||||||
# Option: actionstop
|
# Option: actionstop
|
||||||
# Notes.: command executed once at the end of Fail2Ban
|
# Notes.: command executed once at the end of Fail2Ban
|
||||||
|
@ -34,7 +34,7 @@ actioncheck =
|
||||||
# <time> unix timestamp of the ban time
|
# <time> unix timestamp of the ban time
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = echo "+<ip>" >> /tmp/fail2ban.dummy
|
actionban = printf %%b "+<ip>\n" >> /tmp/fail2ban.dummy
|
||||||
|
|
||||||
# Option: actionunban
|
# Option: actionunban
|
||||||
# Notes.: command executed when unbanning an IP. Take care that the
|
# Notes.: command executed when unbanning an IP. Take care that the
|
||||||
|
@ -44,7 +44,7 @@ actionban = echo "+<ip>" >> /tmp/fail2ban.dummy
|
||||||
# <time> unix timestamp of the ban time
|
# <time> unix timestamp of the ban time
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionunban = echo "-<ip>" >> /tmp/fail2ban.dummy
|
actionunban = printf %%b "-<ip>\n" >> /tmp/fail2ban.dummy
|
||||||
|
|
||||||
[Init]
|
[Init]
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ actioncheck =
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = IP=<ip> &&
|
actionban = IP=<ip> &&
|
||||||
echo "ALL: $IP" >> <file>
|
printf %%b "ALL: $IP\n" >> <file>
|
||||||
|
|
||||||
# Option: actionunban
|
# Option: actionunban
|
||||||
# Notes.: command executed when unbanning an IP. Take care that the
|
# Notes.: command executed when unbanning an IP. Take care that the
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Notes.: command executed once at the start of Fail2Ban.
|
# Notes.: command executed once at the start of Fail2Ban.
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstart = echo -en "Hi,\n
|
actionstart = printf %%b "Hi,\n
|
||||||
The jail <name> has been started successfully.\n
|
The jail <name> has been started successfully.\n
|
||||||
Output will be buffered until <lines> lines are available.\n
|
Output will be buffered until <lines> lines are available.\n
|
||||||
Regards,\n
|
Regards,\n
|
||||||
|
@ -22,14 +22,14 @@ actionstart = echo -en "Hi,\n
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstop = if [ -f <tmpfile> ]; then
|
actionstop = if [ -f <tmpfile> ]; then
|
||||||
echo -en "Hi,\n
|
printf %%b "Hi,\n
|
||||||
These hosts have been banned by Fail2Ban.\n
|
These hosts have been banned by Fail2Ban.\n
|
||||||
`cat <tmpfile>`
|
`cat <tmpfile>`
|
||||||
Regards,\n
|
Regards,\n
|
||||||
Fail2Ban"|mail -s "[Fail2Ban] <name>: Summary" <dest>
|
Fail2Ban"|mail -s "[Fail2Ban] <name>: Summary" <dest>
|
||||||
rm <tmpfile>
|
rm <tmpfile>
|
||||||
fi
|
fi
|
||||||
echo -en "Hi,\n
|
printf %%b "Hi,\n
|
||||||
The jail <name> has been stopped.\n
|
The jail <name> has been stopped.\n
|
||||||
Regards,\n
|
Regards,\n
|
||||||
Fail2Ban"|mail -s "[Fail2Ban] <name>: stopped" <dest>
|
Fail2Ban"|mail -s "[Fail2Ban] <name>: stopped" <dest>
|
||||||
|
@ -48,10 +48,10 @@ actioncheck =
|
||||||
# <time> unix timestamp of the ban time
|
# <time> unix timestamp of the ban time
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = echo `date`": <ip> (<failures> failures)" >> <tmpfile>
|
actionban = printf %%b "`date`: <ip> (<failures> failures)\n" >> <tmpfile>
|
||||||
LINE=$( wc -l <tmpfile> | awk '{ print $1 }' )
|
LINE=$( wc -l <tmpfile> | awk '{ print $1 }' )
|
||||||
if [ $LINE -eq <lines> ]; then
|
if [ $LINE -eq <lines> ]; then
|
||||||
echo -en "Hi,\n
|
printf %%b "Hi,\n
|
||||||
These hosts have been banned by Fail2Ban.\n
|
These hosts have been banned by Fail2Ban.\n
|
||||||
`cat <tmpfile>`
|
`cat <tmpfile>`
|
||||||
\nRegards,\n
|
\nRegards,\n
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Notes.: command executed once at the start of Fail2Ban.
|
# Notes.: command executed once at the start of Fail2Ban.
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstart = echo -en "Hi,\n
|
actionstart = printf %%b "Hi,\n
|
||||||
The jail <name> has been started successfully.\n
|
The jail <name> has been started successfully.\n
|
||||||
Regards,\n
|
Regards,\n
|
||||||
Fail2Ban"|mail -s "[Fail2Ban] <name>: started" <dest>
|
Fail2Ban"|mail -s "[Fail2Ban] <name>: started" <dest>
|
||||||
|
@ -20,7 +20,7 @@ actionstart = echo -en "Hi,\n
|
||||||
# Notes.: command executed once at the end of Fail2Ban
|
# Notes.: command executed once at the end of Fail2Ban
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstop = echo -en "Hi,\n
|
actionstop = printf %%b "Hi,\n
|
||||||
The jail <name> has been stopped.\n
|
The jail <name> has been stopped.\n
|
||||||
Regards,\n
|
Regards,\n
|
||||||
Fail2Ban"|mail -s "[Fail2Ban] <name>: stopped" <dest>
|
Fail2Ban"|mail -s "[Fail2Ban] <name>: stopped" <dest>
|
||||||
|
@ -40,7 +40,7 @@ actioncheck =
|
||||||
# <bantime> unix timestamp of the ban time
|
# <bantime> unix timestamp of the ban time
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = echo -en "Hi,\n
|
actionban = printf %%b "Hi,\n
|
||||||
The IP <ip> has just been banned by Fail2Ban after
|
The IP <ip> has just been banned by Fail2Ban after
|
||||||
<failures> attempts against <name>.\n\n
|
<failures> attempts against <name>.\n\n
|
||||||
Here are more information about <ip>:\n
|
Here are more information about <ip>:\n
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Notes.: command executed once at the start of Fail2Ban.
|
# Notes.: command executed once at the start of Fail2Ban.
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstart = echo -en "Hi,\n
|
actionstart = printf %%b "Hi,\n
|
||||||
The jail <name> has been started successfully.\n
|
The jail <name> has been started successfully.\n
|
||||||
Regards,\n
|
Regards,\n
|
||||||
Fail2Ban"|mail -s "[Fail2Ban] <name>: started" <dest>
|
Fail2Ban"|mail -s "[Fail2Ban] <name>: started" <dest>
|
||||||
|
@ -20,7 +20,7 @@ actionstart = echo -en "Hi,\n
|
||||||
# Notes.: command executed once at the end of Fail2Ban
|
# Notes.: command executed once at the end of Fail2Ban
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstop = echo -en "Hi,\n
|
actionstop = printf %%b "Hi,\n
|
||||||
The jail <name> has been stopped.\n
|
The jail <name> has been stopped.\n
|
||||||
Regards,\n
|
Regards,\n
|
||||||
Fail2Ban"|mail -s "[Fail2Ban] <name>: stopped" <dest>
|
Fail2Ban"|mail -s "[Fail2Ban] <name>: stopped" <dest>
|
||||||
|
@ -39,7 +39,7 @@ actioncheck =
|
||||||
# <time> unix timestamp of the ban time
|
# <time> unix timestamp of the ban time
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = echo -en "Hi,\n
|
actionban = printf %%b "Hi,\n
|
||||||
The IP <ip> has just been banned by Fail2Ban after
|
The IP <ip> has just been banned by Fail2Ban after
|
||||||
<failures> attempts against <name>.\n\n
|
<failures> attempts against <name>.\n\n
|
||||||
Here are more information about <ip>:\n
|
Here are more information about <ip>:\n
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Notes.: command executed once at the start of Fail2Ban.
|
# Notes.: command executed once at the start of Fail2Ban.
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstart = echo -en "Hi,\n
|
actionstart = printf %%b "Hi,\n
|
||||||
The jail <name> has been started successfully.\n
|
The jail <name> has been started successfully.\n
|
||||||
Regards,\n
|
Regards,\n
|
||||||
Fail2Ban"|mail -s "[Fail2Ban] <name>: started" <dest>
|
Fail2Ban"|mail -s "[Fail2Ban] <name>: started" <dest>
|
||||||
|
@ -20,7 +20,7 @@ actionstart = echo -en "Hi,\n
|
||||||
# Notes.: command executed once at the end of Fail2Ban
|
# Notes.: command executed once at the end of Fail2Ban
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstop = echo -en "Hi,\n
|
actionstop = printf %%b "Hi,\n
|
||||||
The jail <name> has been stopped.\n
|
The jail <name> has been stopped.\n
|
||||||
Regards,\n
|
Regards,\n
|
||||||
Fail2Ban"|mail -s "[Fail2Ban] <name>: stopped" <dest>
|
Fail2Ban"|mail -s "[Fail2Ban] <name>: stopped" <dest>
|
||||||
|
@ -39,7 +39,7 @@ actioncheck =
|
||||||
# <time> unix timestamp of the ban time
|
# <time> unix timestamp of the ban time
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = echo -en "Hi,\n
|
actionban = printf %%b "Hi,\n
|
||||||
The IP <ip> has just been banned by Fail2Ban after
|
The IP <ip> has just been banned by Fail2Ban after
|
||||||
<failures> attempts against <name>.\n
|
<failures> attempts against <name>.\n
|
||||||
Regards,\n
|
Regards,\n
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Notes.: command executed once at the start of Fail2Ban.
|
# Notes.: command executed once at the start of Fail2Ban.
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstart = echo -en "Subject: [Fail2Ban] <name>: started
|
actionstart = printf %%b "Subject: [Fail2Ban] <name>: started
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
@ -25,7 +25,7 @@ actionstart = echo -en "Subject: [Fail2Ban] <name>: started
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstop = if [ -f <tmpfile> ]; then
|
actionstop = if [ -f <tmpfile> ]; then
|
||||||
echo -en "Subject: [Fail2Ban] <name>: summary
|
printf %%b "Subject: [Fail2Ban] <name>: summary
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
@ -35,7 +35,7 @@ actionstop = if [ -f <tmpfile> ]; then
|
||||||
Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest>
|
Fail2Ban" | /usr/sbin/sendmail -f <sender> <dest>
|
||||||
rm <tmpfile>
|
rm <tmpfile>
|
||||||
fi
|
fi
|
||||||
echo -en "Subject: [Fail2Ban] <name>: stopped
|
printf %%b "Subject: [Fail2Ban] <name>: stopped
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
@ -57,10 +57,10 @@ actioncheck =
|
||||||
# <time> unix timestamp of the ban time
|
# <time> unix timestamp of the ban time
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = echo `date`": <ip> (<failures> failures)" >> <tmpfile>
|
actionban = printf %%b "`date`: <ip> (<failures> failures)\n" >> <tmpfile>
|
||||||
LINE=$( wc -l <tmpfile> | awk '{ print $1 }' )
|
LINE=$( wc -l <tmpfile> | awk '{ print $1 }' )
|
||||||
if [ $LINE -eq <lines> ]; then
|
if [ $LINE -eq <lines> ]; then
|
||||||
echo -en "Subject: [Fail2Ban] <name>: summary
|
printf %%b "Subject: [Fail2Ban] <name>: summary
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Notes.: command executed once at the start of Fail2Ban.
|
# Notes.: command executed once at the start of Fail2Ban.
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstart = echo -en "Subject: [Fail2Ban] <name>: started
|
actionstart = printf %%b "Subject: [Fail2Ban] <name>: started
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
@ -23,7 +23,7 @@ actionstart = echo -en "Subject: [Fail2Ban] <name>: started
|
||||||
# Notes.: command executed once at the end of Fail2Ban
|
# Notes.: command executed once at the end of Fail2Ban
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstop = echo -en "Subject: [Fail2Ban] <name>: stopped
|
actionstop = printf %%b "Subject: [Fail2Ban] <name>: stopped
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
@ -45,7 +45,7 @@ actioncheck =
|
||||||
# <time> unix timestamp of the ban time
|
# <time> unix timestamp of the ban time
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = echo -en "Subject: [Fail2Ban] <name>: banned <ip>
|
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip>
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Notes.: command executed once at the start of Fail2Ban.
|
# Notes.: command executed once at the start of Fail2Ban.
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstart = echo -en "Subject: [Fail2Ban] <name>: started
|
actionstart = printf %%b "Subject: [Fail2Ban] <name>: started
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
@ -23,7 +23,7 @@ actionstart = echo -en "Subject: [Fail2Ban] <name>: started
|
||||||
# Notes.: command executed once at the end of Fail2Ban
|
# Notes.: command executed once at the end of Fail2Ban
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstop = echo -en "Subject: [Fail2Ban] <name>: stopped
|
actionstop = printf %%b "Subject: [Fail2Ban] <name>: stopped
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
@ -45,7 +45,7 @@ actioncheck =
|
||||||
# <time> unix timestamp of the ban time
|
# <time> unix timestamp of the ban time
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = echo -en "Subject: [Fail2Ban] <name>: banned <ip>
|
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip>
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# Notes.: command executed once at the start of Fail2Ban.
|
# Notes.: command executed once at the start of Fail2Ban.
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstart = echo -en "Subject: [Fail2Ban] <name>: started
|
actionstart = printf %%b "Subject: [Fail2Ban] <name>: started
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
@ -23,7 +23,7 @@ actionstart = echo -en "Subject: [Fail2Ban] <name>: started
|
||||||
# Notes.: command executed once at the end of Fail2Ban
|
# Notes.: command executed once at the end of Fail2Ban
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionstop = echo -en "Subject: [Fail2Ban] <name>: stopped
|
actionstop = printf %%b "Subject: [Fail2Ban] <name>: stopped
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
@ -45,7 +45,7 @@ actioncheck =
|
||||||
# <time> unix timestamp of the ban time
|
# <time> unix timestamp of the ban time
|
||||||
# Values: CMD
|
# Values: CMD
|
||||||
#
|
#
|
||||||
actionban = echo -en "Subject: [Fail2Ban] <name>: banned <ip>
|
actionban = printf %%b "Subject: [Fail2Ban] <name>: banned <ip>
|
||||||
From: Fail2Ban <<sender>>
|
From: Fail2Ban <<sender>>
|
||||||
To: <dest>\n
|
To: <dest>\n
|
||||||
Hi,\n
|
Hi,\n
|
||||||
|
|
Loading…
Reference in New Issue