Skip to main content

in asterisk 1.8 fail2ban stop working

Posted by xxot on

Hello
Just found out that fail2ban stop to work after upgrade to the asterisk 1.8. The reason is changes in the asterisk log file:

version 1.6
failed for '121.130.12.2' - No matching peer found

version 1.8
failed for '121.130.12.2:49503' - No matching peer found

fail2ban log:
fail2ban.filter : WARNING Unable to find a corresponding IP address for 121.130.12.2:49503

Fix:
/etc/fail2ban/filter.d/asterisk.conf

change '' to ':.*'

....
NOTICE.* .*: Registration from '.*' failed for ':.*' - No matching peer found
NOTICE.* .*: Registration from '.*' failed for ':.*' - Username/auth name mismatch
NOTICE.* .*: Registration from '.*' failed for ':.*' - Device does not match ACL
....


Submitted by eeman on Thu, 07/19/2012 Permalink

old info.. there are plenty of threads on google about it.. theres also a couple new lines you should also add as well. It will likely happen again whenever asterisk 11 becomes the next LTR