LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-12-2012, 10:25 AM   #1
cati
LQ Newbie
 
Registered: Apr 2012
Posts: 2

Rep: Reputation: Disabled
Route traffic to certain IP addresses out a certain network interface


Hello, all! I have a desktop with an ethernet connection to a private, internal network and a wireless connection to a public, external network. I want to make sure only connections to 10.*.*.* goes over the private interface and all other traffic goes over the public interface. The private interface can route traffic out to the external network, but I don't want it to.

I am familiar with route and iptables, but I don't see anything in the man pages about how to do this. How can I implement this?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-13-2012, 04:06 AM   #2
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
ip route add 0.0.0.0/0 dev wlan0
ip route add 10.0.0.0/8 dev eth0

Just change the interface names to match yours.
Nice reference for the ip set of commands at http://linux-ip.net/gl/ip-cref
 
2 members found this post helpful.
Old 04-13-2012, 08:51 AM   #3
cati
LQ Newbie
 
Registered: Apr 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks!
 
  


Reply


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
[SOLVED] How do I route traffic from a single host through a specific interface? sab0teur Linux - Networking 3 07-23-2014 05:14 AM
Route all traffic received by an interface to another and vice versa neokplexian Linux - Networking 2 03-03-2011 04:41 PM
IPtables: Route outgoing traffic from internal host to only go a internet interface predatorz Linux - Networking 4 11-24-2010 09:05 AM
Route all HTTP traffic through wired interface on workstation jvolkman Linux - Networking 5 11-29-2006 08:51 PM
Route all traffic of a given type to an interface tsweatt Linux - Networking 0 09-01-2003 12:24 PM


All times are GMT -5. The time now is 03:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration