[LARTC] Two Output Gateways

Steve Wakelin lartc at wcsl.net
Sat Oct 8 23:21:34 CEST 2005


Hello,

Currently running Kernel 2.4.31 with iptables 1.3.3

                 i-----------i
                 i      R1      i--------i
                 i-----------i             i    i-----------i
                                                i-- i    S1         i
                 i-----------i             i    i-----------i
                 i       R2     i---------i
                 i-----------i


Sceanario

Two internet connections comming into R1 and R2
R1 and R2 both connect to internal destination server S1
Due to software restrictions have to use one default route.
Simple script to validate gw availablilty and swap if necessary

Reqirements

Returning traffic from incoming connections over the same router as
where it originated.

i.e. If default gatway is set to be R1 incoming connections are fine if 
originated
on connection R1.  However connections initiated through R2 timeout.

Have tried numerous combinations of iptables, iproute2 and cannot get it to 
work.

Is it possible to mark which router the traffic originated and push the 
return traffic over
that router for instance ?

Any help greatly appreciated.

Regards

/Steve



More information about the LARTC mailing list