<div dir="ltr"><div><div><div><div><div>I appreciate the discussion on the question I asked.<br><br></div>I currently listen for failed registration attempts via AMI and automatically block the offending IP address at the firewall. I was hoping to find another AMI event that would be the magic bullet I need, but it doesn't sound like that's going to happen.<br><br></div><div>I understand that fail2ban is probably not what I want and probably wouldn't detect the attacks I'm seeing.<br><br></div><div>It turns out that not all of the attacks are from the "friendly scanner," but enough of them are that it's a good start.<br><br></div>So, I really like the idea of the IP geo location firewall rules coupled with the "friendly scanner" filter, as provided by a few of you guys. It was mentioned that this is a broad hammer, but I'm kinda looking for a broad hammer! ;^)<br><br></div>Looks like I need to do some research, but I think I have what I need.<br><br></div>Thanks again,<br><br></div>Mike Diehl.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 19, 2017 at 4:36 PM, Telium Technical Support <span dir="ltr"><<a href="mailto:support@telium.ca" target="_blank">support@telium.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div class="m_-1566626896104373827WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I think you missed the point of the Digium post. Fail2ban can ONLY ban IP’s if Asterisk records a failure to register. Asterisk does not detect malformed SIP packets, buffer overflow attacks, suspicious dialing patterns, connection attempts outside geofenced areas, use of stolen credentials (rapid ramp of calls using one set of credentials), etc.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Asterisk only gives you a rudimentary “failed” message for a failure to register / wrong credentials. And of course fail2ban only responds to Asterisk log messages, so it does little more than ban the annoying script kiddies.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Have a good look at that Voip-Info page and read what actual SIP security systems do. Then compare that to fail2ban and it’s night & day difference. People still think fail2ban is a security system, and Digium is very clear that it is NOT.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.<wbr>digium.com</a> [mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-<wbr>bounces@lists.digium.com</a>] <b>On Behalf Of </b>Kseniya Blashchuk<br><b>Sent:</b> Thursday, August 17, 2017 12:41 AM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion <<a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.<wbr>com</a>><br><b>Subject:</b> Re: [asterisk-users] Detecting DoS attacks via SIP<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p>Well, correct me if I'm wrong, but I would say this conversation you have posted is a bit outdated, now fail2ban can be used with asterisk security log <a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+Security+Event+Logger" target="_blank">https://wiki.asterisk.org/<wbr>wiki/display/AST/Asterisk+<wbr>Security+Event+Logger</a>.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Thu, Aug 17, 2017, 4:53 AM Telium Technical Support <<a href="mailto:support@telium.ca" target="_blank">support@telium.ca</a>> wrote:<u></u><u></u></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm"><p class="MsoNormal">Keep in mind that the attacks you are seeing in the log are ONLY the ones<br>that Asterisk is detecting and rejecting. All other attacks aren't even<br>showing up!<br><br>There's a good discussion of how to secure your PBX here:<br><a href="https://www.voip-info.org/wiki/view/asterisk+security" target="_blank">https://www.voip-info.org/<wbr>wiki/view/asterisk+security</a><br><br>In general, don't let the malevolent traffic get as far as the PBX (block at<br>the firewall). Also, Digium regularly warns users that fail2ban is NOT a<br>security system: <a href="http://forums.asterisk.org/viewtopic.php?p=159984" target="_blank">http://forums.asterisk.org/<wbr>viewtopic.php?p=159984</a><br><br>-----Original Message-----<br>From: <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.<wbr>digium.com</a><br>[mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-<wbr>bounces@lists.digium.com</a>] On Behalf Of mdiehl<br>Sent: Tuesday, August 15, 2017 3:38 PM<br>To: <a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.<wbr>com</a><br>Subject: [asterisk-users] Detecting DoS attacks via SIP<br><br>Hi all,<br><br>Lately, I've seen an increase in the number of attacks against my system<br>from the so-called "Friendly Scanner." When one of these script kiddies<br>targets my server, all I see for symptoms is a few of my trunks become<br>lagged due to server load and a stream of messages on the console that<br>resemble this:<br><br>[Aug 2 20:27:50] == Using SIP VIDEO CoS mark 6<br>[Aug 2 20:27:50] == Using SIP RTP TOS bits 24<br>[Aug 2 20:27:50] == Using SIP RTP CoS mark 5<br>[Aug 2 20:32:47] == Using SIP VIDEO TOS bits 24<br>[Aug 2 20:32:47] == Using SIP VIDEO CoS mark 6<br>[Aug 2 20:32:47] == Using SIP RTP TOS bits 24<br>[Aug 2 20:32:47] == Using SIP RTP CoS mark 5<br>[Aug 2 20:34:26] == Using SIP VIDEO TOS bits 24<br>[Aug 2 20:34:26] == Using SIP VIDEO CoS mark 6<br><br><br>I have to turn on sip debugging to find out who's hitting me. However, I<br>can't just leave it on because it would kill my logging system.<br><br>So, how are other people handling this? Is there an AMI event I want watch<br>for? I watch for PeerStatus, but since there's no actual peer in the<br>attack, I don't seem to get an event from AMI.<br><br>Any ideas?<br><br>Mike Diehl.<br><br>--<br>______________________________<wbr>______________________________<wbr>_________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br><br>Check out the new Asterisk community forum at:<br><a href="https://community.asterisk.org/" target="_blank">https://community.asterisk.<wbr>org/</a><br><br>New to Asterisk? Start here:<br> <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" target="_blank">https://wiki.asterisk.org/<wbr>wiki/display/AST/Getting+<wbr>Started</a><br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-<wbr>users</a><br><br><br>--<br>______________________________<wbr>______________________________<wbr>_________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br><br>Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" target="_blank">https://community.asterisk.<wbr>org/</a><br><br>New to Asterisk? Start here:<br> <a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" target="_blank">https://wiki.asterisk.org/<wbr>wiki/display/AST/Getting+<wbr>Started</a><br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-<wbr>users</a><u></u><u></u></p></blockquote></div></div></div></div></div><br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.<wbr>org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/<wbr>wiki/display/AST/Getting+<wbr>Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-<wbr>users</a><br></blockquote></div><br></div>