On a linux box we have three network interfaces, they look like below
| CentOS 6 Server
| ---------> eth0 (DHCP (192.168.1.x) Default Gateway, connects to a wired internet,
|----------> eth1 (IP : (10.165.11.139) GW to be used : (10.165.11.137), connects to a network A
|----------> eth2 (IP : (10.150.114.190) GW to be used: (10.150.114.191), connects to a network B
Problem here is that both network A and network B have nodes with same IP, example :
10.232.130.171
10.232.130.172
10.232.131.100
route-eth1 file looks like:
10.232.130.0/24 via 10.165.11.137
10.232.131.0/24 via 10.165.11.137
route-eth2 file looks like:
10.232.130.0/24 via 10.150.114.189
10.232.131.0/24 via 10.150.114.189
so pinging 10.232.130.171 will always route it thru eth1 and not eth2 tried with application which binds with interface (asterisk PBX), incoming connection from above IP work fine, but any response to it is sent via eth1, hence rejected.
Any pointers how to resolve this?