How To Set Up Your Own IPsec VPN server on Google Cloud Platform

Setup IPsec VPN Server on Google Cloud Platform.

#1 Setup your free Google Cloud Platform account at or login if you already have one.

#2 Create New Project.

#3 Create new Linux instance with IP Forwarding enabled

Machine type: f1-micro with (for testing purpose only, choose your own preference)
OS: Ubuntu 18.04 LTS Minimal
Firewall: Allow HTTPS traffic

On network interfaces, click the pencil icon to enable IP Forwarding

#3 Setup VPN Server

For more details you can follow the guide at:

SSH to your instance and install the L2TP Server,

wget -O && sudo sh

In the end of the installation write down your details below that will be use to setup for VPN client.


#4 Open UDP Port 500 & 4500

#5 Setup your IPsec/L2TP VPN Clients

Detail guide for many kind of devices as below link:

Install L2TP dependencies for Ubuntu 18.04;

sudo apt-get update
sudo apt-get install network-manager-l2tp
sudo apt-get install network-manager-l2tp-gnome

1 comment:

  1. Just FYI. After following this guide and having run the scripts I've got a warning from Google, that my VPS is being used for bitcoin mining