LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   forcing traffic through certain route(forcing source ip) (http://www.linuxquestions.org/questions/linux-networking-3/forcing-traffic-through-certain-route-forcing-source-ip-609228/)

taltman 12-26-2007 11:40 AM

forcing traffic through certain route(forcing source ip)
 
I have a box with two nics one has a public ip and the other has a private ip. The public ip is used only for forwarding and has routes setup to the internet. The private ip is used for management and has routes setup to the internet

Basically, I want the routes to work in such a way that any traffic the box generates goes through the private network to reach the internet.

I tried setting up a separate table for the private nic and routing all traffic with the private source ip through that table. However, linux always seems to choose the public ip for the source ip. How can I force linux by default to pick a certain source ip over another?

If I type "ping google.com" into the box, linux chooses the public ip as the source address. I want it to choose the private ip.

geek1234 12-26-2007 01:07 PM

sorry misread your question


All times are GMT -5. The time now is 08:02 PM.