[Gllug] routing via a second external IP

C. Cooke ccooke-gllug at gkhs.net
Tue Aug 12 09:17:12 UTC 2008


On Tue, Aug 12, 2008 at 09:36:25AM +0100, John Winters wrote:
> Paul Cupis wrote:
> > t.clarke wrote:
> >> I am currently in the process of installing another ADSL circuit in our
> >> offices (regrettably due to the apallingly low speed available on ADSL at
> >> our physical location  - 600Kbs if we are lucky!).  The idea is to use this
> >> connection purely for telnet connection in from certain specific users/IP
> >> addresses; to avoid bottlenecks at certain times when the 'nromal' ADSL line
> >> is 'swamped' with websurfing traffic.
> >>
> >> It would seem a pity to use another Linux box to accomplish this if I can
> >> simply do the following:
> >>
> >> 1)install another interface card in the existing Linux box, connected to the
> >> new adsl circuit and router
> >> 2)set up specific routes to the IP addresses concerned within the linux-box
> >> routing table, so that outgoing packets do not go our via the default route
> >>
> >> Any reason why this should not work ??
> > 
> > This should just work. All you should need to do is add some static 
> > routes on the Linux box to send traffic to certain destination IPs via 
> > the second gateway (ADSL).
> > 
> > # ip route add x.x.x.x/x via y.y.y.y
> 
> Remembering of course to tell your select customers to use the right IP
> address for the new ADSL line - otherwise only half the traffic
> (outbound from you) will go down the new line, and if you have NAT then
> it won't work at all.
> 

This is why using iptables and a separate routing table is a better
solution - it's transparent to the end-user. You just select which
traffic you'd like to travel down the second line. 

-- 
echo -ne "\E#8";b=$[X=`tput cols`,Y=`tput lines`,d=1,a=X/2,Y/2];while case $d\
 in 0)((a=a<2?X:a-1));;1)((b=b<2?Y:b-1));;2)((a=a==X?1:a+1));;3)((b=b==Y?1:b+\
1));; esac;do((c=b+a*X));v=${k[c]:- };[ $v. = @. ]&&{((d=d>2?0:d+1));k[c]="";\
}||{(( d=d<1?3:d-1));k[c]=@;};echo -ne "\E[$b;${a}H$v";done # Charles Cooke
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list