[AsteriskBrasil] fail2ban não bloqueia tentativa de autenticação

Danilo Almeida daniloricalmeida em gmail.com
Sexta Junho 21 15:16:30 BRT 2013


opa, bom Patrick,

ele continua dando essas mensagens quando starto o fail2ban:

Message from syslogd em asterisk at Jun 21 15:13:27 ...
 ¿<27>fail2ban.filter : ERROR  No 'host' group in 'NOTICE.* .*: Host failed
MD5 authentication for '.*' (.*)'
Message from syslogd em asterisk at Jun 21 15:13:27 ...
 ¿<27>fail2ban.filter : ERROR  No 'host' group in 'NOTICE.* .*: Failed to
authenticate user .*@.*'

em todas as linhas do arquivo asterisk.conf que contém as regras de
bloqueio.

Em 21 de junho de 2013 14:18, Patrick EL Youssef
<wushumasters em gmail.com>escreveu:

> http://tuxmarcial.blogspot.com.br/2013/02/fail2ban-no-asterisk-18.html
>
> Em 21-06-2013 14:15, Danilo Almeida escreveu:
>
>  Olá galera.
>
> já instalei o fail2ban em outros servidores (centOS 5.x, 6.2) e estão
> funcionando normalmente, porém, instalei no centOS 6.4 e pelo visto não
> esta bloqueando os IP com tentativas de autenticação no servidor.
>
> Fiz alguns testes tentando logar ramal com senha errada por diversas vezes
> e ele não bloqueou.
>
> asterisk.conf
>
>  [INCLUDES]
>
> before = common.conf
>
> _daemon = asterisk
>
> [Definition]
>
> failregex = NOTICE%(__pid_re)s .*: Registration from '.*' failed for
> '<HOST>' - Wrong password$
>             NOTICE%(__pid_re)s .*: Registration from '.*' failed for
> '<HOST>' - No matching peer found$
>             NOTICE%(__pid_re)s .*: Registration from '.*' failed for
> '<HOST>' - Username/auth name mismatch$
>             NOTICE%(__pid_re)s .*: Registration from '.*' failed for
> '<HOST>' - Device does not match ACL$
>             NOTICE%(__pid_re)s .*: Registration from '.*' failed for
> '<HOST>' - Peer is not supposed to register$
>             NOTICE%(__pid_re)s .*: Registration from '.*' failed for
> '<HOST>' - ACL error (permit/deny)$
>             NOTICE%(__pid_re)s <HOST> failed to authenticate as '.*'$
>             NOTICE%(__pid_re)s .*: No registration for peer '.*' \(from
> <HOST>\)$
>             NOTICE%(__pid_re)s .*: Host <HOST> failed MD5 authentication
> for '.*' (.*)$
>             NOTICE%(__pid_re)s .*: Failed to authenticate user .*@<HOST>.*$
>
> ignoreregex =
>
>
> e no arquivo jail.conf adicionei o seguinte
>
>  [asterisk-iptables]
>
> enabled  = true
> filter   = asterisk
> action   = iptables-allports[name=ASTERISK, protocol=all]
>            sendmail-whois[name=ASTERISK, dest=root, sender=
> daniloricalmeida em gmail.com]
> logpath  = /var/log/asterisk/messages
> maxretry = 5
> bantime = 259200
>
> starto ele, e aparece as seguinte mensagens:
>
>  # service fail2ban start
> Iniciando o fail2ban:
> Message from syslogd em ruffus at Jun 21 14:14:44 ...
>  ¿<30>fail2ban.filter : INFO   Added logfile = /var/log/secure
>
> Message from syslogd em ruffus at Jun 21 14:14:44 ...
>  ¿<30>fail2ban.filter : INFO   Set maxRetry = 5
>
> Message from syslogd em ruffus at Jun 21 14:14:44 ...
>  ¿<30>fail2ban.filter : INFO   Set findtime = 600
>
> Message from syslogd em ruffus at Jun 21 14:14:45 ...
>  ¿<30>fail2ban.filter : INFO   Added logfile = /var/log/asterisk/messages
>
> Message from syslogd em ruffus at Jun 21 14:14:45 ...
>  ¿<30>fail2ban.filter : INFO   Set maxRetry = 5
>
> Message from syslogd em ruffus at Jun 21 14:14:45 ...
>  ¿<30>fail2ban.filter : INFO   Set findtime = 600
>
> Message from syslogd em ruffus at Jun 21 14:14:45 ...
>  ¿<30>fail2ban.filter : INFO   Added logfile = /var/log/asterisk/messages
>
> Message from syslogd em ruffus at Jun 21 14:14:45 ...
>  ¿<30>fail2ban.filter : INFO   Set maxRetry = 10
>
> Message from syslogd em ruffus at Jun 21 14:14:45 ...
>  ¿<30>fail2ban.filter : INFO   Set findtime = 600
>
> Message from syslogd em ruffus at Jun 21 14:14:45 ...
>  ¿<30>fail2ban.filter : INFO   Added logfile = /var/log/asterisk/messages
>
> Message from syslogd em ruffus at Jun 21 14:14:45 ...
>  ¿<30>fail2ban.filter : INFO   Set maxRetry = 10
>
> Message from syslogd em ruffus at Jun 21 14:14:45 ...
>  ¿<30>fail2ban.filter : INFO   Set findtime = 600
>                                                            [  OK  ]
>
> agradeço quem puder ajudar
>
> --
> *att*
> *Danilo Almeida*
>
>
> _______________________________________________
> KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;
> Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;
> Intercomunicadores para acesso remoto via rede IP. Conheça em www.Khomp.com <http://www.khomp.com/>.
> _______________________________________________
> ALIGERA – Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.
> Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.
> Channel Bank – Appliance Asterisk - Acesse www.aligera.com.br.
> _______________________________________________
> Para remover seu email desta lista, basta enviar um email em branco para asteriskbrasil-unsubscribe em listas.asteriskbrasil.org
>
>
>
> _______________________________________________
> KHOMP: completa linha de placas externas FXO, FXS, GSM e E1;
> Media Gateways de 1 a 64 E1s para SIP com R2, ISDN e SS7;
> Intercomunicadores para acesso remoto via rede IP. Conheça em
> www.Khomp.com <http://www.khomp.com/>.
> _______________________________________________
> ALIGERA – Fabricante nacional de Gateways SIP-E1 para R2, ISDN e SS7.
> Placas de 1E1, 2E1, 4E1 e 8E1 para PCI ou PCI Express.
> Channel Bank – Appliance Asterisk - Acesse www.aligera.com.br.
> _______________________________________________
> Para remover seu email desta lista, basta enviar um email em branco para
> asteriskbrasil-unsubscribe em listas.asteriskbrasil.org
>



-- 
*att*
*Danilo Almeida*
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://listas.asteriskbrasil.org/pipermail/asteriskbrasil/attachments/20130621/28e1bdc6/attachment.htm 


Mais detalhes sobre a lista de discussão AsteriskBrasil