Latest LQ Deal: Linux Power User Bundle
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 04-12-2012, 10:25 AM   #1
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
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
ip route add dev wlan0
ip route add dev eth0

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

Original Poster
Rep: Reputation: Disabled


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 > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:25 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