[asterisk-users] fail2ban filter issue

eherr email.eherr9633 at gmail.com
Tue Mar 5 13:50:29 CST 2013


Not sure if this has been answered but I cannot find a solution.

 

I am running Asterisk 1.4.26.3

 

I am seeing the following lines in my log files:

 

A: [2013-03-05 13:54:27] NOTICE[6928] chan_sip.c: Failed to authenticate user <sip:192.210.138.12>;tag=DmVIjOlfYiiL

 

B: [2013-03-05 12:20:00] NOTICE[6928] chan_sip.c: Failed to authenticate user 101<sip:101 at my.asterisk.server.ip>;tag=eec630f1

 

C: [2013-03-03 05:15:02] NOTICE[31158] chan_sip.c: Registration from '"101381"<sip:101381 at my.asterisk.server.ip>' failed for
'85.25.23.129' - No matching peer found

 

Now Two Part Question:

 

Part 1: 

 

I understand that line C is from some soft phone like Xlite, IP phone, or program trying to register extension 101381 to my server
and the user exten does not exist. I don't understand the method for A or B. I don't understand what generates that error message.
Can someone explain?

 

Part 2:

 

Fail2ban blocks line C as per the regex in filters/asterisk.conf. What I don't understand is why doesn't lines A or B have a built
in regex line? This goes back to not knowing the method that generates the error message in part 1. 

 

Also, can I update the regex in asterisk.conf,  

 

From: NOTICE.* .*: Failed to authenticate user .*@ <mailto:.*@%3cHOST%3e.*> <HOST>.* 

To:  NOTICE.* .*: Failed to authenticate user .*

 

It should ban both A and B, along with the original Regex line that I modified.

 

Question is, would this present a problem under normal circumstances? I know when the line comes up with my.asterisk.server.ip it
will get ignored because I am in the ignoreip list but I want to make sure it will be OK to adjust.

 

Thanks community!

 

-E

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130305/b597629d/attachment.htm>


More information about the asterisk-users mailing list