Asterisk with Dual IP/NIC Source address
Closed - This job posting has been filled and work has been completed.
We have an Asterisk server with 2 IP address (1 Physical card) and we want to make it work through both IP as a seperate trunks.
IP address for eth0: 192.168.1.10
IP address for eth0:0: 192.168.1.210
We are accessing both IPs externally through different Public IP.
(i.e. 175.x.x.x --> 192.168.1.3(GW1) --> 192.168.1.210 and 202.x.x.x -->192.168.1.1(GW2) --> 192.168.1.10)
We are being successful in getting SSH and other functions normally and can access server externally using 2 IPs,
However, for SIP when registration request comes it uses source address as 192.168.1.10 always (even for inbound request to 192.168.1.210) and as a result client cant get registered through 175.x.x.x.--> 192.168.1.210.
10:07:06.293653 IP 27.x.x.x.54544 > 192.168.1.210.5060: SIP, length: 578
10:07:06.293911 IP 192.168.1.10.5060 > 27.x.x.x.54544: SIP, length: 595
(look above, it is replying with 192.168.1.10 src IP instead of 192.168.1.210)
But for other service it is ok (e.g. ICMP)
e.g ICMP for reply the source IP is same as on which request is received(192.168.1.210)
10:02:52.695348 IP 27.x.x.x > 192.168.1.210: ICMP echo request, id 1, seq 1037, length 40
10:02:52.695361 IP 192.168.1.210 > 27.x.x.x: ICMP echo reply, id 1, seq 1037, length 40
(Reply from the same source where it receives request.)
Asterisk version is 184.108.40.206 and server Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-37)
Can anyone provide us solution to make SIP and RTP working through the same GW and it is received like other traffic?
Skills: gnu, linux