Pritunl is a self hostable open source OpenVPN server which in this use case is utilised as a secure method of accessing the internet when utilising public connections.
How do I set it up?
Due to the intended use, I wanted to have the ability to access the internet via a reliable data center connection. As well as it being secure I also wanted to be able to egress from a location different from my own for surcumventing any country wide blocking and bypass any restrictions.
Configure a virtual machine utilising what ever region and sizing you want (im utilising a Standard B1s VM with 1 vCPU and 1 GiB of memory). I am also using Ubuntu server 18.04 Long Term Support as my OS.
Configure public IP. You can utilise a static IP (and incure a small cost) or a dynamic IP with a DNS record.
Configure NSG inbound firewall rules.
Configure IP forwarding. This allows the VM NIC to send network traffic with a different source IP address than the one assigned to one of a network interface's IP configurations. Basically, if you do not enable IP forwarding you will not be able to access anything on the internet whilst the VPN connection is active.
- Access the VM via SSH by either the public IP address or the DNS record you configured earlier.
- Run through the installation commands documented here (bionic).
- Access the web interface by the IP or DNS record.
- Go through initial setup.
Setup an organisation.
Setup a user.
Configure your first server and assign the organisation you just created.
Download your OpenVPN profile, this can be used to import the required settings on your mobile device/desktop.
Import your profile. I use Manjaro with KDE. This has the OpenVPN connection plugin baked into the network manager.
Time to test!
Test your connection either by utilising your DEs connection method or my using the tool that Pritunl provide.
Time to test Android.