[Openswan Users] SNAT before IPSec, save my soul.
Adrian_Sanchez at actionline.com.ar
Thu Mar 23 23:21:41 CET 2006
I have read your useful experiences today. Sort of looks like it's been a
busy day today ;-)
A cisco box set up to do a classic private|public---public|private tunnel
needs a "nonat" line in order to avoid "private" becoming "public". Just
ignore adding that line and you'll have that private left subnet getting
SNAT'ed with a public one. Just as if that "nonat" line meant "please
don't nat my private ipsec packets because I want them to remain private".
As you might have noticed, Linux 2.6 does just the opposite: it'll never
SNAT the private packets unless you use KLIPS and explicitly SNAT on
ipsec0 or start using the new iptables patches + 2.6.16 + userland tools
in a combination I still couldn't figure out.
My setup is very easy. Just imagine a simple IPSec tunnel connecting two
private hosts. Well, I need my left private host to get into the tunnel
using one of my many OpenSWAN public IP address aliases:
- 192.168.0.4 is my internal host.
- 188.8.131.52 is my IPSec gateway, it also has an IP alias of 184.108.40.206
which is in use by my internal host. In other words, anyone can access
192.168.0.4 from the internet, by pointing at 220.127.116.11
- 18.104.22.168 is my remote ipsec gateway of which I have no control
whatsoever. That's my ipsec peer which grants me access to 22.214.171.124:
presumably an internal, SNAT'ed host, too.
Can you see what the problem is? I can't get 192.168.0.4 to act like
126.96.36.199 before getting into the IPSec tunnel through 188.8.131.52
From: ted leslie <tleslie at tcn.net>
To: "Adrian_Sanchez" <Adrian_Sanchez at actionline.com.ar>
Cc: users at openswan.org
Date: Thu, 23 Mar 2006 21:00:24 -0500
Subject: Re: [Openswan Users] SNAT before IPSec, save my soul.
> i have the same issue (or similar)
> I just got 2.6.14 and Klips patch installed succesfully and will see
> if it works.
> But i tried to solve it on a cisco (of my client),
> that would involve the Nat-on-a-stick approach , and after reading
> that paper
> at CISCO wow, that didnt look that easy.
> i don't understand how just a "nonat" line solves your problem on
> if you like, can you send me a simple network diagram (off list if you
> i be interested in exactly your topology layout.
> I am hoping because i should have a working klips 2.6 kernel system now
> i will be ok,
> your scaring me about the iptables 1.3.5 tainted comment below,
> hopefully i dont run into that.
> I guess i am lucky, i am building a box from scrtch and can pick and
> chose my kernel (2.6.*)
> and version of openswan, where you are a bit more limited.
> could you install a linux 2.4.14 on your FC4/5 ? or you have to stick
> with FC offical kernels supplied
> by RH ?
> Checkpoint is just hardened linux .. so i am not sure how you would do
> something with Checkpoint
> that you can't do with linux?
> On Thu, 23 Mar 2006 22:25:17
> "Adrian_Sanchez" <Adrian_Sanchez at actionline.com.ar> wrote:
> > I am trying to set up a tunnel where an internal host with a rather
> > and overused leftsubnet address gets SNAT'ed with a public address
> > the same public subnet my OpenSWAN public gateway listens on (it's
> > one box with several ip address aliases which acts both as a NAT
> > and an OpenSWAN box).
> > After digging through dozens of forums and asking for help, I only
> > some comments about using the KLIPS module in order to get back my
> > ipsec0 interface (but I had no chance to compile and run it on Fedora
> > and 5 with whatever from 2.6.5 to 2.6.15 kernels). I also got
> > about combining kernel 2.6.16, iptables 1.3.5 + POM in a tainted,
> > unspecific way my scorched brain can't figure out.
> > I think I'm really close to give up and tell my client to put an end
> > his sufferings -and mine-, by putting a Cisco box which does exactly
> > I need just by typing a simple ACL lacking its "nonat" line, or by
> > a Checkpoint box and setting a "nat hide" directive, or whatever fits
> > moment.
> > While private, overlapping network addresses become more and more
> > at the same time people needs them connected each other, I just can't
> > figure out why it's so tricky to get this SNAT workaround done on
> > Maybe I'm missing lots of things here? Please, enlighten me and
> forgive my
> > mood... I'm under heavy pressure regarding this thing. It's really
> > frustrating. In fact, I think it's the only thing I can't get my
> > boxes to do so far.
> > Would you kindly point me into the right direction?
> > 2.6 + IPSEC + SNAT for Dummies maybe?
> > Thanks again.
> > _______________________________________________
> > Users at openswan.org
> > http://lists.openswan.org/mailman/listinfo/users
> > Building and Integrating Virtual Private Networks with Openswan:
> Users at openswan.org
> Building and Integrating Virtual Private Networks with Openswan:
More information about the Users