Sorry to hijack but I am faced with a similar problem.
I have two NICs. Eth0 and Eth1.
One is connected to my private network and the other to my public network.
If I specify my default gw in my eth0 config then all is well on the private side but the box is publically inaccessible. Vice versa if I set the gw in my eth1 config.
I can ping both interfaces.
So, time to crack out the route command.
I tried adding a default gw for both networks...
Code:
[root@yum ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
203.38.38.38 0.0.0.0 255.255.255.224 U 0 0 0 eth1
10.0.8.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 203.38.38.38 0.0.0.0 UG 0 0 0 eth1
[root@yum ~]# route add default gw 10.0.8.1 eth0
[root@yum ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
203.38.38.38 0.0.0.0 255.255.255.224 U 0 0 0 eth1
10.0.8.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 10.0.8.1 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 203.38.38.38 0.0.0.0 UG 0 0 0 eth1
Now there is no metric differnce but I thought that the interface value would be enough to distinguish the traffic.
However, this is not the case. With the above route table I can reach services on my public IP (like SSH) but not my private. Again, both are pingable.
I have checked config files of services and they are configured to bind to all interfaces.