0

I tried googling the answers but I am still confused.

So lets say that I am connected to the home router. When I visit a site(say google.com),the traffic first passes through my home router. However,what happens next? Does my home router route the traffic to the vpn first before the vpn server routes this traffic again to my isp? At which stage does the encryption happens?

Furthermore, I get a new IP when I connect to a VPN. Does this new IP correspond to the IP of the vpn server or just a local ip in the VPN network?(like another machine connected to the same vpn)

How does the overall route look like?

2

When your VPN link is up, your computer has a new virtual network interface that represents the VPN link. The VPN server assigns an IP address (from a range of addresses allocated for the VPN server's VPN clients) to that virtual network interface. It's almost like all the VPN clients are machines connected to a LAN and the VPN server is the "DHCP server" and router for that LAN.

When you send a packet to google.com, your computer encrypts that packet and puts it inside a VPN packet and sends that VPN packet to your VPN server. Your home gateway only sees that it's forwarding VPN packets to your VPN server.

The VPN server gets that VPN packet, takes out the payload packet, decrypts it, and sends it to google.com.

In some cases, your packet to google.com might actually be split across multiple VPN packets, in which case the VPN server collates those packets until it can decapsulate/decrypt a whole original packet.

2

I'll try and explain this as simple as I can...

  • The VPN software on your device creates an encrypted "tunnel" to the VPN server (This tunnel is a point-to-point connection, so only your device and the VPN server are able to communicate on it)
  • Any data sent while connected to the VPN is encrypted on your device, sent over the tunnel, and decrypted on the VPN server
  • The VPN server then creates a connection to the destination server (Using an IP relative to the location of the VPN server) just like if a physical device at the VPN's location were to connect to the destination server

Think of the VPN as a "middleman" network. Your data is sent to the VPN, which then sends it to the destination, and vice-versa. Since all of the data sent between your device and the VPN is encrypted, and only your device and the VPN can unencrypt it, your ISP will not be able to see the plaintext data being sent to and from the VPN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.