LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 06-16-2008, 02:35 PM   #1
afrorobot
LQ Newbie
 
Registered: Jun 2008
Distribution: Fedora 14
Posts: 10

Rep: Reputation: 0
Lightbulb Routing Specific Traffic Through Different Internet Connections


Hello All,

This is my first post and I have a question.

I wish to have legal torrent traffic (for grabbing linux ISOs as I need them) going through a separate connection than my normal Internet/LAN traffic.

I am wondering if, for example, I route all outgoing torrent traffic through the ISP associated with eth1 that it will be received through the same connection and not through the ISP associated with eth0.

The reason I am asking is because I have a slower connection that I don't mind using for torrents while my main connection is tied down to gaming and surfing etc.

So, in asking that I have a few additional questions. Will this have to be configured on a separate box that is the link between all the networks or can I do it from my laptop using iptables and iproute2.

If a diagram is needed to explain the above sentence, I will be happy to draw one up. If I have also been unclear with my question, let me know and I will happily reword it as best I can.

Thanks in advance,
aR
 
Old 06-17-2008, 03:42 AM   #2
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
You can use firewall to route the way you want. You can try with fwbuilder (uses iptables and route) or whichever firewall you want.
 
Old 06-17-2008, 04:16 AM   #3
TaigaIV
LQ Newbie
 
Registered: Jun 2008
Distribution: debian gentoo
Posts: 9

Rep: Reputation: 0
Hello,

All outgoing traffic will be answered to public source IP. If eth0 and eth1 are both public with different IP adress packet will come back on sender interface.

You can do it both way, dedicating a box for this task or using your laptop for this. Iptables iproute2 will do it nicely.

I'm not sure i've perfectly understood problem between box or laptop, give more informations if i've messed with this.

m.e.
 
Old 06-17-2008, 09:18 AM   #4
afrorobot
LQ Newbie
 
Registered: Jun 2008
Distribution: Fedora 14
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you both for the very speedy response,

If I am understanding this correctly it means that if all traffic for torrents has been marked and routed through ethX then that connection's public IP will be the only means in which the torrent traffic will be transmitted?

Best,
aR
 
Old 06-17-2008, 09:24 AM   #5
TaigaIV
LQ Newbie
 
Registered: Jun 2008
Distribution: debian gentoo
Posts: 9

Rep: Reputation: 0
Yes, external peopole can't know your other IP. Don't forget to forward (or allow) incoming connections on this interface to your torrent client program
 
Old 06-17-2008, 09:37 AM   #6
afrorobot
LQ Newbie
 
Registered: Jun 2008
Distribution: Fedora 14
Posts: 10

Original Poster
Rep: Reputation: 0
You're the man. Thanks.

I'll post again if something goes wrong.
 
Old 06-18-2008, 12:10 PM   #7
afrorobot
LQ Newbie
 
Registered: Jun 2008
Distribution: Fedora 14
Posts: 10

Original Poster
Rep: Reputation: 0
Another quick question from me, I am almost done the routing but I was wondering the syntax for a command.

ip route add default via IP dev wlan0 table rule.out

Which IP should that be...the external IP from the ISP I want to use for torrents or the IP of the wlan0 device from my wireless router.

Thanks in advance,

aR
 
Old 06-18-2008, 01:31 PM   #8
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
ip route add default via IP_router table T1
ip route add IP_net dev wlan0 src IP

IP_router: your router's IP
IP_net: the IP of your router net (something like 192.168.1.255)
IP: the IP of your computer on router's net

Well, our firewall does much more, but I think this is enough for you... sorry by lots of editing, but I was just confused.

Bye!!

Last edited by emi_ramo; 06-18-2008 at 01:42 PM.
 
Old 06-23-2008, 03:11 AM   #9
TaigaIV
LQ Newbie
 
Registered: Jun 2008
Distribution: debian gentoo
Posts: 9

Rep: Reputation: 0
Both devices are routers, packet you send them going to be routed. From your local network you don't need to use external network information, just send traffic to one of your local routeurs.

m.e.
 
Old 09-17-2008, 04:57 PM   #10
apnicservices
LQ Newbie
 
Registered: Jul 2008
Location: London, UK
Distribution: Debian
Posts: 23

Rep: Reputation: 16
Have a read of a short article/script I wrote on the subject: http://www.adamsinfo.com/extending-t...-masquerading/

It's based on the lartc.org guide and shows split access and masquerading. Works great for me.
 
  


Reply

Tags
connection, fedora, internet, iproute2, iptables, multiple, routing



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
Routing all internet traffic through a proxy dnoy Linux - Newbie 24 02-08-2022 11:56 AM
Routing multiple Internet connections abhinandan Linux - Networking 9 06-04-2008 05:26 AM
Create 2 pppoe connections and routing traffic through each one squirrelza Linux - Networking 0 07-13-2007 10:53 AM
routing with multiple internet connections sammythesquib Linux - Networking 2 06-05-2007 07:34 AM
Routing Multiple Internet Connections qwertyjoe Linux - Networking 2 11-25-2006 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:56 AM.

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