FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-12-2011, 09:56 AM
Emmanuel Noobadmin
 
Default Choosing network interface to send traffic through

I've got a server that initially was connected to a static WAN
connection via eth0. Now I've added a second NIC eth1 connected to a
local network switch with the intention of using it as a backup remote
access connection via a dynamic ADSL connection.

The problem now is getting the IP address of the dynamic ADSL connection.

I've written a script that updates another server with the current IP
address in order to ssh in which was used on my own home server also
running Centos 5. But in the case of two NICs, I cannot find a way to
make the outbound traffic of the script use eth1 instead of the
default gateway on eth0.

There are instructions on using iproute to ensure that a connection
coming in from eth1 will work properly. But this only appears to work
for when the connection is initiated externally through eth1.

The only way I found that might work is adding a static route, but
then this assumes that I'll always be connecting from the same
external IP.

Does anybody know if what I'm trying to achieve is possible?
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-12-2011, 12:04 PM
Ljubomir Ljubojevic
 
Default Choosing network interface to send traffic through

Emmanuel Noobadmin wrote:
> I've got a server that initially was connected to a static WAN
> connection via eth0. Now I've added a second NIC eth1 connected to a
> local network switch with the intention of using it as a backup remote
> access connection via a dynamic ADSL connection.
>
> The problem now is getting the IP address of the dynamic ADSL connection.
>
> I've written a script that updates another server with the current IP
> address in order to ssh in which was used on my own home server also
> running Centos 5. But in the case of two NICs, I cannot find a way to
> make the outbound traffic of the script use eth1 instead of the
> default gateway on eth0.
>
> There are instructions on using iproute to ensure that a connection
> coming in from eth1 will work properly. But this only appears to work
> for when the connection is initiated externally through eth1.
>
> The only way I found that might work is adding a static route, but
> then this assumes that I'll always be connecting from the same
> external IP.
>
> Does anybody know if what I'm trying to achieve is possible?

You need policy routing. And it is possible. My suggestion is to use
shorewall (http://www.shorewall.net/), there are rpm's for download, and
use it's "Mult-ISP" feature (http://www.shorewall.net/MultiISP.html).

Webmin can be of some help with setting it, it even supports manual edit
of config files (you will need it for part of the setup.)

Ljubomir
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 02:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org