<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">How would checking $rP help?<div><br></div><div>Kamailio won’t process HTTP requests on a TCP SIP listener since they lack the SIP/2.0 request line signature.</div><div><br></div><div>It’ll process them through xhttp, though. Is that the context in which this is an issue? If so, just expose your xhttp resources via an obscure URL ($hu) and deny anything else.</div><div><br><div dir="ltr">—<div>Sent from mobile, with due apologies for brevity and errors.</div></div><div dir="ltr"><br><blockquote type="cite">On Mar 8, 2021, at 4:01 PM, Ben Kaufman <ben.kaufman@altigen.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->


<div class="WordSection1">
<p class="MsoNormal">I’ve set up a server listening on TCP recently, and notice that I’m receiving intermittent, random HTTP requests from the internet.  While it would probably be a good idea to enforce a firewall rule to only allow known hosts to communicate,
 what would be the best way within Kamailio to ignore http requests?  Would just checking $rP work?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Ben Kaufman<o:p></o:p></p>
<p class="MsoNormal"><a href="mailto:ben.kaufman@altigen.com"><span style="color:#0563C1">ben.kaufman@altigen.com</span></a><o:p></o:p></p>
<p class="MsoNormal">Director of Cloud Operations<o:p></o:p></p>
<p class="MsoNormal">AltiGen Communications, Inc.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>


<span>_______________________________________________</span><br><span>Kamailio (SER) - Users Mailing List</span><br><span>sr-users@lists.kamailio.org</span><br><span>https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</span><br></div></blockquote></div></body></html>