[OpenSIPS-Users] mhomed OpenSIPs behind NAT - How to control NAT IP
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Apr 2 12:03:16 UTC 2025
Hi Antonioss,
See the "advertise" option - there is a global one, or a per-socket on:
https://www.opensips.org/Documentation/Script-CoreParameters-3-5#advertised_address
https://www.opensips.org/Documentation/Script-CoreParameters-3-5#socket
(the AS option)
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
https://www.opensips-solutions.com
https://www.siphub.com
On 02.04.2025 15:00, Antonios Psaras wrote:
>
> Hello Johan
>
> Thank you for your prompt reply.
>
> My question is how do I force opensips not to use NAT IP which is
> defined on socket level?
>
> As you mention rtpengine as well, what flags should I pass in order
> not to use the NAT IP which is also defined as configuration on
> “external” interface.
>
> Thank you once more for your support.
>
> *Antonis Psaras*
>
> *From:* Johan De Clercq <Johan at democon.be>
> *Sent:* Τετάρτη, 2 Απριλίου 2025 13:23
> *To:* apsaras at microbase.gr; OpenSIPS users mailling list
> <users at lists.opensips.org>
> *Subject:* Re: [OpenSIPS-Users] mhomed OpenSIPs behind NAT - How to
> control NAT IP
>
> Antonias,
>
> yes you can. You need to if then else the stuff. if $si==1.2.34 then
> use nat
>
> else don't use nat.
>
> Note, not only for opensips headers, but you will also need different
> flags for rtpengine.
>
> Op wo 2 apr 2025 om 11:35 schreef Antonios Psaras <apsaras at microbase.gr>:
>
> Dear all.
>
> I have the following setup.
>
> OpenSIPs Server has two interfaces (DMZ / LAN). DMZ is behind NAT.
> RTP Engines is also configured.
>
> Everything was fine until an end point with in DMZ asked for SIP
> Trunking. The issue here is that if DMZ Client tries to connect to
> OpenSIPs DMZ interface, OpenSIPs will reply with NAT IP on SIP
> body as well as NAT IP on SDP.
>
> My thought is to create an other socket on DMZ interface with a
> different port without NAT configuration and ask the DMZ Client to
> connect on that interface. That will required extra configuration
> per peer as I will need to specify the preferred communication
> socket ie on load balancing configuration. Moreover I should
> configure a new RTPEngine Service without NAT configuration and
> route those calls to that one.
>
> Most probably the above scenario will work but I am looking for
> any alternatives to minimize configuration and complexity.
>
> Is there any way to control the usage of NAT IP on OpenSIPs
> script. Ie if source IP is with in DMZ do not send NAT IP in SIP
> Headers.
>
> Regards
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20250402/1b0d1dbc/attachment-0001.html>
More information about the Users
mailing list