by bogomipz · 7y ago · 0 comments
If that were true nobody on a home cable router or DSL connection would be able to connect to their corporate office which almost certainly uses NAT and RFC 1918 Addresses. I have set this up dozens of times for both client to site and site to site IPSEC VPNs.
This will even work for for site to site VPNs where there is overlapping RFC 1918 address space on both ends.
NAT-T negotiation happens during the first phase of IKE negotiation. See the section "IPsec NAT Transparency (NAT-T)" here:
https://www.networkworld.com/article/2288666/lan-wan/chapter...
To be fair, it also suffers from the same issue as all of those: when a NAT gateway decides to remap the port (because it hasn't seen traffic in 30 seconds, because it got rebooted, w'ever) then traffic from the responder to the initiator is dropped. So the initiator has to constantly send keepalive messages so the responder has an up-to-date notion of where to send packets. The shorter the interval the more the wasteful traffic; the longer the interval then the more often you get frustrating delays.
I've personally run into an issue where a stateful UDP gateway (downstream from the NAT gateway) had a 30s timeout on UDP flows. The IPSec initiator also sent NAT-T keepalives at 30s intervals. Because of drift and jitter, every few hours the 30s periods would synchronize so that the gateway dropped the state immediately before the next keepalive passed through, resulting in a very annoying 30s pause in activity. Most traffic was going from responder to initiator as the VPN was effectively a reverse proxy onto a corporate LAN, so one result was SSH sessions becoming unresponsive for 30s.
To reiterate, there are no simple solutions to these sorts of problems.
Not at all. The box handling IKE connection is not behind NAT it is in front of NAT, port 500 is on a public IP.
Practically speaking it is usually the same box doing NAT and IPSEC.
>"The flow can go outwards if one end is behind nat, but you can't have lots of ipsec-wanting clients behind same nat."
No, that statement is completely false. The technique used is called "overloading", Cisco calls this PAT. It assigns a unique source port for each UDP or TCP session on the device doing the IPSEC termination.