Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-26-2007, 12:40 PM   #1
Registered: Jun 2004
Posts: 41

Rep: Reputation: 15
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" into the box, linux chooses the public ip as the source address. I want it to choose the private ip.
Old 12-26-2007, 02:07 PM   #2
Registered: Apr 2007
Posts: 38

Rep: Reputation: 15
sorry misread your question

Last edited by geek1234; 12-26-2007 at 02:20 PM. Reason: misread your question


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forcing Device ID logic-phyber Fedora 5 07-16-2006 06:59 PM
LXer: Open source forcing shift in software buying LXer Syndicated Linux News 0 02-17-2006 03:01 AM
Forcing permissions tsphan Linux - General 2 02-27-2005 05:10 PM
Forcing Vesa Magician Linux - Hardware 1 11-23-2003 10:18 PM
forcing boot from cd nocturnal Slackware 1 11-19-2003 05:08 PM

All times are GMT -5. The time now is 11:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration