1. Prerequisites
- A Google Cloud Platform (GCP)
2. Create a GCP Project
- Go to the GCP Console.
- Click Create Project, name it (e.g.,
openvpn-project)
3. Launch a Compute Engine Instance
- Navigate to Compute Engine → VM Instances → Create Instance.
- Configure the VM:
- Name:
openvpn-server
- Region/Zone: Choose a region closest to your users.
- Machine Type:
e2-micro (cost-effective for light usage).
- Boot Disk: Ubuntu 22.04 LTS.
- Firewall Rules:
- Allow HTTP/HTTPS traffic.
- Click Create.
4. Create a Firewall Rule
Go to GCP → VPC Network → Firewall → Create a rule:
- Name:
allow-openvpn
- Protocol: UDP
- Ports:
1194
5. Reserve a Static External IP
- Go to VPC Network → External IP addresses.
- Click Reserve Static Address, name it (e.g.,
openvpn-ip), and attach it to the openvpn-server instance.
6. Connect to the Instance via SSH
- In the VM Instances list, click SSH next to
openvpn-server to open a browser-based terminal.
7. Update System Packages
sudo apt update && sudo apt upgrade -y
8. Install OpenVPN