[ale] Routing with 2 Internet connections

Joe Knapka jknapka at kneuro.net
Mon Jul 12 16:26:38 EDT 2004


Nick Travis <wormfishin at gmail.com> writes:

> I have a firewall setup with 2 interfaces on the internet, Everything
> is working fine for eth1, but when a request comes in on eth2, it's
> being routed back out eth1.  How can I set the routes up so everything
> goes back out the same interface it came in on?

I don't believe you can do this without some rather involved
router-fu.

Your default route tells the machine which interface to send any
packet for which it doesn't know a more-specific route for. In your
case, you could set up either interface as the default, but there
isn't a simple way to say, "If this packet is related to a packet that
came in on eth1, send it out on eth1". The trick is, how do you define
"related to a packet that came in on eth1"?

If you're only worried about traffic from some particular range
of addresses, you can manually add specific routes for those
addresses through whichever gateway you need to use. But that
doesn't sound like what you want.

You may find the Linux Advance Routing and Traffic Control HOWTO
an interesting read, at <URL: http://lartc.org>.

Cheers,

-- Joe

-- 
I have designed a language called LYL (Leave Your Lover), in which,
naturally, TAFWTDI (there are fifty ways to do it).
--
pub  1024D/BA496D2B 2004-05-14 Joseph A Knapka
     Key fingerprint = 3BA2 FE72 3CBA D4C2 21E4  C9B4 3230 94D7 BA49 6D2B
If you really want to get my attention, send mail to
jknapka .at. kneuro .dot. net.



More information about the Ale mailing list