<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Leandro,&nbsp;<div><br></div><div>tem uma pequena diferença de sintaxe, no seu asterisk.conf existe o .. (ponto ponto) e no meu não (utilizo o apóstrofo ' ) , segue o meu para comparação:</div><div><br></div><div><div>failregex = NOTICE.* .*: Registration from '.*' failed for '&lt;HOST&gt;' - Wrong password</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: Registration from '.*' failed for '&lt;HOST&gt;' - No matching peer found</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: Registration from '.*' failed for '&lt;HOST&gt;' - Username/auth name mismatch</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: Registration from '.*' failed for '&lt;HOST&gt;' - Device does not match ACL</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: Registration from '.*' failed for '&lt;HOST&gt;' - Peer is not supposed to register</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* &lt;HOST&gt; failed to authenticate as '.*'$</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: No registration for peer '.*' \(from &lt;HOST&gt;\)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: Host &lt;HOST&gt; failed MD5 authentication for '.*' (.*)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: Failed to authenticate user .*@&lt;HOST&gt;.*</div><div>ignoreregex =</div></div><div><br></div><div>Procede essa diferença?</div><div><br></div><div>Atenciosamente,</div><div><br></div><div>João Queiroz</div><div><br><div><div>Em 05/01/2011, às 00:26, leandro alves escreveu:</div><br class="Apple-interchange-newline"><blockquote type="cite">Bem, no meu caso funciona bem, seguem minhas confs abaixo, tente comparar para ver se há algo de diferente:<div><br></div><div>- Arquivo de filtro para SIP: /etc/fail2ban/filter.d/asterisk.conf</div><div><br></div><div><br>
</div><div><div>[INCLUDES]</div><div><br></div><div>[Definition]</div><div>failregex = NOTICE.* .*: Registration from ..*. failed for .&lt;HOST&gt;. . Wrong password</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: Registration from ..*. failed for .&lt;HOST&gt;. . No matching peer found</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: Registration from ..*. failed for .&lt;HOST&gt;. . Username/auth name mismatch</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: Registration from ..*. failed for .&lt;HOST&gt;. . Device does not match ACL</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* &lt;HOST&gt; failed to authenticate as ..*.$</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: No registration for peer ..*. \(from &lt;HOST&gt;\)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: Host &lt;HOST&gt; failed MD5 authentication for ..*. (.*)</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NOTICE.* .*: Failed to authenticate user .*@&lt;HOST&gt;.*</div><div>ignoreregex =</div></div><div><br><br></div><div>- No "jail.conf":</div><div><br></div><div><div>[asterisk-iptables]</div><div>
<br></div><div>enabled &nbsp;= true</div><div>filter &nbsp; = asterisk</div><div>action &nbsp; = iptables-allports[name=ASTERISK, protocol=all]</div><div># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sendmail-whois[name=ASTERISK, dest=<a href="mailto:planetfone-fail2ban@planetarium.com.br">planetfone-fail2ban@planetarium.com.br</a>, sender=<a href="mailto:fail2ban@pfdesenv3.planetarium.com.br">fail2ban@pfdesenv3.planetarium.com.br</a>]</div>
<div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sendmail-whois[name=ASTERISK]</div><div>logpath &nbsp;= /var/log/asterisk/full</div><div>maxretry = 3</div><div>bantime &nbsp;= 259200</div></div><div><br></div><div>**** Lembrando que em "logpath", deverá conter exatamente o caminho de onde é gerado o log do asterisk, devidamente configurado no arquivo logger.conf</div>
<div><br></div><div><br></div><div>Att.,</div><div><br><div class="gmail_quote">Em 5 de janeiro de 2011 00:25, Oseias Ferreira <span dir="ltr">&lt;<a href="mailto:ferreira.oseias@gmail.com">ferreira.oseias@gmail.com</a>&gt;</span> escreveu:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Em 05/01/2011, às 02:12, Wladimir Elvich Danielski escreveu:<br>
<div class="im"><br>
&gt; Pois olhe,<br>
&gt;<br>
&gt; Também tem o bom e velho iptables, não pega tudo porém filtra uns 80%,<br>
&gt; uma vez que vc identificou a rede origem do ataque e conhece a dos<br>
&gt; clientes :<br>
&gt;<br>
&gt; iptables -A INPUT -i eth0-p UDP -s <a href="http://188.0.0.0/8" target="_blank">188.0.0.0/8</a> --dport 5060:5061 -j<br>
&gt; ACCEPT<br>
&gt; iptables -A INPUT -i eth0-p UDP -s <a href="http://188.0.0.0/8" target="_blank">188.0.0.0/8</a> --dport 10000:30000 -<br>
&gt; j ACCEPT<br>
&gt; iptables -A INPUT -i eth0-p UDP -s <a href="http://189.0.0.0/8" target="_blank">189.0.0.0/8</a> --dport 5060:5061 -j<br>
&gt; ACCEPT<br>
&gt; iptables -A INPUT -i eth0-p UDP -s <a href="http://189.0.0.0/8" target="_blank">189.0.0.0/8</a> --dport 10000:30000 -<br>
&gt; j ACCEPT<br>
&gt; iptables -A INPUT -i eth0-p UDP -s <a href="http://200.0.0.0/8" target="_blank">200.0.0.0/8</a> --dport 5060:5061 -j<br>
&gt; ACCEPT<br>
&gt; iptables -A INPUT -i eth0-p UDP -s <a href="http://200.0.0.0/8" target="_blank">200.0.0.0/8</a> --dport 10000:30000 -<br>
&gt; j ACCEPT<br>
&gt; iptables -A INPUT -i eth0-p UDP -s <a href="http://201.0.0.0/8" target="_blank">201.0.0.0/8</a> --dport 5060:5061 -j<br>
&gt; ACCEPT<br>
&gt; iptables -A INPUT -i eth0-p UDP -s <a href="http://201.0.0.0/8" target="_blank">201.0.0.0/8</a> --dport 10000:30000 -<br>
&gt; j ACCEPT<br>
&gt; iptables -A INPUT -i eth0 -j DROP<br>
<br>
</div>Se nenhum usuário for registrar fora do Brasil, realmente pode usar.<br>
Como a maioria dos ataques têm origem de IPs de fora, (provavelmente<br>
os bots usam a rede tor), vai bloquear boa parte.<br>
Mas em conjunto com um IDS, pode pegar até mesmo os ataques originados<br>
de IPs brasileiros.<br>
<br>
<a href="http://en.wikipedia.org/wiki/Intrusion_Detection_System" target="_blank">http://en.wikipedia.org/wiki/Intrusion_Detection_System</a><br>
<div><div></div><div class="h5"><br>
--<br>
Oséias Ferreira.<br>
<br>
<br>
<br>
_______________________________________________<br>
KHOMP: qualidade em placas de E1, GSM, FXS e FXO para Asterisk.<br>
- Hardware com alta disponibilidade de recursos e qualidade KHOMP<br>
- Suporte técnico local qualificado e gratuito<br>
Conheça a linha completa de produtos KHOMP em <a href="http://www.khomp.com.br/" target="_blank">www.khomp.com.br</a><br>
_______________________________________________<br>
Headsets Plantronics com o melhor preço do Brasil.<br>
Acesse agora <a href="http://www.voipmania.com.br/" target="_blank">www.voipmania.com.br</a><br>
VOIPMANIA STORE<br>
________<br>
Lista de discussões <a href="http://AsteriskBrasil.org">AsteriskBrasil.org</a><br>
<a href="mailto:AsteriskBrasil@listas.asteriskbrasil.org">AsteriskBrasil@listas.asteriskbrasil.org</a><br>
<a href="http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil" target="_blank">http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil</a><br>
______________________________________________<br>
Para remover seu email desta lista, basta enviar um email em branco para <a href="mailto:asteriskbrasil-unsubscribe@listas.asteriskbrasil.org">asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Leandro,<br>
</div>
_______________________________________________<br>KHOMP: qualidade em placas de E1, GSM, FXS e FXO para Asterisk. <br>- Hardware com alta disponibilidade de recursos e qualidade KHOMP<br>- Suporte técnico local qualificado e gratuito <br>Conheça a linha completa de produtos KHOMP em <a href="http://www.khomp.com.br">www.khomp.com.br</a><br>_______________________________________________<br>Headsets Plantronics com o melhor preço do Brasil.<br>Acesse agora <a href="http://www.voipmania.com.br">www.voipmania.com.br</a><br>VOIPMANIA STORE<br>________<br>Lista de discussões <a href="http://AsteriskBrasil.org">AsteriskBrasil.org</a><br><a href="mailto:AsteriskBrasil@listas.asteriskbrasil.org">AsteriskBrasil@listas.asteriskbrasil.org</a><br>http://listas.asteriskbrasil.org/mailman/listinfo/asteriskbrasil<br>______________________________________________<br>Para remover seu email desta lista, basta enviar um email em branco para asteriskbrasil-unsubscribe@listas.asteriskbrasil.org</blockquote></div><br></div></body></html>