LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-19-2008, 08:42 AM   #1
binary_dreamer
Member
 
Registered: Feb 2006
Distribution: debian squeeze
Posts: 199

Rep: Reputation: 31
2 connections 2 routes


Hi. i am running ubuntu 8.04 in a laptop.
through the wired connection i am currently connected to an aDSL modem router Linksys wag354g. My network is 192.168.1.0 /24
Also my neighbor has the same model of router and i am connected through the wireless of my laptop to his router. His network is 172.16.1.0 /24

My question is how to connect to both networks simultaneously and divide the traffic between the two connections based on application. For example i would like to have the internet browsing to go through the wired connection (network 192.168.1.0) and all the other traffic through the wireless connection (network 172.16.1.0).

Any ideas anyone?
 
Old 09-19-2008, 11:23 AM   #2
Cichlid
Member
 
Registered: Jan 2002
Location: Montreal
Distribution: Ubuntu 8.10
Posts: 178

Rep: Reputation: 30
I'm definitely no expert, but I would think the problem comes in where there is only one IP address provided to your computer. I'm not sure of the possibility of assigning two IPs to one PC. I don't think what you want to do is possible? I'm looking forward to being corrected and seeing what the experts have to say on this.
 
Old 09-19-2008, 11:35 AM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by binary_dreamer View Post
For example i would like to have the internet browsing to go through the wired connection (network 192.168.1.0) and all the other traffic through the wireless connection (network 172.16.1.0).
Use iptables.

You can prevent HTTP traffic from using the wireless connection by using
Code:
iptables -A OUTPUT -s 172.16.1.0/24 -p tcp --dport 80 -j DROP
You can prevent all non-HTTP traffic from using the wired connection by using
Code:
iptables -A OUTPUT -s 192.168.1.0/24 -p tcp ! --dport 80 -j DROP
You will also want to add similar rulres for HTTPS (--dport 443).

WARNING: I do not have a way of completely testing this at the moment, but this should put you on the right track.
 
  


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
Debian with two internet connections - one of the routes take long to ... cusco Linux - Networking 9 07-07-2008 05:58 PM
Static routes using routes/ifroutes-eth-id.. files and default gateway disabled TimtheEagle Linux - Networking 0 05-31-2008 07:08 PM
Routes Obie Linux - Networking 16 04-28-2005 10:15 PM
I need some routes |Drakehash| Linux - Newbie 1 06-08-2003 12:22 AM
I need some routes |Drakehash| Linux - Networking 1 06-07-2003 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 03:15 PM.

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