I recently posted on how to host WordPress for free using Oracle VM, this is a follow-up post to show how to run a VPN server on the same machine.

The easiest is to follow Oracle’s official post “Launching Your Own Free Private VPN In The Oracle Cloud“, which uses a pre-built OpenVPN image from the Oracle Cloud Marketplace. The image offers 2 free VPN connections bundled with OpenVPN Access Server(A web admin panel to manage users, a separate product offered by OpenVPN).

The above solution works fine if you plan to run the VPN service on a dedicated VM instance and happy to have 2 free users; For me, they are too restrictive so I went with another solution, i.e. run the server without Access Server and create user certificates on demand.

The steps to set up OpenVPN server and configure certificate and iptables are quite complex, fortunately I found a script that helps automate most of the parts. Below are the steps:

  1. Github repo: https://github.com/Nyr/openvpn-install and follow its prompts. This is a good article on some details about this script.
  2. The script asks your VM ip address and configures server’s CA, server key and certificate as well as clients’ key and certificates. After you finish your first client, just run the script again to add other clients. If you’re interested in all detailed steps it does, refer to this post
  3. You will also need to configure Oracle’s network to allow ingress on UDP 1194
  4. The script will package an ovpn file that you can import on any OpenVPN client(PC, Apple, Android)
  5. For some reason, I had to add the following two entries in the client.opvn file so that my client can use the Google’s DNS 8.8.8.8

Happy using your own VPN šŸ™‚

Free VPN server setup
Tagged on:             

Leave a Reply

Your email address will not be published. Required fields are marked *

+ 82 = 86

This site uses Akismet to reduce spam. Learn how your comment data is processed.