Ir al contenido
  • +31 653-919-302
Cafayate.Net
  • 0
  • 0
  • Inicia sesión
  • Nederlands English (US) Español (AR)
  • Contáctanos
  • Inicio
  • Blog
  • Empleos
  • Contáctanos
Cafayate.Net
  • 0
  • 0
    • Inicio
    • Blog
    • Empleos
    • Contáctanos
  • +31 653-919-302
  • Nederlands English (US) Español (AR)
  • Inicia sesión
  • Contáctanos

HOWTO: Protect against postfix AUTH DoS attacks

  • Todos los blogs
  • Tech Blog
  • HOWTO: Protect against postfix AUTH DoS attacks
  • 5 de marzo de 2021 por
    Administrator

     

    I have tons of

    Oct 19 06:30:50 mail postfix/smtpd[14043]: connect from unknown[151.237.190.118]
    Oct 19 06:30:50 mail postfix/smtpd[14043]: lost connection after AUTH from unknown[151.237.190.118]
    Oct 19 06:30:50 mail postfix/smtpd[14043]: disconnect from unknown[151.237.190.118]
    Oct 19 06:30:50 mail postfix/smtpd[14043]: connect from unknown[151.237.190.118]
    Oct 19 06:30:50 mail postfix/smtpd[14043]: lost connection after AUTH from unknown[151.237.190.118]
    Oct 19 06:30:50 mail postfix/smtpd[14043]: disconnect from unknown[151.237.190.118]
    Oct 19 06:30:51 mail postfix/smtpd[14043]: connect from unknown[151.237.190.118]
    Oct 19 06:30:51 mail postfix/smtpd[14043]: lost connection after AUTH from unknown[151.237.190.118]
    Oct 19 06:30:51 mail postfix/smtpd[14043]: disconnect from unknown[151.237.190.118]

    in my logs. If you are on the same boat and want to block such attacks, you can use fail2ban:

    1/ add following section to the end of your /etc/fail2ban/jail.local

    [postfix-auth]
    enabled     = true
    filter      = postfix.auth
    action      = iptables-multiport[name=postfix, port="http,https,smtp,submission,pop3,pop3s,imap,imaps,sieve", protocol=tcp]
    #           sendmail[name=Postfix, [email protected]]
    logpath     = /var/log/mail.log

    2/ create new file /etc/fail2ban/filter.d/postfix.auth.conf

    [Definition]
    failregex = lost connection after AUTH from (.*)\[<HOST>\]
    ignoreregex =

    3/ Restart fail2ban. Attacker will be blocked after five attempts.

     

    en Tech Blog
    Mastering file searches on Linux

    Diseñado para empresas

    Somos un equipo de personas apasionadas cuyo objetivo es mejorar la vida de todos a través de productos revolucionarios. Creamos grandes productos para resolver sus problemas empresariales. Nuestros productos están diseñados para pequeñas y medianas empresas dispuestas a optimizar su rendimiento.

    Contáctenos

    Plantexel
    Pedernera
    Salta Capital 
    Argenina

    • +31 653-919-302
    • [email protected]
    Síganos
    Copyright © Plantexel
    Nederlands | English (US) | Español (AR)