How to set up your own VPN on a Cloud Service

What’s a VPN

First let’s explain to what VPN means and what it does. VPN stands for Virtual Private Network. VPN is a protocol that protects the transportation of your data over the internet. It would be like someone looking down at a road from a tree and being able to spot every single car below him and read off their license place. But with a VPN there would be a tunnel over that rode and you would not know where the entrance or the exit is. This means it offers anyone anonymity while surfing through the web. We also have an article in depth about why you need a VPN.

Why VPN at home?

Now why would you want your own VPN that you made yourself, rather than a VPN service that is provided by a company like NordVPN which is great company. Well when you sign up for a VPN service their service is widely known by other companies. Which means the exit IP address they use for your internet traffic to conceal anonymity is tracked by companies so if you were to use a service like Netflix or Hulu they block the exit IP. When they do this they stop you from using their service while using VPN which means you can’t use a VPN when you want to.

First you need your own server or computer that you don’t use for any other use. This server preferably should not be in used for anything else. The more tech-savvy individuals would have their own home servers that would know extensively about this topic. But most people would want to use a VPS (Virtual Private Server). Some people would choose a VPS like InterServer. The next thing you need is a VPN protocol that is open source on the internet.

Making a VPN on a Linux Virtual Private Server

After you have chosen a VPS provider and selected a location this server is located and paid for it. You now have to pick a Linux Kernel, Ubuntu is our choice. Then your VPS will give you a IP and a root password.

To connect to your VPS

ssh root@your.server.ip.address

Now enter the password when the prompt pops up

You will need to create a User Name for secure access

useradd -m new_username

Next a password for that username

passwd new_username

You will now have to give that User Name complete access which is referred to “sudo powers”

usermod -a -G sudo new_username

Now Exit by typing

exit

You now have to re access your VPS through SSH

ssh [email protected]

It is vital to install some functions to your server

sudo apt install zip unzip

Now

sudo apt install -y --no-install-recommends python3-virtualenv

Next you will need to Install Algo VPN on Linux

This helps install personal WireGuard and IPsec VPN which cuts alot of steps out of the way

They do have a disclaimer on their Github “Does not claim to provide anonymity or censorship avoidance.”

If this is all good for you then the next step is to download the file

wget https://github.com/trailofbits/algo/archive/refs/heads/master.zip

Next unzip the file

unzip master.zip

That will extract it to a new directory: algo-master.

Navigate to the new directory:

cd algo-master

Next command is

python3 -m virtualenv --python="$(command -v python3)" .env && source .env/bin/activate && python3 -m pip install -U pip virtualenv && python3 -m pip install -r requirements.txt

Installation may take a while around 5 mintues

By default, Algo has three pre-set users. These are: phone, laptop, desktop

To edit the users or add new ones:

nano config.cfg

In the users section, alter or add entries. Usernames with leading 0’s or containing only numbers should be escaped in double quotes, such as “444Terry” or “456”

Save the file with Ctrl + o and exit with Ctrl + x.

Now you have to deploy the system

./algo

Which then prompts you with “What provider would you like to use?” input 12 and hit enter

The next prompts are largely up to you whether or not you want to enable them

The more basic user will want to enable “Do you want to retain the keys (PKI)?” Because it will allow you to add users in the future. This is technically less secure. but shouldn’t be a problem for most users.

Now installation will be complete!

2 thoughts on “How to set up your own VPN on a Cloud Service”

Comments are closed.