Fail2ban erstellt keine Firewall-Regeln

  • Hallo,
    auch ich habe Probleme das ständig mein vServer über postfix attackiert wird. Ich habe dagegen schon fail2ban installiert und das Script auch so eingestellt wie es hier im Forum steht damit es mit der VCP Firewall zusammen arbeitet. Leider werden aber keine neue Regeln durch fail2ban erstellt, wenn ich es manuell teste, direkt über das PHP Script, klappt das eintragen und löschen ohne Probleme.


    Dies sind mal ein paar Beispieleinträge aus meiner mail.log:


    Code
    Sep 17 16:54:36 v220100556153214 postfix/smtpd[14841]: warning: unknown[187.75.218.117]: SASL CRAM-MD5 authentication failed: authentication failure
    Sep 17 16:54:41 v220100556153214 postfix/smtpd[14841]: warning: SASL authentication failure: no secret in database
    Sep 17 16:54:41 v220100556153214 postfix/smtpd[14841]: warning: unknown[187.75.218.117]: SASL CRAM-MD5 authentication failed: authentication failure
    Sep 17 16:54:43 v220100556153214 postfix/smtpd[14841]: too many errors after AUTH from unknown[187.75.218.117]
    Sep 17 16:54:43 v220100556153214 postfix/smtpd[14841]: disconnect from unknown[187.75.218.117]
    Sep 17 16:54:45 v220100556153214 postfix/smtpd[14841]: warning: 187.75.218.117: hostname 187-75-218-117.dsl.telesp.net.br verification failed: Name or service not known
    Sep 17 16:54:45 v220100556153214 postfix/smtpd[14841]: connect from unknown[187.75.218.117]
    Sep 17 16:54:46 v220100556153214 postfix/smtpd[14841]: warning: SASL authentication failure: no secret in database
    Sep 17 16:54:46 v220100556153214 postfix/smtpd[14841]: warning: unknown[187.75.218.117]: SASL CRAM-MD5 authentication failed: authentication failure
    Sep 17 16:54:47 v220100556153214 postfix/smtpd[14841]: warning: SASL authentication failure: no secret in database


    Code
    Sep 17 08:20:23 v220100556153214 postfix/smtpd[18320]: warning: unknown[187.75.218.117]: SASL CRAM-MD5 authentication failed: bad protocol / cancel
    Sep 17 08:20:28 v220100556153214 postfix/smtpd[18320]: warning: SASL authentication failure: need authentication name
    Sep 17 08:20:28 v220100556153214 postfix/smtpd[18320]: warning: unknown[187.75.218.117]: SASL CRAM-MD5 authentication failed: bad protocol / cancel
    Sep 17 08:20:33 v220100556153214 postfix/smtpd[18320]: warning: SASL authentication failure: need authentication name
    Sep 17 08:20:33 v220100556153214 postfix/smtpd[18320]: warning: unknown[187.75.218.117]: SASL CRAM-MD5 authentication failed: bad protocol / cancel
    Sep 17 08:20:37 v220100556153214 postfix/smtpd[18320]: warning: SASL authentication failure: need authentication name
    Sep 17 08:20:37 v220100556153214 postfix/smtpd[18320]: warning: unknown[187.75.218.117]: SASL CRAM-MD5 authentication failed: bad protocol / cancel
    Sep 17 08:20:42 v220100556153214 postfix/smtpd[18320]: warning: SASL authentication failure: need authentication name
    Sep 17 08:20:42 v220100556153214 postfix/smtpd[18320]: warning: unknown[187.75.218.117]: SASL CRAM-MD5 authentication failed: bad protocol / cancel


    Code
    Sep 16 20:59:33 v220100556153214 postfix/smtpd[27006]: warning: 213.227.39.134.static.user.ono.com[213.227.39.134]: SASL LOGIN authentication failed: authentication failure
    Sep 16 20:59:34 v220100556153214 postfix/smtpd[31357]: warning: 213.227.39.134.static.user.ono.com[213.227.39.134]: SASL LOGIN authentication failed: authentication failure
    Sep 16 20:59:35 v220100556153214 postfix/smtpd[27006]: disconnect from 213.227.39.134.static.user.ono.com[213.227.39.134]
    Sep 16 20:59:35 v220100556153214 postfix/smtpd[31357]: disconnect from 213.227.39.134.static.user.ono.com[213.227.39.134]
    Sep 16 20:59:36 v220100556153214 postfix/smtpd[16533]: warning: 213.227.39.134.static.user.ono.com[213.227.39.134]: SASL LOGIN authentication failed: authentication failure
    Sep 16 20:59:36 v220100556153214 postfix/smtpd[25721]: connect from 213.227.39.134.static.user.ono.com[213.227.39.134]
    Sep 16 20:59:36 v220100556153214 postfix/smtpd[14870]: warning: 213.227.39.134.static.user.ono.com[213.227.39.134]: SASL LOGIN authentication failed: authentication failure
    Sep 16 20:59:36 v220100556153214 postfix/smtpd[29115]: warning: 213.227.39.134.static.user.ono.com[213.227.39.134]: SASL LOGIN authentication failed: authentication failure


    Der sasl Filter ist in fail2ban aktiviert.


    Schon mal vielen Dank im Vorraus für eure Hilfe!


    MfG
    Jiny

  • Die original iptables-multiport.conf hab ich ersetzt durch deine und in meiner jail.local steht:
    banaction = iptables-multiport


    Die Logs von fail2ban sind nicht sehr aussagekräftig, dort steht nur das die Dieste gestartet wurden bzw. mal ein Hinweis wenn eine Logdatei archiviert wurde.

  • Hier ist mal ein Auszug aus dem fail2ban log: