Using Oracle Server to Build Custom VPN

Published At 2026/May/20
No Image Found

Complete Guide to Building Your Own 4K UK VPN Using Oracle Cloud

This is the complete, start-to-finish guide to building your own 4K-capable UK VPN using Oracle Cloud. This process requires zero coding — it is entirely clicking through menus and pasting a few pre-written commands.

Part 1: The Oracle Cloud Setup

Oracle is notoriously strict during the sign-up process to prevent bots. Use your real name, exact billing address, and a credit card that matches (you will not be charged).

1. Create your Oracle Account

Critical Step:
Go to cloud.oracle.com and click "Start for free."

During registration, you will be asked to select a "Home Region." You must select UK South (London). You cannot change this later, and this is what gives you the UK IP address.

2. Deploy the Virtual Machine

Once logged into the Oracle dashboard, navigate to:

Compute > Instances > Create Instance

Name it something simple like: UK-VPN

3. Configure the Image and Shape

Select the free hardware.

  • Image: Click "Edit," select Canonical Ubuntu, and choose version 24.04 or 22.04.
  • Shape: Click "Edit." You can use the default VM.Standard.E2.1.Micro (AMD) or switch to Ampere (ARM). Both are "Always Free" and easily fast enough for a 4K VPN.

4. Download your SSH Keys

Save these files somewhere safe.

Scroll down to the "Add SSH keys" section. Leave it on "Generate a key pair for me" and click Save private key.

This downloads a .key file to your PC. You need this file to log into the server — do not lose it.

5. Launch the Server

Scroll to the bottom and click Create.

It will take about 2 minutes for the square icon to turn green and say "RUNNING."

Copy the Public IP Address shown on the right side of the screen.

Part 2: Opening the Oracle Firewall

By default, Oracle blocks almost all incoming traffic. WireGuard needs port 51820 open to work.

  1. On your instance page, click the link next to Subnet.
  2. Click on the Default Security List.
  3. Under "Ingress Rules", click Add Ingress Rules.

Fill out the rule exactly like this:

Source CIDR: 0.0.0.0/0
IP Protocol: UDP
Destination Port Range: 51820

Click Add Ingress Rules to save.

Part 3: Installing WireGuard

Now we tell the server to become a VPN. We will use a highly regarded open-source automated script called PiVPN that does all the heavy lifting.

1. Log into the Server (SSH)

Using Windows Command Prompt or PowerShell, run this command:

ssh -i "C:\path\to\your\privatekey.key" ubuntu@YOUR_SERVER_IP

Type yes if it asks to confirm the fingerprint.

2. Run the Installer

Once logged in, paste this exact command and press Enter:

curl -L https://install.pivpn.io | bash

3. Complete the Setup Wizard

  • The installer will open a blue screen.
  • Press Enter to navigate.
  • Select WireGuard (not OpenVPN).
  • Confirm the default port 51820.
  • For DNS Provider, select Google or Cloudflare.
  • Select Public IP as your connection method.
  • When asked to reboot, select Yes.

4. Create your TV Configuration File

Wait 1 minute for the reboot, then SSH back into the server.

Run this command:

pivpn add

When asked for a name, type: uk

Your config file has now been created at:

~/configs/uk.conf

Part 4: Getting it to your Toshiba TV

1. Extract the File from the Server

Open a new Windows terminal tab and run:

scp -i "C:\path\to\your\privatekey.key" ubuntu@YOUR_SERVER_IP:~/configs/uk.conf C:\Users\YourUsername\Desktop

2. Move the File to the TV

Use a USB flash drive or the Send Files to TV app to move uk.conf into your TV's download folder.

3. Connect

Open the official WireGuard app on your TV.

  • Click the + button
  • Select Import from file
  • Choose uk.conf
  • Turn the VPN toggle ON

✅ Setup Complete

You are done. Open BBC iPlayer, and you will be streaming in 4K directly from London.

Oracle Cloud Free Tier Keep-Alive Setup

To trick Oracle's automated script into thinking your server is active, we need to artificially push the CPU and memory usage above 20% for a short period every day.

Simply downloading a file isn't enough anymore, as Oracle's idle checks look at both CPU and memory allocation alongside network traffic.

We can set up a simple cron job (a scheduled background task on Linux) that runs a script once every midnight. This script will briefly stress the CPU and allocate a bit of RAM for a few minutes.

The Keep-Alive Command

SSH into your Oracle server, paste this entire block into your terminal, and press Enter:

(crontab -l 2>/dev/null; echo "0 0 * * * timeout 15m sha256sum /dev/urandom & timeout 15m dd if=/dev/urandom of=/dev/null bs=512M count=4 &") | crontab -

What this actually does behind the scenes

0 0 * * *

Tells the server to run this task every single night at exactly 12:00 AM server time.

timeout 15m sha256sum /dev/urandom

Runs a continuous math calculation using random data for 15 minutes. This safely spikes your CPU usage above the required 20% threshold.

timeout 15m dd if=/dev/urandom of=/dev/null bs=512M count=4

Generates a quick 2 GB chunk of data directly in system memory (RAM) and discards it immediately, keeping memory utilization active.

✅ Result

By running this for just 15 minutes every 24 hours, you can maintain periodic activity on your Oracle Cloud Free Tier instance, helping ensure your free London server remains active and ready whenever you need it.