Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Technical

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th July 2007, 20:59
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,146
Thanks: 4
Thanked 55 Times in 51 Posts
Default Routing applications to certain network cards

Hiho

I think I have a difficult question:

I have two network cards (1 wifi & 1 ethernet). At home I can connect with the wifi card to my uni-network or I can use my normal internet access by ethernet/wifi.

Now, the uni-network is limited but very quick. The normal inet access is not limited but, compared to the uni-network, slow.

How could I make now that certain programs use exclusively only one of the network cards? E.g. browser, email, ... only use the wifi-card connected to the uni network
And stuff like irc (is blocked at university) only use my normal ethernet card with my normal inet access?

Currently I'm using Ubuntu Feisty.
Reply With Quote
Sponsored Links
  #2  
Old 25th July 2007, 16:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

Hm, good question. Maybe this can be done with iptables?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 26th July 2007, 07:06
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,146
Thanks: 4
Thanked 55 Times in 51 Posts
Default

well, I think it can be done with iptables since the applications use specific ports but I haven't ever played around with iptables.

Another thing I stumbled accross is "socks" but I'm not sure if I get the concept of what that is.
Reply With Quote
  #4  
Old 7th August 2007, 10:08
geekman geekman is offline
Member
 
Join Date: Sep 2006
Location: Sydney, Australia
Posts: 56
Thanks: 1
Thanked 10 Times in 10 Posts
Send a message via ICQ to geekman Send a message via MSN to geekman
 
Default

I think you might be able to do something like this?

Make website traffic go through eth1
iptables --insert OUTPUT 1 --dport 80 --jump ACCEPT --out-interface 'eth1'

Make Bit Torrent go through eth0

iptables --insert OUTPUT 1 --dport 6881 --jump ACCEPT --out-interface 'eth0'

Though this is totally untested and iptables may not even like that syntax of using dport...not sure. I just based it off some routing I already to with IPTables where I say: if traffic is coming from here and going to there use this interface.
if traffic is coming from somewhere else and going here then use this interface instead.

Just a note, you'd want basically the same rules but for the source port also so both incoming and outgoing traffic goes through the right Interface. A further edit you'd need to use --in-interface instead for these rules...just a guess, and there might be a more efficient way of doing it too i.e. only needing one rule per port.

Thanks.

Last edited by geekman; 7th August 2007 at 10:12.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Identical network cards in ipcops Imran Installation/Configuration 7 23rd August 2009 01:10
Slow network performance reading data JoeySpace Installation/Configuration 2 10th April 2007 17:42
routing configuration dimas Installation/Configuration 2 4th August 2006 22:32
Perfect Xen 3.0 setup for Debian gurneyzap HOWTO-Related Questions 4 26th March 2006 11:30
Network Cards and access mphayesuk Installation/Configuration 3 5th March 2006 10:33


All times are GMT +2. The time now is 21:13.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.