Login to Google Cloud Platform

Create a new Project

Name Project & Select Location

Validate Project Creation

VM Creation
Select Compute Engine

Select Project from Dropdown

Wait for instance to be initiated

Create VM

Name your VM instance “pivpn”, select f1 CPU, and make sure the region selected is within the free tier. Boot disk type should be Debian and at least 10GB, but you should take advantage of the full free tier (30GB).


Wait

Network Config Select the three dots next to your VM Instance then, select “View network details”

Select External IP addresses

Change the External Address Type from Ephemeral to Static

Set the name and reserve

Firewall Rules Select “Firewall rules”



Delete default-allow-rdp, we don’t need RDP and RYUK is a bitch.
https://www.crowdstrike.com/blog/big-game-hunting-with-ryuk-another-lucrative-targeted-ransomware/

Configuration of PiVPN & Pi-HoleYou can now SSH into the VM instance

Now, you can start having fun.
Go into elevated root and update
$ sudo su
$ apt-get update && apt-get upgrade -y

Run PiVPN Install command
$ curl -L https://install.pivpn.io | bash

Confirm the installation

Confirm all prompts, it’s almost 100% “enter” except for this:

Allow the system to reboot after installation and reconnect via SSH.
To add a profile
$ pivpn add
: <name>
: <days of certificate validation>
: <password>
: <validate password>
You will then want to export the config to your device.
$ cat ~/ovpns/home.ovpn
You will then press “CTL -” to zoom out, copy the ENTIRE CONFIG. If you scroll, you will not be able to pull the entire config. Paste the copied config to a txt file and save as <name>.ovpn Import the file into OpenVPN on your device, plug in the password and you’re good to go!
If you want to add additional layers of security, remove the HTTP firewall rule (delete port 80 allow any).
References: