Every OCI project starts with networking. A properly configured network allows your resources to communicate securely, access the internet, and be reached by users. In this project, we’ll create a simple Virtual Cloud Network (VCN) to support our Valheim server and website.
Step 1 – Create a VCN
OCI Console:
Networking → Virtual Cloud Networks → Create VCN
Choose:
Name: Server-Web-VCN
CIDR: 10.0.0.0/16
Keep ‘Use DNS hostnames in this VNC’ checked

Click Create VCN
Step 2 – Create an Internet Gateway
Click into the network you have just created then along the top menu click ‘Gateways’:


Name it and click ‘Create Internet Gateway’
Step 3 – Create a Route Table
If you are using the VCN wizard or the default route table, simply add (or verify) the following route rule:
Destination: 0.0.0.0/0
Target: Internet Gateway
This allows internet access. You do not need to create a separate route table for a simple Valheim/WordPress server. The default route table is perfectly adequate.
Step 4 – Create a Public Subnet
Click into the network you have just created then along the top menu click ‘Subnets’:
Create:
Name: Public-Subnet
CIDR: 10.0.0.0/24
Most important setting:
Subnet Access = Public Subnet
If you accidentally set this to Yes you won’t get a public IP to set up websites and servers.
Step 5 – Security List
SSH
Restrict to your home IP only.
TCP 22
Source: Your public IP/32
Example:
81.x.x.x/32
Never leave SSH open to the world if possible.
Website
TCP 80
Source: 0.0.0.0/0
TCP 443
Source: 0.0.0.0/0
Valheim
UDP 2456
UDP 2457
UDP 2458
Source: 0.0.0.0/0