mirror of https://github.com/fail2ban/fail2ban
- Improved mail script
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@257 a942ae1a-1317-0410-a47c-b1dcaea8d6050.x
parent
be7cc4f81c
commit
894bcbdbbf
|
@ -43,7 +43,7 @@ actioncheck =
|
||||||
#
|
#
|
||||||
actionban = echo -en "Hi,\n
|
actionban = echo -en "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 <section>.\n
|
<failures> attempts against <name>.\n
|
||||||
Regards,\n
|
Regards,\n
|
||||||
Fail2Ban"|mail -s "[Fail2Ban] <name>: banned <ip>" <dest>
|
Fail2Ban"|mail -s "[Fail2Ban] <name>: banned <ip>" <dest>
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,9 @@
|
||||||
enabled = true
|
enabled = true
|
||||||
filter = sshd
|
filter = sshd
|
||||||
action = hostsdeny[file=/tmp/hosts.deny]
|
action = hostsdeny[file=/tmp/hosts.deny]
|
||||||
|
mail[name=SSH,dest=cyril.jaquier@bluewin.ch]
|
||||||
maxretry = 2
|
maxretry = 2
|
||||||
bantime = 5
|
bantime = 10
|
||||||
|
|
||||||
[ssh]
|
[ssh]
|
||||||
|
|
||||||
|
|
|
@ -134,6 +134,7 @@ class Actions(JailThread):
|
||||||
aInfo = dict()
|
aInfo = dict()
|
||||||
bTicket = BanManager.createBanTicket(ticket)
|
bTicket = BanManager.createBanTicket(ticket)
|
||||||
aInfo["ip"] = bTicket.getIP()
|
aInfo["ip"] = bTicket.getIP()
|
||||||
|
aInfo["failures"] = bTicket.getTime()
|
||||||
logSys.info("Ban %s" % aInfo["ip"])
|
logSys.info("Ban %s" % aInfo["ip"])
|
||||||
for action in self.actions:
|
for action in self.actions:
|
||||||
action.execActionBan(aInfo)
|
action.execActionBan(aInfo)
|
||||||
|
|
Loading…
Reference in New Issue