All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] 2 Gateways
@ 2004-05-27  9:50 Mihai Vlad
  2004-05-27 23:57 ` Damion de Soto
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mihai Vlad @ 2004-05-27  9:50 UTC (permalink / raw)
  To: lartc

Hello again,

I may have a common problem to solve but it seems it is harder than I
thought...

I have 2 internet providers (each one having a different gateway).
Behind the router there are around 100 clients that are SNAT-ed.

I want some clients to be SNAT-ed to the first provider, while the others to
the second one.
The following lines should work:

iptables -t nat -A POSTROUTING -s 172.17.31.81  -j SNAT --to-source
$INET_IP_1
iptables -t nat -A POSTROUTING -s 172.17.31.82  -j SNAT --to-source
$INET_IP_2

But... there is a problem... I have to make the packet (after it has been
SNAT-ed)
follow the gateway corresponding to the $INET_IP_1 or to the $INET_IP_2
respectively.

In my routing table I have only one default route... corresponding to one of
the gateways.
Is it possible to have 2 default routes? Is there a more elegant way to
solve this problem?

Is there a way to tell the routing table that every request that has the
source address $INET_IP_1
follow the $GW_1, and every request that has the source address $INET_IP_2
follow the $GW_2?

Thanks in advance,
Mihai Vlad





_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-28 13:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-27  9:50 [LARTC] 2 Gateways Mihai Vlad
2004-05-27 23:57 ` Damion de Soto
2004-05-28  2:21 ` gypsy
2004-05-28 13:39 ` Adrian Saileanu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.