Binaddr = 0.0.0.0 network looping issue

network environment

br0 Link encap:Ethernet HWaddr 10:6F:3F:02:D0:28
inet addr:192.168.11.1 Bcast:192.168.11.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:266331741 errors:0 dropped:19185 overruns:0 frame:0
TX packets:254268465 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:191290635336 (178.1 GiB) TX bytes:194542748386 (181.1 GiB)


vlan2 Link encap:Ethernet HWaddr 10:6F:3F:02:D0:29
inet addr:27.47.86.46 Bcast:27.47.86.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:368386650 errors:0 dropped:826918 overruns:0 frame:0
TX packets:269549696 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:199767619553 (186.0 GiB) TX bytes:197785647833 (184.2 GiB)

root@DD-WRT:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 27.47.86.1 0.0.0.0 UG 0 0 0 vlan2
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
192.168.11.0 * 255.255.255.0 U 0 0 0 br0
211.47.86.0 * 255.255.255.0 U 0 0 0 vlan2

Softphone IP: 192.168.11.10 (Linphone)

Softphone set outbound proxy as 27.47.86.46

[Issue]
when Softphone send Register message to 27.47.86.46

from the tcpdump I can see the packet send to 27.47.86.46 directly it means.

192.168.11.10 -> 27.47.86.46

but the problem is when asterisk answer the 200ok message to phone will use 192.168.11.1 (private IP)
192.168.11.1 -> 192.168.11.10

because of the message does not come from the 192.168.11.1 the Softphone will drop the 200ok message and send register message again and again.

How can i resolve this problem?
please do not let me bind only one IP because i need to use both private IP and public IP

Hope someone can help me thank you …

Configure the phone to use the private address.

Disable the security check on the phone; matching the response can be done based on the call-id etc. and doesn’t need the IP level addresses.

I think Asterisk will let the OS choose the source IP address.

There are clever things you could do with IP tables, but you will still have the problem that Asterisk will send Contact headers based on the OS choice of source address for that destination. I’m not sure to what extent you can hack the routing tables early enough to override that.

Thank you for your Reply .

Because of the some reason i have to configure the phone as public IP.

would you please let me know the detail about the how to disable the security check on the phone?
do i need change linphone source and compile it? or just change some configuration?

Thanks,

[quote=“david55”]Configure the phone to use the private address.

Disable the security check on the phone; matching the response can be done based on the call-id etc. and doesn’t need the IP level addresses.

I think Asterisk will let the OS choose the source IP address.

There are clever things you could do with IP tables, but you will still have the problem that Asterisk will send Contact headers based on the OS choice of source address for that destination. I’m not sure to what extent you can hack the routing tables early enough to override that.[/quote]

No idea how to disable the check. It might involve buying a less fussy phone. All I’m saying is that it is a security check because it is unnecessary for SIP to operate, and may break some proxy configurations.