fail2ban sendet keine mail

XET!C

XET!C

Tripel-As
Hi,

habe mir erstmal fail2ban auf ssh eingestellt. Bei 1 Fehlversuch bannt er die IP mit einem Eintrag in iptables.

ABER: Er sendet keine mail, wenn fail2ban startet/endet/bannt...

jail.local
Code:
[DEFAULT]

#reip" can be an IP address, a CIDR mask or a DNS host
ignoreip = 127.0.0.1 192.168.0.99
bantime  = 600
maxretry = 3

# "backend" specifies the backend used to get files modification. Available
# options are "gamin", "polling" and "auto".
# yoh: For some reason Debian shipped python-gamin didn't work as expected
#      This issue left ToDo, so polling is default backend for now
backend = polling

#
# Destination email address used solely for the interpolations in
# jail.{conf,local} configuration files.
destemail = root@debian.localdomain

# Default action to take: ban only
action = iptables[name=%(__name__)s, port=%(port)s]

[ssh]

enabled = true
port    = ssh
filter  = sshd
logpath  = /var/log/auth.log
maxretry = 1

[apache]

enabled = false
port    = http
filter  = apache-auth
logpath = /var/log/apache*/*error.log
maxretry = 5

[apache-noscript]

enabled = false
port    = http
filter  = apache-noscript
logpath = /var/log/apache*/*error.log
maxretry = 5

[vsftpd]

enabled  = false
port     = ftp
filter   = vsftpd
logpath  = /var/log/auth.log
maxretry = 5

[proftpd]

enabled  = false
port     = ftp
filter   = proftpd
logpath  = /var/log/auth.log
failregex = proftpd: (pam_unix) authentication failure; .* rhost=<HOST>
maxretry = 5

[wuftpd]

enabled  = false
port     = ftp
filter   = wuftpd
logpath  = /var/log/auth.log
maxretry = 5

[postfix]

enabled  = false
port     = smtp
filter   = postfix
logpath  = /var/log/mail.log
maxretry = 5

[courierpop3]

enabled  = false
port     = pop3
filter   = courierlogin
failregex = courierpop3login: LOGIN FAILED.*ip=[.*:<HOST>]
logpath  = /var/log/mail.log
maxretry = 5

[courierimap]

enabled  = false
port     = imap2
filter   = courierlogin
failregex = imapd: LOGIN FAILED.*ip=[.*:<HOST>]
logpath  = /var/log/mail.log
maxretry = 5

[sasl]

enabled  = false
port     = smtp
filter   = sasl
failregex = warning: [-._w]+[<HOST>]: SASL (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed
logpath  = /var/log/mail.log
maxretry = 5

Die mail-funktion habe ich auch bei meinem Firewall-skript eingabut und sie funktioniert ohne Probleme
 
Moin,

dann kannst du failtoban gleich abeschalten :)

Dir fehlt etwas in der Richtung:
Code:
 ban & send an e-mail with whois report and relevant log lines
# to the destemail.
# ban & send an e-mail with whois report to the destemail.
action_mw = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s]
              %(mta)s-whois[name=%(__name__)s, dest="%(destemail)s", protocol="%(protocol)s]

action = %(action_mw)s

mfg
HeadCrash
 
Zuletzt bearbeitet:
Danke,

irgendwie habe ich auch mein fail2ban zerschoßen. Habe es nochmal neu aufgesetzt und habe deine Zeile genommen und es hat geklappt. DANKE!!!
 

Ähnliche Themen

Fail2Ban won't ban

Hilfe bei fail2ban

Akonadi startet nicht mehr

NagiosGrapher 1.7.1 funktioniert nicht

CentOS 6.3 RADIUS - Keine Verbindung möglich

Zurück
Oben