
24th July 2007, 21:59
|
|
Pseudo Lawyer
|
|
Join Date: Apr 2006
Location: Switzerland
Posts: 857
Thanks: 3
Thanked 25 Times in 23 Posts
|
|
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.
|

25th July 2007, 17:34
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,843
Thanks: 781
Thanked 1,557 Times in 1,476 Posts
|
|
Hm, good question. Maybe this can be done with iptables?
|

26th July 2007, 08:06
|
|
Pseudo Lawyer
|
|
Join Date: Apr 2006
Location: Switzerland
Posts: 857
Thanks: 3
Thanked 25 Times in 23 Posts
|
|
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.
|

7th August 2007, 11:08
|
|
Member
|
|
Join Date: Sep 2006
Location: Sydney, Australia
Posts: 56
Thanks: 1
Thanked 7 Times in 7 Posts
|
|
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 11:12.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 13:17.
|
Recent comments
4 hours 44 min ago
10 hours 47 sec ago
10 hours 11 min ago
10 hours 19 min ago
11 hours 21 min ago
13 hours 29 min ago
15 hours 54 min ago
16 hours 12 min ago
16 hours 21 min ago
17 hours 36 min ago