HomeAPPS3 Methods To Build Your Own VPN From Scratch

3 Methods To Build Your Own VPN From Scratch

Finding the ideal VPN that suits all your needs can be a struggle and you probably don’t want to risk your information by using a potentially unsafe service. Now, you could spend your time scouring the internet for an affordable, effective VPN or you could build your own.

Today, we’ll be sharing 3 methods to build your own VPN, allowing you to securely access your home network while you’re on the move.

1. Using the Cloud

Having access to a secure VPN server is essential for protecting your devices from malware. The first, and probably most complicated method, for creating your own VPN server is by using the cloud. Here’s what you need to do:

a. You’ll need to decide which cloud platform you’re going to use. Since you’re making a VPS (private virtual server), almost any network provider will do the job. For this guide, we’ll be using Google Cloud Platform.

b. Once you’ve signed up for the server and purchased server space, open the Google Cloud Shell.

c. Use the Git version control system and download Algo into your Cloud Shell. All you need to do is enter “git clone” and press enter. This downloads Anglo and installs it.

d. Next, you’ll need to create a project and service account to host the VPN resources by entering the following commands. Enter them individually and press enter afterward:

  • PROJECT_ID=${USER}-algo-vpn
  • BILLING_ID=”$(gcloud beta billing accounts list–format=”value(ACCOUNT_ID)”)”
  • gcloud projects create ${PROJECT_ID} –name algo-vpn –set-as-default
  • gcloud beta billing projects link ${PROJECT_ID} –billing-account ${BILLING_ID}
  • gcloud iam service-accounts create algo-vpn –display-name “Algo VPN”
  • gcloud iam service-accounts keys create configs/gce.json \
  • –iam-account algo-vpn@${PROJECT_ID}.iam.gserviceaccount.com
  • gcloud projects add-iam-policy-binding ${PROJECT_ID} \
  • –member serviceAccount:algo-vpn@${PROJECT_ID}.iam.gserviceaccount.com \
  • –role roles/compute.admin
  • gcloud projects add-iam-policy-binding ${PROJECT_ID} \
  • –member serviceAccount:algo-vpn@${PROJECT_ID}.iam.gserviceaccount.com \
  • –role roles/iam.serviceAccountUser
  • gcloud services enable compute.googleapis.com

e. To install the Python tool needed for Algo to work, run “sudo apt install -y –no-install-recommends python3-virtualenv”

f. Next, paste the following command to install additional dependencies: “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.”

g. Use the nano text editor and edit the Algo configuration. Type nano config.cfg” and press Enter.

h. Then you’ll want to save and exit

i. Type ./algo -e “provider=gce” “gce_credentials_file=$(pwd)/configs/gce.json” to launch the setup wizard.

j. Next, you’re going to choose a name for your server.

k. Select whether you want to “connect on demand”.

l. Now, you can opt to add users later on. We recommend choosing the default “No” to improve security. However, this does limit flexibility.

m. You can also choose automatic ad blocking when connected to your VPN which is quite convenient.

n. Now you can select the region you’d like your VPN server to be hosted in.

o. Lastly, wait a few minutes and if you’ve done everything correctly it should work!

2. Using Your Own Router

The next method you could use is simpler to set up than a Cloud-based VPN however, it might not be as effective. You won’t need to figure out the difference between data science and computer science either.

However, not all routers have the same hardware features, nor can they all host VPNs.

We recommend checking your device and browsing the internet before starting. If your device doesn’t have this capability, try a different method.

Here’s what you need to do:

  • Check your router’s model and search Google to see whether it has VPN hosting capabilities. If it does, you should find a YouTube video or article discussing it.
  • If your router has this function, open the router’s configuration page. This is ‌the first IP address in the internal network. You can also Google this if you’re unsure.
  • Once you’ve accessed the configuration page, enter your admin password for your router.
  • Search for the correct page with the VPN configurations and create a server. You should see a series of instructions on how to do this.
  • Enjoy your new VPN server!

3. Using a Different Device as a VPN Server

If the Cloud-based method is too intimidating, and you don’t have an OpenVPN-compatible router, you can also host your VPN server on another device. This could be your Windows computer or MacOS device.

Keep in mind that, if you choose this option, the host device needs to be switched on at all times. If your device crashes or switches off, you won’t be able to access your VPN. You’ll also need to set up port forwarding on your router so that your server is accessible from the internet.

For this tutorial, we’ll be using a Windows 10 computer.

Here is what you need to do:

  • Adjust your firewall settings to allow inbound connections.
  • Set up your port forwarding.
  • Download OpenVPN for your PC and install it. Be sure that the “EasyRSA” box is checked in the “Choose Components” section.
  • Install the TAP drivers.
  • Configure the “EasyRSA”. This will create certificate authorities, and request and sign certificates.
  • Next, generate the certificate authority, and VPN server certificates.
  • Build a client certificate. The “client” is the device you’ll use to access your VPN server. This could be a different computer or your smartphone.
  • Configure each VPN client with the generated files.
  • Connect to the server with your chosen client device.
  • Lastly, test your VPN for any leaks to ensure that your connection is secure.

Also Read: The Top Five Solutions For Public Cloud

Technology Talkerhttps://www.technologytalker.com
Technology Talker is a well built blog which Provides you with all the Latest news about Technology, business, Marketing, Social Media etc.
RELATED ARTICLES

Latest Articles