<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">If you want to do this, put a proxy out in front... Doing it in freeswitch would require a complete rewrite of the sip module.<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 1, 2016, at 4:05 PM, Oleg Stolyar <<a href="mailto:olegstolyar@gmail.com" class="">olegstolyar@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Thanks guys! IP tables is how we block most traffic but we can only block traffic by port. In this case it's about invalid INVITES coming in on a valid port.<div class=""><br class=""></div><div class="">Do you think this functionality would be useful? </div><div class="">Is it worth opening a feature request and perhaps putting a bounty on it? </div><div class="">Any idea of the effort?</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Jun 1, 2016 at 1:00 PM, Michael Jerris <span dir="ltr" class=""><<a href="mailto:mike@jerris.com" target="_blank" class="">mike@jerris.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">The only way with our current sip module to accomplish either of these would be to put a sip proxy out front to handle that behavior, or to somehow use iptables to block the traffic<div class=""><div class="h5"><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 1, 2016, at 3:40 PM, Oleg Stolyar <<a href="mailto:olegstolyar@gmail.com" target="_blank" class="">olegstolyar@gmail.com</a>> wrote:</div><br class=""><div class=""><div dir="ltr" class=""><div class="">Hi,</div><div class=""><br class=""></div>In order to protect against scanning attacks I'd like for FS to not respond to INVITES unless they match certain conditions. <div class=""><br class=""></div><div class="">I understand that currently FS always responds with 100 Trying right away before processing the call and then, if the call does not match anything in the dialplan, responds with a 302 Moved Temporarily.</div><div class=""><br class=""></div><div class="">The 302 can be replaced with another response code (for example 403 Forbidden which is what I am doing now) using the <b class="">respond</b> dialplan app. However, that might encourage the scanner to keep trying.</div><div class=""><br class=""></div><div class="">So I guess there are two questions:</div><div class=""><br class=""></div><div class="">1. Is there a way not to send back 100 Trying at all?</div><div class=""><br class=""></div><div class="">2. Is there a way to not send any final response?</div></div></div></blockquote></div><br class=""></div></div></div></div></blockquote></div></div></div></blockquote></div><br class=""></div></body></html>