Great! Here's your ✅ One-Page Practical Homework Guide to replicate Oracle Cloud Free Tier using VirtualBox:


🧠 Oracle Cloud Free Tier – Local Simulation (WireGuard + Netdata)


🔌 VirtualBox Network Setup

VM Name Purpose OS / Specs Adapter Type IP Example
VPN-Server WireGuard VPN Ubuntu 22.04 / 1GB Host-Only Adapter 192.168.56.101
Monitor-Server Netdata Monitor Ubuntu 22.04 / 1GB Host-Only Adapter 192.168.56.102

✅ Both VMs use same Host-Only Adapter (like VCN in Oracle).


🛠️ VM1: VPN-Server Setup (WireGuard)

1. Install WireGuard

sudo apt update && sudo apt install wireguard -y

2. Generate keys

wg genkey | tee server_private.key | wg pubkey > server_public.key
wg genkey | tee client_private.key | wg pubkey > client_public.key

3. Create /etc/wireguard/wg0.conf

[Interface]
Address = 10.0.0.1/24
PrivateKey = <server_private_key>
ListenPort = 51820

[Peer]
PublicKey = <client_public_key>
AllowedIPs = 10.0.0.2/32

4. Enable IP forwarding

echo "net.ipv4.ip_forward=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

5. Start WireGuard

sudo wg-quick up wg0
sudo systemctl enable wg-quick@wg0