DethPigeon
09-26-2001, 09:55 PM
I have two ADSL connections on RedHat 7.1, set to serve my http/ftp/email server at www.l33t.ca (http://www.l33t.ca) , ppp0 and ppp1. Independantly, both connections work fine, but I run into trouble after setting both as the default route with the following in my rc.local:
iptables -t NAT -A POSTROUTING -j MASQUERADE
ip ro del default
ip ro add default equalize nexthop dev ppp1 weight 1 nexthop dev ppp0 weight 1
The commands go through fine, using the ping tool I see that some ping attempts go through ppp0 while others try to use ppp1. The problem is, it still doesn't really work. For example, I try to ping my home ip address:
ping 24.42.84.165
it tries to go through ppp1, but doesn't work. Then I try specifying the interface
ping -I ppp1 24.42.84.165
and it works! What the heck is going on?
What happens is that those that are inside the network can browse the internet fine through masquerading, however, many from the internet can't access the webserver and other services through ppp1. After a little while, ppp1 just seems to die and those that could connect before, can't.
I've tried this on two totally different servers and connections, using redhat linux, and both do the exact same thing..the connection with the static IP (ppp1 in my case) hosting the the services only works for some people, but then dies after a few minutes.
So the question is, how do I load balance between two ADSL or CABLE connections using linux? Has anyone successfully done it?
I DO have a big CISCO router I can use, but I want to avoid that if possible.
iptables -t NAT -A POSTROUTING -j MASQUERADE
ip ro del default
ip ro add default equalize nexthop dev ppp1 weight 1 nexthop dev ppp0 weight 1
The commands go through fine, using the ping tool I see that some ping attempts go through ppp0 while others try to use ppp1. The problem is, it still doesn't really work. For example, I try to ping my home ip address:
ping 24.42.84.165
it tries to go through ppp1, but doesn't work. Then I try specifying the interface
ping -I ppp1 24.42.84.165
and it works! What the heck is going on?
What happens is that those that are inside the network can browse the internet fine through masquerading, however, many from the internet can't access the webserver and other services through ppp1. After a little while, ppp1 just seems to die and those that could connect before, can't.
I've tried this on two totally different servers and connections, using redhat linux, and both do the exact same thing..the connection with the static IP (ppp1 in my case) hosting the the services only works for some people, but then dies after a few minutes.
So the question is, how do I load balance between two ADSL or CABLE connections using linux? Has anyone successfully done it?
I DO have a big CISCO router I can use, but I want to avoid that if possible.