How to Use Cloud Services to Set Up A VPN Server

A Virtual Private Network hides your online identity and makes sure your sensitive data is not compromised in any way.

It eliminates hackers, malware attacks, and phishing attempts. It also keeps you anonymous on the web so no one can track or monitor your activities.

Especially the companies that charge differently for the same product according to the user’s location. They keep track of your personal data and then build a profile based on your online shopping activities.

But with a VPN, even your ISP or government authorities will go blind when you’re browsing the internet.

How to Use Cloud Services to Set Up A VPN Server

Now there are multiple ways you can set up a VPN on your device. You can either use a third-party VPN service and be fine with it or host your own server.

A commercial VPN usually requires a little work. You just need to sign up for a VPN provider, download their VPN app and you’re good to go.

But if you want to host your own VPN server then that’s possible too. It requires a VPN router or a router that supports third-party firmware. You can follow our step-by-step guide for setting up a VPN server to ace the procedure.

Although if you don’t want to manage or audit everything by yourself, then you can also set up a VPN on Cloud. You’d just need to pay for the third-party cloud services and configure the VPN yourself for the first time. 

It can be a tricky method. But think about the benefits. You will no longer have to bother setting up a computer or any other device as everything is being managed by the Cloud Server. What are msps? A managed service provider (MSP) is a third-party company that manages a customer’s information (IT) infrastructure and end-user systems.

Many companies offer cloud services to users. Some of the best ones are Google Cloud, Microsoft Azure, and Amazon Web Services.

As for us, we will be using Amazon Web Services or AWS on a Windows 10 platform.

Creating an Account on AWS

  • Visit the AWS page and click on “Create an AWS Account“.
  • Now sign in with your AWS account.
  • Click on Services.
  • Go to the Security, Identity & Compliance and then head to IAM.
  • Click on Users and then on Add User.
  • Enter a username and then click on Programmatic Access.
  • Click Next.
  • Click on Attach Existing Policies Directly.
  • Enter ‘admin‘ in the search panel and then check Administrator Access.
  • Click Next.
  • Now download the files that you’ll need later by clicking on the Download CSV button.

Running Algo Dependencies

  • On your Windows PC, go to the Settings and navigate to Update & Security.
  • Click on For Developers.
  • Enable the Developer Mode.
  • Now head to the Control Panel and then go to Programs.
  • Turn the windows feature on.
  • Scroll down and choose Windows Subsystem for Linux.
  • Click OK to install the program on your PC.
  • Reboot your PC.
  • The Linux Bash should be installed on your computer. To check, type ‘bash‘ in the search panel.
  • Launch Bash and install it.
  • After installation is finished, enter these commands.

sudo apt-get update && sudo apt-get install python-pip python-setuptools build-essential libssl-dev libffi-dev python-dev python-virtualenv git -y

  • Now clone the repository by entering this command:

git clone https://github.com/trailofbits/algo && cd algo

  • Create a list of users by entering this command:

nano config.cfg

  • Press Enter.
  • A text editor will appear on your screen. Enter the users that are allowed to use your VPN.
  • Now press Ctrl+X to save the list.
  • On your terminal, enter ./algo to start the installation.
  • Enter 2 for the Amazon EC2 Provider.
  • Enter a name for your VPN.
  • Choose a server for your VPN.
  • Now open the CSV file downloaded before from the AWS page.
  • Copy the AWS Access Key and AWS Secret Key.
  • Paste the keys wherever needed.
  • If you want your VPN to work automatically then choose Yes for VPN On Demand.

Setting Up Devices

You need to create a profile on your device to connect to the VPN server.

Use Cloud Services to Set Up A VPN Server

For iOS

  • Open the configs folder and then head to the algo-master folder. Find .mobileconfig and send it to your iOS device.
  • Open .mobileconfig and set up a profile to connect.

For Android

  • Download the strongSwan VPN Client from the Google Play Store.
  • Open the configs folder and find P12.
  • Send it to your android device.
  • Open P12 through strongSwan and connect to the VPN.

For Windows

  • Open the configs folder and copy PEM, P12, and PS1.
  • Now paste these files into some other directory.
  • Import PEM in the Trusted Root certificate folder.
  • Launch Windows Powershell and change its directory to where you pasted PEM, P12, and PS1 in step 2.
  • Enter the command:

Set-ExecutionPolicy Unrestricted -Scope CurrentUser

  • Press Enter.
  • Type the script name for Powershell and press enter again.
  • Enter this command:

Set-ExecutionPolicy Restricted -Scope CurrentUser

  • Press Enter and you’re connected to the VPN.

Conclusion

Although setting up a VPN using Cloud Services can be a little tricky but on the bright side, you don’t have to manage anything. Also, there are no third-party commercial VPNs in the middle if you’re worried after the HolaVPN incident of selling user bandwidth to businesses.