Saturday, 17 September 2016

Basics of VPN



            There will be some situations in which an employee want to work from far away and he needs to access resources in the main office, as he works from the office. It is not practical to have a direct connection from the far location to the main office. If both locations are connected with the internet, we can make use of the internet to virtually allow us to the main office network. In fact this type of connection is called as a Virtual Private Network (VPN).

In my scenario the remote user is having an IP of 192.168.1.2 and connected to the internet with the public IP 56.25.45.25. In order to connect to the main office the remote user needs an IP in the range of 10.0.0.0/16. The remote user can make use of the internet to get an IP in that range for a virtual interface on his laptop. We learned in the IP Address section that the Private IPs are non-routable. So how can the virtual interface with the IP of 10.0.0.0/16 can send packet over the internet? E.g. the remote user got an IP of 10.0.10.2/16 and want to access a server with the IP of 10.0.0.2/16. So the packet will be as shown below.

In order to pass this packet through the internet, VPN encapsulates it With the ISP given Public IPs So the Packet will be modified to as below.

So at the receiving end the public part will be stripped off and while responding back it will again encapsulate with the public part. So the VPN creates a tunnel that connects remote computer to an end point like a router or server.

No comments:

Post a Comment