All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: NAT issues on a VPN tunnel
@ 2004-11-03  0:35 Christopher Lyon
  2004-11-03  2:43 ` Jason Opperisano
  0 siblings, 1 reply; 16+ messages in thread
From: Christopher Lyon @ 2004-11-03  0:35 UTC (permalink / raw)
  To: Jason Opperisano, netfilter

> -----Original Message-----
> From: netfilter-bounces@lists.netfilter.org [mailto:netfilter-
> bounces@lists.netfilter.org] On Behalf Of Jason Opperisano
> Sent: Tuesday, November 02, 2004 4:24 PM
> To: netfilter@lists.netfilter.org
> Subject: Re: NAT issues on a VPN tunnel
> 
> On Tue, 2004-11-02 at 10:40, Chris Lyon wrote:
> > So, I am trying to use NAT to solve the problem below because of an
IP
> > addressing conflict issue but I am not having much luck. Basically
all
> of
> > the Site A needs to get to only a few devices at each site B&C so I
am
> > trying to do PREROUTING NAT on the far end systems.
> 
> try doing it with POSTROUTING on the local system (site a).

I believe that would cause a problem on the VPN tunnel as the endpoints
won't match. This would need to be done on the far end (site b). 

> 
> -j
> 
> --
> "I bent my wookie."
> 	--The Simpsons
> 
> 




^ permalink raw reply	[flat|nested] 16+ messages in thread
* NAT issues on a VPN tunnel
@ 2004-11-02 15:40 Chris Lyon
  2004-11-02 16:09 ` John A. Sullivan III
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Chris Lyon @ 2004-11-02 15:40 UTC (permalink / raw)
  To: netfilter

So, I am trying to use NAT to solve the problem below because of an IP
addressing conflict issue but I am not having much luck. Basically all of
the Site A needs to get to only a few devices at each site B&C so I am
trying to do PREROUTING NAT on the far end systems. I have the tunnels up
and I can see the traffic getting to the remote side on ipsec0 but I just
can't get it to NAT from the 1.1.1.1 to the real 10.10.1.1. 

Command that I think should work
iptables -t nat -A PREROUTING -i ipsec0 -d 1.1.1.1 -j DNAT --to 10.10.10.10 
iptables -t nat -A POSTROUTING -o ipsec0 -s 10.10.10.10 -j SNAT --to 1.1.1.1


Any ideas? Layout and configs are below.


Site A eth0 - 192.168.254.0/24--Internet--Site B eth0 - 10.10.0.0/16
					 \ NAT FROM 1.1.1.1 10.10.1.1
example
					  \--Internet--Site C eth0 -
10.10.0.0/16
						NAT FROM 1.1.2.1 10.10.1.1
example


So here is the openswan configurations for your reference:

Site A

conn site_a-to-site_b
        #---------(local side is left side)
        left=<public site a>
        leftsubnet=192.168.254.0/24
        leftnexthop=%defaultroute
        #---------(remote side is right side)
        right=<public site b>
        rightsubnet=1.1.0.0/16
        #---------Auto Key Stuff
        pfs=yes
        auth=esp
        authby=secret
        esp=3des-md5-96
        keylife=8h
        keyingtries=0


Site B

conn site_b-to-site_a
        #---------(local side is left side)
        left=<public site b>
        leftsubnet=1.1.0.0/16
        leftnexthop=%defaultroute
        #---------(remote side is right side)
        right=<public site a>
        rightsubnet=192.168.254.0/24
        #---------Auto Key Stuff
        pfs=yes
        auth=esp
        authby=secret
        esp=3des-md5-96
        keylife=8h
        keyingtries=0




^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-11-05 16:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-03  0:35 NAT issues on a VPN tunnel Christopher Lyon
2004-11-03  2:43 ` Jason Opperisano
2004-11-03 10:48   ` John A. Sullivan III
     [not found]   ` <CARBONunxtkVO4alvoN00002350@carbon.netsvcs.com>
2004-11-03 15:49     ` Jason Opperisano
2004-11-05  6:42       ` Chris Lyon
2004-11-05 10:40         ` John A. Sullivan III
2004-11-05 16:44           ` Chris Lyon
2004-11-05 16:57             ` Jason Opperisano
  -- strict thread matches above, loose matches on Subject: below --
2004-11-02 15:40 Chris Lyon
2004-11-02 16:09 ` John A. Sullivan III
2004-11-02 17:02   ` Chris Lyon
2004-11-02 18:49     ` John A. Sullivan III
2004-11-02 20:05       ` Chris Lyon
2004-11-03  0:27         ` John A. Sullivan III
2004-11-03  0:24 ` Jason Opperisano
2004-11-03 15:06 ` Michael Gale

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.