From: Stephen Clark <sclark46@earthlink.net>
To: netfilter-devel@vger.kernel.org
Subject: NAT and IPSEC
Date: Thu, 16 Apr 2009 09:00:25 -0400 [thread overview]
Message-ID: <49E72BE9.6020007@earthlink.net> (raw)
Hello,
I have to separate ipsec tunnels going to two different private networks. How do
I keep iptables from natting the traffic destined for these 2 networks. I tried:
iptables -t nat -A POSTROUTING -o eth1 -d ! 192.168.1.0/24 -d ! 172.16.0.0/16
-j MASQUERADE
but it says only one -d is allowed. So I tried
iptables -t nat -A POSTROUTING -o eth1 -d ! ( 192.168.1.0/24 || 172.16.0.0/16 )
-j MASQUERADE
and it says "(" error. So how do I specify multiple destination
networks/addresses to be excluded from being natted.
Thanks,
Steve
--
"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety." (Ben Franklin)
"The course of history shows that as a government grows, liberty
decreases." (Thomas Jefferson)
next reply other threads:[~2009-04-16 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 13:00 Stephen Clark [this message]
2009-04-16 13:30 ` NAT and IPSEC Jan Engelhardt
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=49E72BE9.6020007@earthlink.net \
--to=sclark46@earthlink.net \
--cc=netfilter-devel@vger.kernel.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.