From: "Andrew Hall" <temp02@bluereef.com.au>
To: netfilter@lists.netfilter.org
Subject: Using SNAT through a 26sec tunnel
Date: Tue, 22 Mar 2005 18:34:55 +1100 [thread overview]
Message-ID: <00e401c52eb1$a45dffc0$5001010a@bluereef.local> (raw)
Hello,
I need some clarification on native 26sec packet processing in relation to
NAT with Netfilter, and I'm hoping someone can enlighten me once and for
all.
Basically what I want to be able to do is translate (SNAT) traffic before
ipsec encapsulation in tunnel mode from LANA to LANB. I've set this up and
applied the relevant patches against 2.6.11.5 and included the policy match
from the latest snapshot of patch-o-matic. It seems to work, although not
how I expected it to.
What I don't really understand is where the encapsulation is really done by
Netfilter. According to the mail archives I've read, when traffic leaving a
Linux box that is to have ipsec encapsulation performed, will pass the
POSTROUTING chain twice - first time plain/normal (before encryption)
processing, second time is after encryption. If this is the case then I
should be able to apply SNAT policies on traffic that passes the POSTROUTING
chain the first time (before encryption). I had assumed I could do this with
the policy match (--pol = none ), but this doesn't seem to be the case.
By looking at what the other end is expecting for bring up phase one and
two, it seems to be expecting sainfo that will match traffic that is NOT a
translated source, and if I only specify SA filters matching the translated
source as the origin, it complains that there is no proper SAinfo matching
the case for traffic coming from the other LAN's source (LANA). What this
seems to be tell me is that the SNAT is done as requested, but it is somehow
performed after the encapsulation and not before. I've tried altering the
policy match to --pol = ipsec, but this seems to make no difference.
So if someone can tell me how this is meant to work, I'd be really
appreciative.
Thanks,
andrew.
next reply other threads:[~2005-03-22 7:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-22 7:34 Andrew Hall [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-03-22 7:20 Using SNAT through a 26sec tunnel Andrew Hall
2005-07-15 19:18 ` Trevor Cordes
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='00e401c52eb1$a45dffc0$5001010a@bluereef.local' \
--to=temp02@bluereef.com.au \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox