I'm sure this is an easy routing question, but I've been banging my head over it for hours now.
Centos 5. eth1 private. 10.0.0.12/24 gw 10.0.0.1 eth0 public 216.234.x.x gw 216.234.x.x
route command
Destination Gateway Genmask Flags Metric Ref Use Iface
216-234-x-x. 216-234-x-x. 255.255.255.255 UGH 0 0 0 eth0
216.234.x.x * 255.255.255.248 U 0 0 0 eth0
10.0.0.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 1002 0 0 eth0
link-local * 255.255.0.0 U 1003 0 0 eth1
default 10.0.0.1 0.0.0.0 UG 0 0 0 eth1
responds fine to pings on private interface. can route to the internet. But I can't get it to respond to pings on it's public interface.
This is a FreePBX server. The route to the 216.234.x.x is to my sip provider.
I'm a bit of a linux idiot. I've searched every linux route q and A possible but I think I'm not looking for the correct one.
Thanks!
EDIT. I only want SIP and SSH to go in and out of the public interface. Otherwise, everything else should go out the private interface.
I assume that you're not pinging from the SIP provider IP.
The problem is that the route for the ping responses is via eth1, which isn't going to get to the source. You need source policy routing to get the responses to go back out eth0.
Assuming that 216.234.0.1 is your gateway and 216.234.0.10 is your public IP.
Create a new routing table (only needs to be done once).
Add a default route to the new routing table going out eth0.
Add a rule to match packets with the public IP as the source and use the new table.