Here’s how I create my own VPN

Prasun Sukai
3 min readNov 3, 2023

--

My Motivation:

As a Non Resident of India (NRI), watching my favorite shows and movies were turning out to be difficult. Determined to resolve my situation I tumbled upon multiple ways to watch. But with each solution, came its own catch. And thus gave me motivation to create my own VPN.

Previous Trials:

  1. Subscribing to online streaming platforms — Platforms like YuppTV helps Indians living in foreign countries to watch the TV channels. Although this comes with a hefty price as compared to the price we are used to paying in India.
  2. Subscribing to VPN services like ExpressVPN and NordVPN — My friend’s experience accessing Indian streaming services and the exorbitant prices discouraged me. Also past allegations of snooping user data against major VPN providers discouraged me.
  3. Tried writing my own code for a VPN — Failed to do so.
  4. Asked ChatGPT to write a code for a VPN — It gave a supporting-code to automate the process of connecting to VPN incase I already have an account with any of the VPN providers
  5. Some mobile apps allow to watch Indian shows for free — These apps don’t work on iOS or windows PC

Major Learnings:

A VPN ensures secure and private connection between 2 computer

The major learnings I got from my failed attempts to create my own VPN is that all I needed was a computer or a server which is in India and its always running. And I need to route my traffic through that computer rather than my ISP (Internet Service Provider).

So that I can connect to it any time and route my internet traffic through it.
As the computer is in India, I will definitely get an Indian IP address and thus will be able to access all Indian websites with ease.

Long Term Solution:

My parents live in India and they use internet through mobile networks regularly. Thus I have a location where I can have my setup.

Requirements:

  1. A good internet connected for 24x7 for 365 days.
  2. A computer which is kept on always
  3. A UPS (Uninterruptible Power Supply) to ensure electrical power during power-cuts

Verdict:

This solution seems to have a high up-front capital expenditure without guaranteed results as of now. And thus this idea was postponed.

Short Term Solution:

This involved research of available computers which can be leased out, so that I can use them for VPN purposes. Thus came the idea of public CSPs (Cloud Service Providers).

Amazon AWS, Microsoft Azure and Google GCP all have their servers in India and thus leveraging the cloud infrastructure seems the best solution on short term.

Thus I traded my up-front capital expenses for operational-expenses.

As a certified AWS professional, I decided to take the AWS route.

Out of many, there are 2 popular routes to make your own VPN on AWS.

  1. Rent an EC2 server on AWS. Download and configure the OpenVPN application on it.
  2. Buy a OpenVPN AMI(Amazon Machine Image) from Amazon marketplace and install it in any EC2 server.
An AMI is a pre-configured image ready to be installed in a EC2 server

Conclusion:

I went by the 2nd method and got myself a free VPN server from India which I can use anytime anywhere. I will provide the detailed steps on my next story.

--

--

Prasun Sukai

Aspiring to annex 𝒅𝒆𝒗𝒐𝒑𝒔 culture and its tools. Lets 𝒂𝒖𝒕𝒐𝒎𝒂𝒕𝒆 The Journey To 𝒄𝒍𝒐𝒖𝒅.