We wont go into why you need a personal VPN, as there are many other blog posts which go into this in great detail. Let’s just get straight to the point and create our very own personal VPN. *This tutorial is going to focus on macOS and iOS, but can easily be applied to Windows or Linux.
So, Lets go!
First of all we need a VPS (Virtual Private Server) to host our personal VPN, I’ve chosen DigitalOcean, as its reasonably priced, and best of all – super easy to setup.
Now we need to create a new Droplet where we will install the OpenVPN server for our VPN. Ive chosen Ubuntu, and the smallest size is more then sufficient. I also chose New York as the datacenter region, but you can choose any location. *A U.S. location will come in handy if you use something like Netflix.
choose droplet Operating System
choose size for droplet
choose region for droplet
the freshly created droplet
Scroll to the bottom of the page and click Create you’ll end up with something like this:
*Take note of the “IP Address”, you’ll need it again later. In our case it is: 18.104.22.168
Open a Terminal window and login to your newly created droplet using the IP Address we noted above. *You should recieve a password for your droplet via email.
In this case we login with the following command:
ssh [email protected]
logging into the droplet
Now lets install our personal VPN with OpenVPN
This is super simple using the script maintained in this GitHub account:
In the Terminal window, type:
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
Press ENTER and run through the setup, selecting default answers for all questions.
running the setup script
Continue pressing ENTER and wait a minute or 2 for the script to install and configure openVPN. You should be rewarded with this prompt:
OpenVPN setup complete
*Take note of the client configuration location, in this case it is /root/client.ovpn
If you want to connect multiple devices to your VPN,
enter the following command, then press ENTER
Scroll to the bottom of the window and paste duplicate-cn
connecting multiple devices to VPN
Click CONTROL + X to commit the change
youll be prompted to confirm, click y
youll be prompted to save, click ENTER
OK, our VPN is now setup and we can logout of the droplet.
Type logout into the Terminal window then press Enter to logout.
Now that our VPN is configured, We need a way to connect to it via our computers/iPhone/iPad. That is also super simple.
Download configuration file
Let’s download the configuration file using the IP Address, and configuration location we noted above:
scp [email protected]:/root/client.ovpn ~/Desktop/client.ovpn
*change the IP address to the IP Address of your droplet. The configuration file will be saved to your Desktop, and be named client.ovpn
All thats left now is to use the configuration file on our devices to connect to our VPN.
Connecting to our VPN on macOS
Download and install TunnelBlick
Once TunnelBlick is installed, drag the configuration file to the TunnelBlick menu icon
drag config file to menu
All thats left to do is to tell TunnelBlick to connect to our VPN, which in our case is as simple as clicking Connect client
connect to VPN
Connecting to our VPN on iOS
You need to install Open VPN Connect
OK, lets add the configuration file to the app, this is super easy. All you need to do is open iTunes and connect your iPhone/iPad.
Click on Settings>Apps then scroll down to File Sharing and find OpenVPN
Drag the config file into the window and click Done
install config file in iTunes
Now we head back to our iDevice, and open OpenVPN
Look for the config profile you just imported and click the + icon.
importing config file
Click the toggle switch to connect:
connecting to VPN in iOS
Congratulations now your’e rocking your very own VPN!
In my own usage, and on my own meagre Internet connection I haven’t really noticed any noticeable slowdowns.