<div dir="ltr">Hi Mark<div><br></div><div>In case it is helpful for your situation what we do is as follows:</div><div><br></div><div>We use 1 box as a sort of SBC, where we do all our IP authentication and then we route the call through to various call processing boxes using the kamailio dispatcher module.</div>
<div><br></div><div>On our dispatcher box we test the ip and from uri as a pair of the connecting party via the allow_trusted function and then on the callprocessing boxes we make sure the messages are coming from the dispatcher box via the allow_source_address function. user credentials authentication is passed through from the dispatcher to the callprocessing box in our set up.</div>
<div><br></div><div>Using the dispatcher module all our sip traffic first passes through the dispatcher (which sounds similar to what you want to accomplish I believe).</div><div><br></div><div>Here are the 2 modules I mentioned above:</div>
<div><br></div><div><a href="http://kamailio.org/docs/modules/3.1.x/modules_k/dispatcher.html">http://kamailio.org/docs/modules/3.1.x/modules_k/dispatcher.html</a><br></div><div><br></div><div><a href="http://kamailio.org/docs/modules/3.0.x/modules_k/permissions.html">http://kamailio.org/docs/modules/3.0.x/modules_k/permissions.html</a><br>
</div><div><br></div><div>This a fairly basic set up we have so hopefully you can put together something similar if it suits your needs.</div><div><br></div><div>All the best.</div><div><br></div><div>Will Ferrer</div><div>
<br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 10, 2013 at 2:39 AM, Mark D. Montgomery II <span dir="ltr"><<a href="mailto:techiem2@techiem2.net" target="_blank">techiem2@techiem2.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Here's the issue:<br>
I have a FreePBX server running at a location that<br>
1.  Is not directly accessible from all the outside locations I would be at<br>
2.  I don't want the SIP ports directly open to it from the whole world anyway for security reasons.<br>
<br>
I have a VPS that I am currently using as a pure SIP redirector via firewall rules, and the main location allows connection from the VPS only.<br>
<br>
The issue I've run into (which is the same issue as having the main server open to the world), is that I still get a fair number of exploit hits to the server.<br>
<br>
What I'd like to do is use Kamailio as an authenticating proxy so I could use fail2ban on the VPS to ban the offenders when they try to exploit the server.<br>
Basically I want Kamailio to handle passing authentication back and forth from the client to the actual server and then handle proxying the full connection when the auth is correct.<br>
<br>
Is this doable?<br>
If so, how would I go about setting it up?<br>
It looks like Kamailio should be able to do just about anything, but I don't know where to start.<br>
<br>
Thanks.<span class="HOEnZb"><font color="#888888"><br>
<br>
Mark II<br>
<br>
-- <br>
Mark D. Montgomery II<br>
<a href="http://www.techiem2.net" target="_blank">http://www.techiem2.net</a><br>
<br>
</font></span><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>