[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Configurar fail2ban



El día 1 de agosto de 2013 02:06, Robert J. Briones C.
<robert.briones@gmail.com> escribió:
> Estimados. debido a un reciente ataque de varias IP desde china a mi
> servidor postfix he investigado un poco y encontre Fail2ban, según veo es un
> software interesante que permite bloquear IP que hacen muchos login fallidos
> y desde diferentes IP
>
> el problema es que no puedo configurar el failregex de este.
>
> he intentado con algunos como estos.
>
> #failregex = warning: (.*)[<HOST>]: SASL LOGIN authentication failed:
> authentication failure
> #failregex = : warning: .*+\[<HOST>\]: SASL
> (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed
> failregex = : warning: [-._\w]+\[<HOST>\]: SASL
> (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed$
>
> unos me dan error y otros no enuentra coincidencia.
>
> las lineas del log que me dan cuenta del error de login son las siguientes
>
> Aug  1 01:27:38 nao postfix/smtpd[31212]: connect from
> unknown[183.160.126.122]
> Aug  1 01:27:39 nao postfix/smtpd[31212]: warning: unknown[183.160.126.122]:
> SASL LOGIN authentication failed: authentication failure
> Aug  1 01:27:40 nao postfix/smtpd[31212]: lost connection after AUTH from
> unknown[183.160.126.122]
> Aug  1 01:27:40 nao postfix/smtpd[31212]: disconnect from
> unknown[183.160.126.122]
> Aug  1 01:28:24 nao postfix/smtpd[31212]: connect from unknown[60.173.9.227]
> Aug  1 01:28:25 nao postfix/smtpd[31212]: warning: unknown[60.173.9.227]:
> SASL LOGIN authentication failed: authentication failure
> Aug  1 01:28:26 nao postfix/smtpd[31212]: lost connection after AUTH from
> unknown[60.173.9.227]
> Aug  1 01:28:26 nao postfix/smtpd[31212]: disconnect from
> unknown[60.173.9.227]
> Aug  1 01:28:27 nao postfix/smtpd[31212]: connect from unknown[60.173.9.227]
> Aug  1 01:28:28 nao postfix/smtpd[31212]: warning: unknown[60.173.9.227]:
> SASL LOGIN authentication failed: authentication failure
> Aug  1 01:28:29 nao postfix/smtpd[31212]: lost connection after AUTH from
> unknown[60.173.9.227]
> Aug  1 01:28:29 nao postfix/smtpd[31212]: disconnect from
> unknown[60.173.9.227]
>
> y realmente he buscado pero no encuentro que poner para que me funcione el
> fail2ban.
>
> espero me puedan ayudar.
>
> Saludos.


Yo utilizo este y no tengo ningún problema:

failregex = (?i): warning: [-._\w]+\[<HOST>\]: SASL
(?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed(:
[A-Za-z0-9+/]*={0,2})?$

Has intentado también usar reject_rbl_client en postfix? Frena parte
de los ataques también y quizás algún firewall para frenar logueos
desde ASIA.
--
Guido Ignacio <guidoignacio@gmail.com>


Reply to: