[SR-Users] Kamailio behind HAProxy

Sergey Safarov s.safarov at gmail.com
Sun Nov 8 18:44:51 CET 2020


you can try place haproxy + NAT on your own Linux router.
In this case inbound connections with be delivered via HAproxy.
Outbound connections will be NAT-ed on the same host, to the same IP.

On Sun, Nov 8, 2020 at 6:31 PM Joey Golan <joeygo at gmail.com> wrote:

> Hello,
> I have a kamailio server running behind HAProxy with proxy protocol v2
> enabled.
> In Kamailio I have set the parameter tcp_accept_haproxy=yes and loaded
> tcpops module.
> UEs are registered using TLS and kamailio sees that the message has
> received from their real ip address + port and not HAProxy ip + port.
> 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.
>
> 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.
> What is the right way to do this? How should I use these variables
> properly in order to establish the call successfully?
>
> Thanks,
> Joey.
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20201108/4dad9aba/attachment.htm>


More information about the sr-users mailing list