<tt><font size=2>centos-bounces@centos.org schrieb am 09.08.2011 10:39:57:<br>
<br>
> Nikos Gatsis - Qbit <ngatsis@qbit.gr> </font></tt>
<br><tt><font size=2>> Gesendet von: centos-bounces@centos.org<br>
> </font></tt>
<br><tt><font size=2>> 09.08.2011 10:40</font></tt>
<br><tt><font size=2>> <br>
> Bitte antworten an<br>
> CentOS mailing list <centos@centos.org></font></tt>
<br><tt><font size=2>> <br>
> An</font></tt>
<br><tt><font size=2>> <br>
> centos@centos.org</font></tt>
<br><tt><font size=2>> <br>
> Kopie</font></tt>
<br><tt><font size=2>> <br>
> Thema</font></tt>
<br><tt><font size=2>> <br>
> [CentOS] fail2ban help</font></tt>
<br><tt><font size=2>> <br>
> Hello list.<br>
> I have a question for fail2ban for bad logins on sasl.<br>
> I use sasl, sendmail and cyrus-imapd.<br>
> In jail.conf I use the following syntax:<br>
> <br>
> [sasl-iptables]<br>
> <br>
> enabled  = true<br>
> filter   = sasl<br>
> backend  = polling<br>
> action   = iptables[name=sasl, port=smtp, protocol=tcp]<br>
>            sendmail-whois[name=sasl,
dest=my@email]<br>
> logpath  = /var/log/maillog<br>
> maxretry = 6<br>
> <br>
> and the following filter:<br>
> <br>
> failregex = (?i): warning: [-._\w]+\[<HOST>\]: SASL<br>
> (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed(:<br>
> [A-Za-z0-9+/]*={0,2})?$<br>
> <br>
> in iptables:<br>
> <br>
> fail2ban-sasl  tcp  --  anywhere      
      anywhere            tcp<br>
> dpt:smtp<br>
> ...<br>
> <br>
> Chain fail2ban-sasl (2 references)<br>
> target     prot opt source          
    destination<br>
> RETURN     all  --  anywhere      
      anywhere<br>
> <br>
> <br>
> The problem is that never ban bad logins.<br>
> <br>
> I tried to change action as port="imap,imaps,pop3,pop3s,smtp"
but<br>
> nothing change.<br>
> <br>
> Can somebody help me?<br>
> <br>
> Thank you,<br>
> Nikos<br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> CentOS mailing list<br>
> CentOS@centos.org<br>
> </font></tt><a href=http://lists.centos.org/mailman/listinfo/centos><tt><font size=2>http://lists.centos.org/mailman/listinfo/centos</font></tt></a><tt><font size=2><br>
</font></tt>
<br><tt><font size=2>Hello Nikos,</font></tt>
<br><tt><font size=2>I have nearly the same regex as you:</font></tt>
<br>
<br><tt><font size=3>failregex = : warning: [-._\w]+\[<HOST>\]: SASL (?:LOGIN|PLAIN|(?:CRAM|DIGEST)-MD5) authentication failed.*</font></tt>
<br><tt><font size=3>and it works with</font></tt>
<br><tt><font size=3>fail2ban-regex /var/log/maillog /etc/fail2ban/filter.d/sasl.conf</font></tt>
<br><font size=2 face="sans-serif">  <br>
 <br>
Gruß <br>
Andreas Reschke<br>
________________________________________________________________<br>
<br>
Unix/Linux-Administration<br>
Andreas.Reschke@behrgroup.com</font>