If you live in a country with less-than-ideal privacy laws, then you probably want to protect your online history from your ISP. You may also want to use a personal VPN to provide anonymity or to circumvent governmental filters.
Before proceeding, please make sure that VPN usage is legal where you live. In general, operating your own personal-use VPN server is not a problem as long as you use it yourself and avoid illegal behavior on it.
Acquiring an adequate VPS:
For this quick tutorial, we will be using a cost-effective VPS solution offered by AlphaVPS. For 10Euros a year, the 1GB OVZ plan offered
Select Ubuntu 16.04 as the Operating System, and preferably choose between London or Germany for the location – this will give you the best speed in Doha, Qatar. If you live elsewhere, adjust the location.
Once your server is purchased, you will receive an email with the server IP and password. Use an SSH client like Putty in order to connect to your server. You will be asked for a username and password. The username is root and the password is the same password provided in the email your received.
Installing and configuring OpenVPN:
The best (and quickest) way to install OpenVPN in this setup is to use a pre-made script provided by Nyr on GitHub. This comes preconfigured with robust encryption settings with a good cipher pre-selected.
To download this on your server, input the following in the SSH window:[ifpaid 1 USD]
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
The installation script should start immediately:
The default settings are fine – the only thing I’d change is the DNS provider (select 2 for Cloudflare or perhaps Google). You may also want to change the client name if you desire.
Press enter a few more times and we’re good to go! The script will continue to automate the rest of the process.
We can now navigate to /root and locate /root/[name of client].ovpn – download this to your client (phone or computer) and import it in any OpenVPN client. You can use the OpenVPN GUI Client on Windows or the native network manager on any Linux flavor. Android and iOS also have a selection of OpenVPN apps that can
If you have any questions or comments, please let me know below! I’ll try my best to respond when I can.