<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">There’s a good write up from Alex Balashov on NAT, Kamailio, and the sorcerers stone. <div><br></div><div><a href="http://www.evaristesys.com/blog/server-side-nat-traversal-with-kamailio-the-definitive-guide/">http://www.evaristesys.com/blog/server-side-nat-traversal-with-kamailio-the-definitive-guide/</a><br><div><br><div dir="ltr">-- Fred<div><br></div><div><br></div></div><div dir="ltr"><br><blockquote type="cite">On Sep 28, 2020, at 9:00 PM, George Diamantopoulos <georgediam@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="auto">Received parameter is always added to via, and is part of the core sip RFC. This is how responses are routed.<div dir="auto"><br></div><div dir="auto">To get nat traversal on kamailio, you generally need the following in addition:</div><div dir="auto"><br></div><div dir="auto">- Received only handles address masquerading, for port translation you also need to look at rport.</div><div dir="auto">- A way to perform nat traversal for subsequent in dialog requests, and additionally for initial requests involving location lookup. This is where nathelper or similar must be involved.</div><div dir="auto">- Prevent UDP Connection Tracking Timeout on NAT boxes (keeping nat alive). This can be achieved in many ways, including configuration on NATed devices (low registration expiration, keepalives) but it's better to employ keepalive functionality by kamailio modules (nathelper or usrloc ka, for example).</div><div dir="auto"><br></div><div dir="auto">The actual way to perform these tasks is a bit more involved, and I'd suggest looking at the kamailio sample configuration file which should work for most cases.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 28 Sep 2020, 19:36 Duarte Rocha, <<a href="mailto:duarterocha91@gmail.com" target="_blank" rel="noreferrer">duarterocha91@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto">Greetings, </div><div dir="auto"><br></div><div dir="auto">When NAT is detected in my Kamailio, the proxy add the parameter "received" to the Via header which includes the source IP.</div><div dir="auto"><br></div><div dir="auto">What is the mechanic or function responsible for this behaviour? Does it come from the NATHELPER module?</div><div dir="auto"><br></div><div dir="auto">Best Regards,</div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></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></div></body></html>