<p dir="ltr">Paul, thanks for the reply. I&#39;ll definitely check this out on Monday.</p>
<p dir="ltr">Thank you,</p>
<p dir="ltr">Brian Foster<br>
Project Manager/Owner&#39;s Rep.<br>
Davri Investments, Inc.<br>
O: 317-787-2686 x2102<br>
M: 317-600-9753<br>
E: <a href="mailto:bdfoster@davri.com">bdfoster@davri.com</a><br>
Indianapolis, Indiana</p>
<p dir="ltr">Sent from a mobile device.</p>
<div class="gmail_quote">On Aug 9, 2013 9:03 PM, &quot;Paul&quot; &lt;<a href="mailto:pasha@prosperity4ever.com">pasha@prosperity4ever.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Brian,<div><br></div><div>Typically what happens is your external source sends the packet to your external IP (which is the WAN ip of the openWRT router), the router receives it, and if there are NAT rules defined, it will rewrite the source (in the DNAT case) to the internal IP of your FS (or webserver, etc), you can have it do it based on port it comes in on, ip it comes from, etc. It also should do the same on the way out of your network so that the 2 devices can have a bi-directional communication.</div>
<div><br></div><div>If your SIP packets on FS are coming with the source as 10.0.0.1 (your router&#39;s internal interface) it sounds to me like your NAT isn&#39;t configured right. Double check all of your NAT re-write rules.</div>
<div><br></div><div>I did this over an openVPN setup (haven&#39;t done it from WAN -&gt; LAN on openWRT, but in the openWRT example I remember it being quite simple, you didn&#39;t have to write all the rules manually, you just had to enable masquerading on 
 the proper zones and it took care of NAT.</div><div><br></div><div>I think you would have to write it manually in your case because it sounds like you&#39;re looking to route different traffic coming in to the same IP to different internal systems depending on what port they come in on.</div>
<div><br></div><div>Try something along the lines of: <a href="https://forum.openwrt.org/viewtopic.php?id=35106" target="_blank">https://forum.openwrt.org/viewtopic.php?id=35106</a></div><div><br></div><div>Not sure if I&#39;m helping or confusing you more :)</div>
<div><br></div><div>Paul</div><div><br>On Thu, 8 Aug, 2013 at 3:11 PM, Brian Foster &lt;<a href="mailto:bdfoster@davri.com" target="_blank">bdfoster@davri.com</a>&gt; wrote:<br>
<blockquote type="cite"><p dir="ltr">Like DNAT vs SNAT? Forwarding rules are set to DNAT in luci if that is what you are referring to.</p>
<p dir="ltr">Thank you,</p>
<p dir="ltr">Brian Foster<br>
Project Manager/Owner&#39;s Rep.<br>
Davri Investments, Inc.<br>
O: <a href="tel:317-787-2686%20x2102" value="+13177872686" target="_blank">317-787-2686 x2102</a><br>
M: <a href="tel:317-600-9753" value="+13176009753" target="_blank">317-600-9753</a><br>
E: <a href="mailto:bdfoster@davri.com" target="_blank">bdfoster@davri.com</a><br>
Indianapolis, Indiana</p>
<p dir="ltr">Sent from a mobile device.</p>
<div class="gmail_quote">On Aug 8, 2013 6:00 PM, &quot;Jeff Leung&quot; &lt;<a href="mailto:jleung@v10networks.ca" target="_blank">jleung@v10networks.ca</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">You also may want to see if OpenWRT is doing something called symmetric NAT too. That can cause STUN’s port detection technique to fail completely.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">

<div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Brian Foster<br>

<b>Sent:</b> Thursday, August 8, 2013 2:49 PM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] OpenWRT Router changes public IP to it&#39;s private IP<u></u><u></u></span></p></div></div><p class="MsoNormal">

<u></u> <u></u></p><p>Stun is used on external profile, but I&#39;ll double check to see if they are correct.<u></u><u></u></p><p>Thank you,<u></u><u></u></p><p>Brian Foster<br>Project Manager/Owner&#39;s Rep.<br>Davri Investments, Inc.<br>

O: <a href="tel:317-787-2686%20x2102" value="+13177872686" target="_blank">317-787-2686 x2102</a><br>M: <a href="tel:317-600-9753" value="+13176009753" target="_blank">317-600-9753</a><br>E: <a href="mailto:bdfoster@davri.com" target="_blank">bdfoster@davri.com</a><br>

Indianapolis, Indiana<u></u><u></u></p><p>Sent from a mobile device.<u></u><u></u></p><div><p class="MsoNormal">On Aug 8, 2013 5:08 PM, &quot;Jeff Leung&quot; &lt;<a href="mailto:jleung@v10networks.ca" target="_blank">jleung@v10networks.ca</a>&gt; wrote:<u></u><u></u></p>

<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Use STUN. Ext-rtp-ip and ext-sip-ip addresses are a great way to start looking into this.</span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">You can define stun servers as stun:stunserver.here.tld</span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">

<div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Brian Foster<br>

<b>Sent:</b> Thursday, August 8, 2013 1:38 PM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> [Freeswitch-users] OpenWRT Router changes public IP to it&#39;s private IP</span><u></u><u></u></p></div></div><p class="MsoNormal">

 <u></u><u></u></p><p>We&#39;ve got an openwrt router at a site, it&#39;s private IP is 10.0.0.1. Whenever we get an inbound call on the external profile (and probably outbound calls to, haven&#39;t checked yet), it changes the contact IP to the router&#39;s private IP, so that every call we get looks like it&#39;s coming from thr router. We&#39;ve had some intermittent audio problems recently and we&#39;re trying to narrow things down a bit. Is this the expected behavior for NAT? <u></u><u></u></p>

<p>Sorry might seem like a dumb question, but my job entails much more than keeping the company&#39;s server&#39;s happy and I&#39;m starting to lose my grip and I&#39;m definitely not experienced with NAT.<u></u><u></u></p>

<p>All of my routers in the past have given FS the public IP of the contacting server. I have web servers behind the same NAT and doing the same thing, showing the private IP of the router instead of showing the public IP of the client. So I know it&#39;s not an issue with FS. Just wanted to see if anyone has exoerienced this before. Makes it difficult to use fail2ban on my servers, as it continually jails my router.<u></u><u></u></p>

<p>Thank you,<u></u><u></u></p><p>Brian Foster<br>Project Manager/Owner&#39;s Rep.<br>Davri Investments, Inc.<br>O: <a href="tel:317-787-2686%20x2102" target="_blank">317-787-2686 x2102</a><br>M: <a href="tel:317-600-9753" target="_blank">317-600-9753</a><br>

E: <a href="mailto:bdfoster@davri.com" target="_blank">bdfoster@davri.com</a><br>Indianapolis, Indiana<u></u><u></u></p><p>Sent from a mobile device.<u></u><u></u></p></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt">

<br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>

<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>

<br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>

<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>

UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><u></u><u></u></p>

</div></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div>
</blockquote></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div>