All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] NAT over 2 providers (not load balance)
@ 2005-02-14 20:27 Mihai Vlad
  2005-02-14 20:35 ` Ben
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Mihai Vlad @ 2005-02-14 20:27 UTC (permalink / raw)
  To: lartc

Hi guys,

Can you take a look at this? :)


		+-----------+
		|           |
	 eth1-|-          |
		|          -|-eth0---LAN---
		|           |
	 eth2-|-          |
		|           |
		+-----------+
-

eth0 is connected to the LAN having the IP=LAN_IP

eth1 is connected to the first  ISP having IP=ISP_IP_1 and GW=ISP_GW_1
eth2 is connected to the second ISP having IP=ISP_IP_2 and GW=ISP_GW_2

I need to selectively SNAT clients in the LAN to ISP_IP_1 or ISP_IP_2.

That would be something like:
$IPTABLES -t nat -A POSTROUTING -s 172.17.31.5 -j SNAT --to-source $ISP_IP_1
$IPTABLES -t nat -A POSTROUTING -s 172.17.31.7 -j SNAT --to-source $ISP_IP_2


This does not work since all the packets are forwarded to the default GW
which is ISP_GW_1.

How can I change this?

As far as I remember, the routing decisions and policy are before the
POSTROUTING chain in which the SNAT occurs...

Please help!

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] 6+ messages in thread

end of thread, other threads:[~2005-02-14 22:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-14 20:27 [LARTC] NAT over 2 providers (not load balance) Mihai Vlad
2005-02-14 20:35 ` Ben
2005-02-14 20:47 ` /dev/rob0
2005-02-14 20:47 ` Tóth Nándor
2005-02-14 21:58 ` Peter Surda
2005-02-14 22:19 ` Nguyen Dinh Nam

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.