Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dual Internet and Application Routing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lazx888
Tux's lil' helper
Tux's lil' helper


Joined: 13 Sep 2005
Posts: 118

PostPosted: Mon Jan 16, 2006 6:35 pm    Post subject: Dual Internet and Application Routing Reply with quote

I have 2 internet connections through eth0 and eth1. I was wondering how I would go about having certain applications traffic going strictly through eth1 and all other traffic going over eth0?

Thanks
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Mon Jan 16, 2006 7:13 pm    Post subject: Reply with quote

iptables can do that easily, with rules like "for proto tcp port 80, goto eth0; for proto udp port 53, goto eth1".
Outgoing as well, if you like.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
lazx888
Tux's lil' helper
Tux's lil' helper


Joined: 13 Sep 2005
Posts: 118

PostPosted: Mon Jan 16, 2006 7:43 pm    Post subject: Reply with quote

what if the listening ports change? I essentially want a proxy server like application... I am not sure if iptables can do this, but if it can, that would be great... I really don't want to install a server for this use
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Mon Jan 16, 2006 7:49 pm    Post subject: Reply with quote

I have no idea what you mean - "listening ports change" ? Change why ? For what ?

The idea is that port numbers never ever change.
You would not be able to do anything useful on the Internet if they did.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
lazx888
Tux's lil' helper
Tux's lil' helper


Joined: 13 Sep 2005
Posts: 118

PostPosted: Tue Jan 17, 2006 3:30 am    Post subject: Reply with quote

for example, ssh... lets say I am trying to ssh into a couple servers, server 1 is listening on port 22, server 2 on port 23 and so on... I want my ssh client to only use eth1 while the rest of my traffic goes over eth0

is that more clear now?
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Jan 17, 2006 7:48 pm    Post subject: Reply with quote

Not at all - from where do you want to reach those ssh servers ?
If you're on the same network, or on any routable network, why would you want to change the ports ?

If you mean you want to reach them from the outside, you'll have to set up some way to route to the appropriate interface first - load balancing is not possible (at least, you can't do it.)

You could set up a dyndns / no-ip domain with different hostnames for the interfaces.
Beyond that, there's not much you can do from home.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
lazx888
Tux's lil' helper
Tux's lil' helper


Joined: 13 Sep 2005
Posts: 118

PostPosted: Tue Jan 17, 2006 9:55 pm    Post subject: Reply with quote

All I want to be able to do is essentially load balancing... but I want it to be application based (port independent).

Sorry if this is not making sense, haven't done much networking
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Thu Jan 19, 2006 8:28 pm    Post subject: Reply with quote

You can distribute different apllications over different connections for a kind of manual load balancing.

You'd have to set up proper DNS entries for this to work from the outside.

True load balancing can only be attained when your ISP supports line bonding - and if they're two different ISPs, just plain forget about it.

So yes, it should be simple to do what you asked.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum