<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Srs,<br><br>Instalei o Fail2ban para bloquear ataques no asterisk. Problema que o mesmo não esta bloqueando os ataques. Segue abaixo meus arquivos de configuração:<br><br>jail.conf<br><br>[asterisk-iptables]<br><br>enabled = true<br>filter = asterisk<br>action = iptables-allports[name=ASTERISK, protocol=all]<br> sendmail-whois[name=ASTERISK, dest=root, sender=gustavo.fernandes@tbmtextil.com.br]<br>logpath = /var/log/asterisk/full<br>maxretry = 5<br>bantime = 259200<br><br><br>/etc/fail2ban/filter.d/asterisk.conf<br><br>[Definition]<br><br>#_daemon = asterisk<br><br># Option: failregex<br># Notes.: regex to match the password failures messages in the logfile. The<br># host must be matched by a group named "host". The tag "<HOST>" can<br># be used for standard IP/hostname matching and is only an alias for<br># (?:::f{4,6}:)?(?P<host>\S+)<br># Values: TEXT<br>#<br><br>failregex = NOTICE.* .*: Registration from '.*' failed for '<HOST>' - Wrong password<br> NOTICE.* .*: Registration from '.*' failed for '<HOST>' - No matching peer found<br> NOTICE.* .*: Registration from '.*' failed for '<HOST>' - Username/auth name mismatch<br> NOTICE.* .*: Registration from '.*' failed for '<HOST>' - Device does not match ACL<br> NOTICE.* .*: Registration from '.*' failed for '<HOST>' - Peer is not supposed to register<br> NOTICE.* <HOST> failed to authenticate as '.*'$<br> NOTICE.* .*: No registration for peer '.*' \(from <HOST>\)<br> NOTICE.* .*: Host <HOST> failed MD5 authentication for '.*' (.*)<br> NOTICE.* .*: Failed to authenticate user .*@<HOST>.*<br> NOTICE.* .*: Registration from '\".*\".*' failed for '<HOST>' - No matching peer found<br> NOTICE.* .*: Registration from '\".*\".*' failed for '<HOST>' - Wrong password<br># Option: ignoreregex<br># Notes.: regex to ignore. If this regex matches, the line is ignored.<br># Values: TEXT<br>#<br>ignoreregex =<br><br>ALGUMA DICA?<br><br><br><br>                                            </div></body>
</html>