<div dir="ltr">you can try place haproxy + NAT on your own Linux router.<div>In this case inbound connections with be delivered via HAproxy.<br>Outbound connections will be NAT-ed on the same host, to the same IP.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 8, 2020 at 6:31 PM Joey Golan <<a href="mailto:joeygo@gmail.com">joeygo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div>
<div name="messageBodySection">
<div dir="auto">Hello,<br>
I have a kamailio server running behind HAProxy with proxy protocol v2 enabled.<br>
In Kamailio I have set the parameter tcp_accept_haproxy=yes and loaded tcpops module.<br>
UEs are registered using TLS and kamailio sees that the message has received from their real ip address + port and not HAProxy ip + port.<br>
When UE A calls UE B, kamailio is trying to reach UE B using his real ip address and port instead of HAProxy IP address + port.<br>
<br>
I know I can get the tcp ip and port of HAProxy using $tcp(c_si) and $tcp(c_sp) but I can’t make it work.<br>
What is the right way to do this? How should I use these variables properly in order to establish the call successfully?<br>
<br>
Thanks,<br>
Joey.</div>
</div>
</div>

_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>