[SR-Users] IP Address used for outgoing Packets?

Keith Whyte keith at rhizomatica.org
Sun May 14 02:40:30 CEST 2017


Hi All,

tl;dr - Kamailio is sending traffic to the Voip server with a source IP
of the private (vpn) interface.

For some weeks, I've been experimenting with Kamailio v 4.4.4, trying
different options, including running (or not) a vpn interface on
the kamailio server with and without NAT/rtpproxy. I have not as yet
fully "installed" kamailo with database etc, I have just been playing
with the config file, mostly running with -D

For most of the configurations I tried, I was routing SIP to/from the
VPN via another box on the network, and I tried to get RTP streams
running without using rtpproxy, sometimes it worked, but I have two many
double/triple NAT problems with some of the freeswitch nodes.

Now I have decided to run a VPN interface directly on the kamailio
server, for simplicity.

Essentially what I want to do is have kamailio/rtpproxy bridge between
the VPN and the VOIP provider, so it should be a pretty standard NAT config.

My setup looks like this:

VPN CLUSTER of Freeswitch nodes <-10.23.0.1-> KAMAILIO Server
<-192.168.1.1 - gateway - PUBLIC_IP-> Voip Provider

The Kamailio Server has two interfaces, one VPN interface and one facing
the Public Internet.
It is behind a firewall, and so has a private IP address assigned on the
interface, but the is  dedicated public IP that forwards all relevant
ports, and traffic seen on the public side originates from this address.

I have two listen directives,

listen=udp:192.168.1.1:5060 advertise PUBLIC_IP:5060

listen=udp:10.23.0.1:5060

I expected Kamailio to receive SIP INVITE on the 10.23.0.1 address and
forward it to the voip provider via the default route (the 192.168.1.1
address), but it is sending the packet out to the voip provider with a
source address of 10.23.0.1 !!

Can anyone tell me how I can configure this? I cannot find anything
obvious in the manual.

Thanks!







More information about the sr-users mailing list