I recently set up a VPN client for personal use by using a VM and OpenVPN.
For this article, I will be using a VM in Azure.
Launch a VM Ubuntu 18.04 in Azure.
Make sure you have open the following ports for inbound connection. During the creation process, we can only unlock the following ports: Port 80 (HTTP), 443 (HTTPS), 3389(RDP) and 22 (SSH). In addition to the already unlocked ports, we need to unlock the following ports: TCP on port 943 and UDP on port 1194. We can do this in the network settings of our VM.
Similarly, open the UDP port 1194.
Now SSH into your VM and let's get started with the install.
Run the following commands:
1sudo apt update2sudo apt upgrade
1dig +short myip.opendns.com @resolver1.opendns.com
1wget https://git.io/vpn -O openvpn-install.sh
1chmod +x openvpn-install.sh
After the install is complete, you should see a Finished message if it was successful.
Now you can run the script again to create different profiles.
There was one created during the install and it should be located in the home directory of your VM.
You can use WinSCP to copy the file to the local machine.
Now you need the OpenVPN client on your local machine and import settings from the .ovpn file that was copied in the previous step.
After installing the client, you should be able to import the .ovpn file into the OpenVPN client
Please feel free to reach out if there are any hiccups setting this up. Also, you can follow me on Twitter!