Instructions for setting up a free VPN Server with Oracle Cloud VPS

Are you looking for a cost-effective solution to enhance your online security and privacy? Look no further! With the step-by-step guide provided by meptv.net, even a beginner can easily set up a free VPN server using Oracle Cloud VPS. Our informative articles are designed to provide useful tips and tricks to help you navigate the world of virtual private networks.

Table of contents

I. Create Free Cloud VPS

Oracle is having a Free Tier program that provides free Cloud VPS for life. You can create up to 6 free VPS on Oracle platform.

You can refer to the steps below to create yourself a free Cloud VPS:

  1. Create an Oracle Cloud Free Tier account
  2. Create a free virtual machine Oracle Cloud VPS
  3. Basic configuration of Oracle Cloud VPS virtual machine

Attention:

  • You should prioritize creating A1.Flex virtual machine (ARM) because it has better network bandwidth (500Mbps). E2.1.Micro virtual machine (AMD) is limited to only 50Mbps bandwidth, should only be used in case of force majeure when not creating ARM virtual machine.
  • Virtual machine’s operating system: Ubuntu 20.04

II. Install Docker

I will create a VPN server to use WireHole-UI, the WireGuard VPN Server creation tool that integrates Pi-Hole’s ad blocking feature. WireHole-UI works on top of Docker-Compose. Therefore you need to install Docker before you get started.

Instructions for installing Docker, Docker Compose on Ubuntu 20.04

III. Install Wirehole-UI

Install WireHole-UI according to detailed instructions below

WireHole-UI – Set up VPN Server with built-in ad blocking

IV. Firewall Configuration

To be able to connect to WireGuard VPN Server on Oracle’s virtual machine, you need to perform additional Firewall configuration to open ports 51820 and 51821.

By default, Oracle’s virtual machines only open connections to port 22. To connect VPN to virtual machines, you need to configure Firewall to open two more ports 58120 and 51821.

I use ufw to configure Firewall for virtual machines. You can set it up quickly with the following command

sudo apt install ufw
sudo ufw allow OpenSSH
sudo ufw allow 51820
sudo ufw allow 51821
sudo ufw enable

If you want to know more about UFW, you can refer to this article

UFW Tutorial: Configure and Manage Firewalls on Linux

V. Configure Security List

In addition to configuring the Firewall on the virtual machine, you also have to perform the additional step of opening the port of the Security List in the Oracle network. You need to open port 51820 and 51821 according to the instructions below

Basic configuration guide for Oracle Cloud virtual machine after setup

Note to choose the correct Protocol:

  • Port 51820: UDP
  • Port 51821: TCP

After the setup is complete, you will see a list with 2 more ports 51820 and 51821 as below

BECAUSE. Check the results

If you follow the steps exactly as I have instructed above, you have a VPN Server ready to serve at any time. Thanks to the built-in Pi-Hole on the Server, when connecting via VPN, you also enjoy an additional ad blocking feature.

Test network connection speed via VPN Server: delicious speed!

Good luck with your VPN setup!

Leave a Reply

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