Friday, May 12, 2023

Make your own VPN!!

 

A Virtual Private Network (VPN) is a secure and encrypted connection that allows users to access the internet or a private network remotely. VPNs are becoming increasingly popular for individuals and businesses alike, and for good reasons like Privacy, Security and geo-restriction free Internet access.


What is a VPN ❓❓

A Virtual Private Network (VPN) is a secure and encrypted connection that allows users to access the internet or a private network remotely. When a user connects to a VPN server, their internet traffic is routed through an encrypted tunnel, making it difficult for third parties to intercept or access the data being transmitted. This provides users with increased privacy and security, particularly when using public Wi-Fi networks or accessing the internet from countries with strict internet censorship or surveillance. VPNs can also allow users to access geo-restricted content, such as streaming services, from anywhere in the world. Additionally, VPNs are becoming increasingly important for remote workers who need secure access to their company networks from outside the office. Overall, VPNs are an essential tool for protecting your online identity and data.

So now that we know what a VPN is, Let's make our own VPN!!


Here's what we need for this 

1. Setup a cloud instance and deploy OpenVPN server

Here, we need an free tier AWS account just login and go to  EC-2 dashboard
  • Click Launch Instance to deploy a new instance.
  • Search OpenVPN and and select the first result from AWS marketplace.

  • Under the Key Pair section go ahead and create a new key and assign it to the instance.
  • Now, before launching this instance check the server type and set it to t2.micro to stay in the free tier teritory. Once done Launch the Instance and wait for it to get deployed.
  • In your EC2 dashboard you will see a new Instance is running select that instance.
  • Select connect and go to SSH-Client section.
  • If you see the above options you are good to Go.
  • Follow these instructions to connect to your cloud instance or simply copy and paste the example command in your SSH-Client terminal, as long as the key you created in previous step is in the working directory of the terminal this will work.
  • After first initialisation it will promt you to re-connect with username  "openvpnas" instead of root. So just go and replace root with this new name in previously copied command.
  • When the instance is relaunched you will get an initial setup prompt, accept the terms and go with all the defaults untill n unless you really know what you are doing.
  • In the Setup process you will be prompted to set password for admin pannel set a strong password this is a very important step do not skip it.

  • Once you have completed the setup you will see something similar to this screen above.
  • Now you have deployed your server sucessfully.


2. Connecting to VPN admin Panel and client panel.

After the successful deployment you will be given addreses to both admin and client panel just copy paste that in your browser if prompted with any browser privacy dialogue proceed by trusting the page. 
  • Now login with username - "openvpn" and password which you set previosly.
  • Once logged in go to Configuration>VPN Settings and find and change these options as follows-


  • Save settings and make sure to update the running server.

Now, everything is done, re-login to user dashboard in openvpn and follow the given instructions to download the client as per your device type and connect to your own vpn!!!.

Here are few more things to keep in mind - 

  • Terminate instances before the free tier limit exceeds, otherwise you'll need to pay bill for extra hrs. although you can always re-deploy this again fo another free server, there's no limit on number of times you can repeat this process.
  • Only two devices are allowed in free openVPN server.
  • You can fine tune VPN configs to make your custom filters and blocklists.
  • You can use similar process to deploy your cloud servers on free tier AWS and acess them remotely for several use cases.

That's all folks, enjoy your newly acquired superpowers to access the web securely without being tracked. Feel free to drop any suggestions or doubts, if any.


              

Whatsapp Button works on Mobile Device only

Start typing and press Enter to search