cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2231
Views
4
Helpful
20
Replies

VPN through PAT and NAT

sbrozius
Level 1
Level 1

We've got a location where we want to setup a VPN-tunnel to our HQ.

At that location, there's a router which does PAT (NAT overload), and then, some hops further, there's a firewall which does NAT.

Could this pose a problem to the VPN-tunnel?

Here's a 'diagram' of what the connection looks like.

Client -->PAT-router-->NAT firewall-->Internet-->CVPN3005

Hopefully you can provide me with an answer.

1 Accepted Solution

Accepted Solutions

VPN tunnel will not work in your scenario. Second nat change address and ports that you wanted to use for vpn tunnel. So the port 500 wil be translated for higher port and will be rejected in HQ.

View solution in original post

20 Replies 20

jackko
Level 7
Level 7

i don't think there would be an issue.

one thing should be noticed is when a host from the cvpn site needs access the the remote site, than a static nat needs to be configured on the router.

ok, that's a plus.

If I'm not mistaken, the tunnel uses UDP-port 500 and UDP-port 4500 if I'm using NAT-T (which I must because of the NAT at the firewall).

Could there be more ports needed because of the PAT and NAT?

udp 500 = isakmp

udp 4500 = non-isakmp

ip 50 = esp

Is that correct? When using NAT-T as far as I know ESP is encapsulated in the traffic on UDP-port 4500?

ESP or AH cannot be NATted, as far as I know...

VPN tunnel will not work in your scenario. Second nat change address and ports that you wanted to use for vpn tunnel. So the port 500 wil be translated for higher port and will be rejected in HQ.

thanks for pointing it out.

i was wondering if the ipsec termination point is the pat router or the nat firewall.

What if the client would be a PIX, and I would set up port forwarding on the PAT-router (port UDP 500 and UDP 4500 to PIX)?

PIX --> PAT-router --> NAT-firewall --> Internet --> CVPN3005

hi sebastiaan,

please advise what sort of ipsec we are discussing here, and where is the vpn termination point.

The VPN-tunnel I want to use is IPSec with NAT-T (have to, because of at least 1 NAT-device) from a PIX to a CIsco VPN Concentrator.

I think, though, that I've already gotten my answer in that it won't work.

Because of the PAT _and_ NAT, the port-translations and info that reaches the CVPN will all be screwed up.

Doing port-forwarding on the PAT-router is not going to be the best solution.

I've just had a talk with a technician of the networkoperator, and he confirmed that it will not work. They can do something to eliminate 1 of the NAT/PAT-devices, so I think that's the way to go.

private net <--> pat router <--> nat firewall <--> www/vpn <--> cvpn

maybe it would be better if we put some ip into the scenario.

e.g.

192.168.1.0 <--> pat router <--> 192.168.2.0 <--> nat firewall <--> www/vpn <--> cvpn <--> 192.168.0.0

1. a host with ip 192.168.1.100 attempts to access a server with ip 192.168.0.100.

2. pat router receives a packet originated from 192.168.1.100 and destined for 192.168.0.100.

3. pat router performs pat, i.e. translates the original source from 192.168.1.100 to the router outside interface 192.168.2.1 with port 2647 (i.e. a random port assigned by the pat router)

4. nat firewall receives the packet with source ip 192.168.2.1 and destined for 192.168.0.100.

5. nat firewall has no nat statement, such as "access-list no_nat permit ip 192.168.2.0 255.255.255.0 192.168.0.0 255.255.255.0", thus no nat/pat will be performed.

6. nat firewall matches the packet with the crypto acl, encrypts/encaps the packet and forwards the packet down the lan-lan vpn.

7. the cvpn receives the packet, decaps/decrypts and forwards the packet to the server with ip 192.168.0.100.

8. server replies. nat firewall receives the packet, decaps/decrypts and forwards the packet to the pat router.

9. pat router receives the packet originated from 192.168.0.100 and destined for 192.168.2.1 with port 2647.

10. pat router verifies its translation table. it matches the existing translation, so the pat router translates the packet destination ip from 192.168.2.1 back to 192.168.1.100.

please excuse me for my so-called "interpretation" above. it may not be very clear, but i believe this scenario should work.

in fact, i have implemented a similar scenario and it works fine. below is the simiplified topology:

private net <--> pix (pat) <--> pix (pat/no_nat) <--> www/vpn <--> cvpn <--> private net

This would indeed work, because the NAT-firewall is not a NAT-firewall in your scenario.

In the case I have, I have no control over the router or the firewall, so this is no option for me.

As you put it, you effectively have a client behind a NAT-router (PAT = NAT overload) connecting to the VPN concentrator through the internet. You're effectively ruling out the firewall in your scenario.

please excuse me for misunderstanding.

you mentioned, "The VPN-tunnel I want to use is IPSec with NAT-T (have to, because of at least 1 NAT-device) from a PIX to a CIsco VPN Concentrator."

thus i have the impression that the vpn is between the pix and the cvpn. so the vpn termination point, which i've asked for verification couple times, is not the pix.

again, i'm so confused. are we discussing remote vpn by using cisco vpn client, which behind a pat router, and a nat firewall?

VPN is from a PIX or Software VPN-client to a VPN Concentrator.

That would indeed mean that the termination-point is the Concentrator.

It doesn't matter is the initiating (starting) client is a PIX or a VPN Client, since the type of tunnel is the same, and the devices in between are the same. You could see a PIX as a hardware VPN Client... Only difference is that it is a Multi-client VPN Client (gateway)...

But again, by not doing NAT on the firewall as you do, the situation is completely different.

so finally i guess i understand the picture; one termination point is the cvpn, and the other termination point is a device, that is deployed behind both a pat router and a nat firewall.

assuming this time i got it right, then, as you already know, this solution is not feasible.