* Different private IP's to be SNAT'ed to different public IP's on different interface
@ 2003-07-08 5:42 Yusuf Goolamabbas
0 siblings, 0 replies; only message in thread
From: Yusuf Goolamabbas @ 2003-07-08 5:42 UTC (permalink / raw)
To: netfilter
Hi, I have a NAT box which has one private interface (eth0) on which I
am running 2 different private IP ranges (192.168.2.0/24 and
192.168.3.0/24)
I have eth1 which is connected to an ADSL modem and I have eth2 which is
connected to a routable IP address
I would like to SNAT 192.168.2.0/24 to eth1 and 192.168.3.0/24 to eth2
I am able to SNAT 192.168.2.0/24 to the ADSL modem connected on eth1 but
I can't seem to get 192.168.3.0/24 to be SNAT to the routable IP address
I had the following iptables rules
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o ppp0 -j SNAT
--to-source $ADSL_IP
iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -o eth2 -j SNAT
--to-source $ROUTABLE_ETHERNET_IP
The default route is set to go via the ADSL modem
Any suggestions, do I have to do some form of policy routing and marking
of packets prior to SNAT'ing them
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-07-08 5:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-08 5:42 Different private IP's to be SNAT'ed to different public IP's on different interface Yusuf Goolamabbas
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.