Original: https://www.evernote.com/shard/s514/sh/5ed920a9-cff2-4729-ae72-a218b62f343d/41a54103f77b7fa32334a7da2bdb53db

Google Cloud | VPN

PiVPN on Google Cloud Platform $0.01/month

  • Google Cloud Console
    • Create a project (‘CloudVPN’)
    • Navigate to ‘VM instances’> Create an instance
  • Linux Server (Free Tier)
    • Instance details
      • Machine Type: *F1-micro (1 vCPU, 0.6 GB Memory)*Zone: us-central1-aNetwork:    – 1 network interface    – Allow HTTPS trafficBoot Disk: Standard Persistent – 10 GB
  • piVPN Popular Commands
  • Print File Config to terminalcat file_name.ovpnAdd User to VPNpivpn -aOrpivpn addList valid certificates pivpn -listOr pivpn -lRevoke a client oven profilepivpn -revokeOr pivpn -r

Install piVPN on Google Cloud Platform

PiVPN in the Cloud

Login to Google Cloud Platform

Create a new Project

Name Project & Select Location

Validate Project Creation

VM CreationSelect 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).


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.ovpnYou 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).

Share :

Tags ,

How can we help?