Linux's NAT (Network Address Translator) implementation, IP Masquerade,
includes a VPN Masquerade feature that provides interoperation of NAT
with IKE and ESP tunnel mode within the IPSec security protocol suite.
VPN Masquerade uses heuristics to route packets from a server on the
Internet to a client on a local network that shares access to the
Internet with other clients over a common access link through a router
running NAT. VPN Masquerade, however, is susceptible to crashes,
collisions and race conditions that can disable IPSec communication.
These are prevented, or recovery from such is automatically effected, by
sending over a tunnel a control packet, a "ping", from the client at one
end of the tunnel to the server at the other end of the tunnel, and then
waiting to send any packets other than a control packet over the tunnel
until a responsive control packet is received from the server.