I am looking for some info on how VPN's (Virtual Private Network) forward network traffic through its VPS (Virtual Private Server).
Take an example where you are connected to a VPN. You make a request to a website, which then makes its way down the network stack to Layer 3.
We have an IP packet - it has got its headers, including its destination address, and a payload.
If you change the destination address of the IP packet to the ip address of the VPS, how does the server forward the request to the original destination address?
The only thing I can think of is that at Layer 3 (the IP Layer), the header's destination address is changed to the ip address of the VPS, and then the original destination address is appended to the payload of the packet?
Does this not mean the length of the packet and the checksum header of the packet would then need to be recalculated and the IP packet again modified?
And then the VPS does the inverse mapping of the packet to assemble and make the original request on the server.
This seems like there would be a high latency time associated with it?
Perhaps I am missing some technical aspect of how this works, can anyone else explain it?

With Site-to-site, the router is responsible for encapsulation the packet. With end-to-site, the device itself creates the "original packet" which gets encapsulated by the VPN client installed on it. After the encapsulation, the device send out the packet.
– watchme Jun 15 '18 at 17:40So, can you send normal payload over the internet? Probably not. You will need some information.
This information then is added by the VPN-client - so layer 4,3 and 2 information!
– watchme Jun 15 '18 at 18:02