I would like to learn how a VPN works, but all I could google up were
phrases like "VPN creates a private tunnel/road/connection between two points/LAN, piggybacked on the internet, and making both LAN appear like a single one." However, the above does not explain anything useful at all, at least for me =(.
I think I can better understand if someone can do a step-by-step "packet walkthrough" when a request is sent from LAN-A-client-1 to LAN-B-client-1. This could also show the difference versus P2P (e.g torrent) connections. Appreciate it very much. Thanks!
As an example, and a wild guess, this is how it could go: 1. LAN-A-client-1 creates a packet set for a destination VPN-IP 2. packet is "intercepted" and process by LAN-A-client-1-VPN-client 3. LAN-A-client-1-VPN-client sees that VPN-IP is not on LAN-A. 4. LAN-A-client-1-VPN-client encrypts packet, appending with VPN-IP in headers. 5. LAN-A-client-1-VPN-client modify destination IP to VPN-SERVER IP 6. LAN-A-client-1-VPN-client sends packet to LAN-A-router 7. LAN-A-router reads destination VPN-SERVER IP 8. LAN-A-router sends the packet over the internet to the VPN-SERVER IP 9. The internet does its usual stuff: dns resolution, filter,.. etc etc. 10. VPN-SERVER recieves packet, decrypts and read the destination VPN-IP (virtual) from headers. 11. VPN-SERVER translates VPN-IP to LAN-B IP 12. VPN-SERVER reconstruct packet, send out to internet again, destination set to LAN-B IP (external IP of LAN-B) 13. LAN-B gateway/router recieves the packet and [insert task], routes to LAN-B-client-1. 14. end.