LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-26-2007, 11:40 AM   #1
taltman
Member
 
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 google.com" into the box, linux chooses the public ip as the source address. I want it to choose the private ip.
 
Old 12-26-2007, 01:07 PM   #2
geek1234
Member
 
Registered: Apr 2007
Posts: 38

Rep: Reputation: 15
sorry misread your question

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


Reply



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 05:59 PM
LXer: Open source forcing shift in software buying LXer Syndicated Linux News 0 02-17-2006 02:01 AM
Forcing permissions tsphan Linux - General 2 02-27-2005 04:10 PM
Forcing Vesa Magician Linux - Hardware 1 11-23-2003 09:18 PM
forcing boot from cd nocturnal Slackware 1 11-19-2003 04:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:36 AM.

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