Oracle Cloud's Always Free servers are popular for VPNs, and also a classic source of "it installed but nothing connects". The cause is almost always the same: Oracle has two firewalls, and both block your VPN by default.
Firewall 1: the cloud network
Oracle filters traffic before it reaches your server. In the console, open the instance's virtual cloud network, find the subnet's security list, and add ingress rules allowing the VPN's ports from 0.0.0.0/0:
- UDP 51820 for WireGuard and AmneziaWG
- TCP 443 for VLESS
This one lives outside the server, so no command on the server can show or fix it. If you skip it, UDP never arrives and WireGuard just sits there trying. That looks exactly like a handshake that never completes.
Firewall 2: the server's own rules
Oracle's Ubuntu images ship iptables rules that reject everything except SSH, including traffic being passed through the server, which is what a VPN does. Log in as ubuntu with your key and run:
sudo iptables -I INPUT -p udp --dport 51820 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 443 -j ACCEPT
sudo iptables -D FORWARD -j REJECT --reject-with icmp-host-prohibited
sudo netfilter-persistent save
The third line removes the rule that blocks forwarding. If it says "Bad rule", there was nothing to remove, which is fine. The last line saves the rules so they survive a reboot; without it, everything breaks again after the next restart.
Skipping this second step gives a different symptom: the connection completes, but nothing loads. That's the connected but no internet page's "a firewall drops forwarded traffic" case.
Quirks worth knowing before you start
- Logins are keys only, as
ubuntu. There's no password option. Download the private key when you create the instance, or add your own public key. Can't SSH in? - Pick Ubuntu. Oracle Linux works too, but the user is
opc. - Free Arm capacity is often sold out. If creation fails with an "out of capacity" error, try another availability domain or region, and try again later.
- Idle instances can be reclaimed. Oracle's Always Free terms allow it to reclaim instances it considers idle, and a lightly used VPN can look idle. Check the current terms before relying on it for anything important.
- Your home region is fixed. Always Free resources are only available in the region you chose when you signed up.
A quick way to find which firewall is the problem
Use the packet-watching trick from how to check whether your VPN port is open:
sudo tcpdump -ni any udp port 51820
Try to connect. If nothing shows up, Firewall 1 (the security list) is closed. If packets arrive but the connection still fails or has no internet, the problem is Firewall 2 or something else on the server.
Setting it up with Nullsify
Nullsify configures the server side, but it can't open Oracle's security list, and Oracle's Ubuntu image still needs the forwarding rule removed once. The Oracle Cloud setup guide walks through every click, and how to make your own VPN covers the general process. If you're choosing between hosts, best VPS providers for a VPN compares the alternatives.