root@sip:/etc/fail2ban/filter.d $ fail2ban-regex /var/log/asterisk/full /etc/fail2ban/filter.d/asterisk.conf
Running tests
=============
Use regex file : /etc/fail2ban/filter.d/asterisk.conf
Use log file : /var/log/asterisk/full
Results
=======
Failregex
|- Regular expressions:
| [1] Registration from '.*' failed for '<HOST>(:[0-9]{1,5})?' - Wrong password
| [2] Registration from '.*' failed for '<HOST>(:[0-9]{1,5})?' - No matching peer found
| [3] Registration from '.*' failed for '<HOST>(:[0-9]{1,5})?' - Device does not match ACL
| [4] Registration from '.*' failed for '<HOST>(:[0-9]{1,5})?' - Username/auth name mismatch
| [5] Registration from '.*' failed for '<HOST>(:[0-9]{1,5})?' - Peer is not supposed to register
| [6] NOTICE.* <HOST> failed to authenticate as '.*'$
| [7] NOTICE.* .*: No registration for peer '.*' (from <HOST>)
| [8] NOTICE.* .*: Host <HOST> failed MD5 authentication for '.*' (.*)
| [9] VERBOSE.* logger.c: -- .*IP/<HOST>-.* Playing 'ss-noservice' (language '.*')
|
`- Number of matches:
[1] 0 match(es)
[2] 2 match(es)
[3] 0 match(es)
[4] 0 match(es)
[5] 0 match(es)
[6] 0 match(es)
[7] 0 match(es)
[8] 0 match(es)
[9] 0 match(es)
Ignoreregex
|- Regular expressions:
|
`- Number of matches:
Summary
=======
Addresses found:
[1]
[2]
70.25.26.119 (Fri Jan 13 13:21:58 2012)
70.25.26.119 (Fri Jan 13 13:21:59 2012)
[3]
[4]
[5]
[6]
[7]
[8]
[9]
Date template hits:
0 hit(s): MONTH Day Hour:Minute:Second
0 hit(s): WEEKDAY MONTH Day Hour:Minute:Second Year
0 hit(s): WEEKDAY MONTH Day Hour:Minute:Second
0 hit(s): Year/Month/Day Hour:Minute:Second
0 hit(s): Day/Month/Year Hour:Minute:Second
0 hit(s): Day/MONTH/Year:Hour:Minute:Second
0 hit(s): Month/Day/Year:Hour:Minute:Second
62363 hit(s): Year-Month-Day Hour:Minute:Second
0 hit(s): Day-MONTH-Year Hour:Minute:Second[.Millisecond]
0 hit(s): Day-Month-Year Hour:Minute:Second
0 hit(s): TAI64N
0 hit(s): Epoch
0 hit(s): ISO 8601
0 hit(s): Hour:Minute:Second
0 hit(s): <Month/Day/Year@Hour:Minute:Second>
Success, the total number of match is 2
However, look at the above section 'Running tests' which could contain important
information.