From: Yusuf Goolamabbas <yusufg@graffiti.net>
To: netfilter@lists.netfilter.org
Subject: Different private IP's to be SNAT'ed to different public IP's on different interface
Date: Tue, 8 Jul 2003 13:42:54 +0800 [thread overview]
Message-ID: <20030708054254.GA5203@outblaze.com> (raw)
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
reply other threads:[~2003-07-08 5:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030708054254.GA5203@outblaze.com \
--to=yusufg@graffiti.net \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.