Create a free personal VPN using OpenVPN using Oracle Cloud free tier’s ARM Instance.
You’ve heard it right, Oracle’s ARM instance is based on ARM64 CPU and fortunately, OpenVPN supports it.
The whole process takes around a few minutes, and we will walk you through the process.
Hosting your own VPN has never been easier. There are now multiple Github projects that will reduce the pain of setting up your own VPN server. When you have a web server, like from Vultr, or DigitalOcean you can easily use their marketplace to spin an OpenVPN server in seconds. On the other hand, Oracle Cloud servers are not very easy to manage, you are often required to add an SSH key to access y our server (because Oracle Cloud doesn’t;t support SSH passwords). We’ve another guide for installing Tailscale (WireGuard-powered VPN with GUI dashboard) on Oracle’s free tier instance, make sure to check that out,
Before we start installing the VPN, let’s talk about what VPN is and how it can help us.
A self-hosted VPN server offers several advantages over using a commercially hosted VPN service. Here are some of the reasons why you might consider setting up a self-hosted VPN server:
- Privacy: When you use a commercially hosted VPN service, you are essentially entrusting your data to a third party. With a self-hosted VPN server, you have complete control over your data and can ensure that it is not being collected, analyzed, or sold by anyone.
- Cost: While there is an initial investment in setting up a self-hosted VPN server, over time it can be more cost-effective than paying for a monthly subscription to a commercial VPN service.
- Customization: With a self-hosted VPN server, you can choose the location of the server, the type of encryption used, and other technical details. This can be especially useful for people who need to use a VPN for a specific purpose, such as accessing geo-restricted content or bypassing firewalls.
- Speed: When you use a commercially hosted VPN service, your traffic is often routed through multiple servers before it reaches its final destination. This can slow down your internet speed. With a self-hosted VPN server, your traffic travels directly from your device to the server, which can result in faster speeds.
- Reliability: When you use a commercially hosted VPN service, you are at the mercy of the provider’s infrastructure. If the provider experiences an outage, you will not be able to use the VPN. With a self-hosted VPN server, you have complete control over the infrastructure and can ensure that the server is always available when you need it.
In conclusion, a self-hosted VPN server can provide a more secure, cost-effective, customizable, and reliable solution compared to using a commercially hosted VPN service.
Phase A. Server installation
1. Sign up for a free Oracle Cloud account and create an ARM instance using the free tier options.
2. Create a new ARM instance and make sure to select “Oracle Linux” as the image.
3. Connect to the ARM instance using SSH and update the package manager. Access your server using PuTTY or similar SSH applications, then run this command to install OpenVPN
Phase B. Installing OpenVPN
4. Install OpenVPN by running the command.
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
5. The script asks a few questions, choose anything you like and proceed.
Welcome to this OpenVPN road warrior installer!
I need to ask you a few questions before starting setup.
You can use the default options and just press enter if you are ok with them.
Which protocol do you want for OpenVPN connections?
1) UDP (recommended)
What port do you want OpenVPN listening to?
Which DNS do you want to use with the VPN?
1) Current system resolvers
DNS : 2
Finally, tell me a name for the client certificate.
Client name [client]:
Okay, that was all I needed. We are ready to set up your OpenVPN server now.
Press any key to continue...
6. In the end, give a name for the first client, it could be anything but prefer a short name.
7. Once the script finishes, take note of the list line as it includes the OVPN file name and location.
Client Devendra added, configuration is available at: /root/devendra.ovpn
7.1 You can re-run the script to add another user and repeat the same to add multiple users.
The real struggle is copying the OVPN file to your device, so you can use it on a mobile or Computer. What I did was, open the file using the cat command.
8. Open the file with cat command and copy the data inside using CTRL+C.
----END OpenVPN Static key V1-----
9. Copy the entire output in a Text file (on a PC) and rename it as devendra.ovpn, from now you can easily import it to OpenVPN clients.
Please be aware that this is a high-level guide and there are some additional steps and configurations that may be necessary. It’s recommended that you familiarize yourself with OpenVPN and Oracle Cloud before attempting to set up your own VPN.
This was the basic OpenVPN installation that can be accessed through terminal commands, the GUI OpenVPN is called Access Server, which is limited to 2 connections. Since we wanted a dead-simple way that doesn’t take more than 5 minutes.