- Andreas Bartel
- May 20, 2021
How to Create Classic VPNs on Google Cloud Platform.
Classic VPN gateways have a single interface, a single external IP address, and support tunnels that use dynamic (BGP) or static routing (policy-based or route-based). They provide an SLA of 99.9% service availability.
With Classic VPN, your on-premises hosts communicate through one or more IPsec VPN tunnels to Compute Engine virtual machine (VM) instances in your project’s Virtual Private Cloud (VPC) networks. Classic VPN supports site-to-site VPN as the simple topology shown on this page or with redundancy options.
- Login to google cloud platform portal.
- Click on Hybrid connectivity.
- Select VPN.
- Click on Create VPN connection.
- Select Classic VPN.
- Click on continue.
- Provide VPN gateway name.
- Select Existing Network.
- Select Region.
- Click on IP address.
- Click on Create IP address.
- Provide the static IP address name.
- Click on Reserve.
- Provide VPN tunnel name.
- Provide Remote peer (external IP address)IP address.
- Select IKE version: IKEv1 or IKEv2(Default).
- Click on Generate & copy for IKE pre-shared key.
- Select Dynamic Routing options.
- Click on Cloud Router.
- Select Existing or Create a new cloud router.
- Provide Router name.
- Select Existing network.
- Select Region.
- Provide Google ASN between (64512 – 65534, 4200000000 – 4294967294) that you are not using elsewhere in your network.
- Click on Create.
- At Dynamic routing click on BGP session.
- Provide BGP session name.
- Provide Peer ASN configured for the peer VPN gateway.
- Provide a value/number for route priority.
- Provide Cloud Router BGP IP & BGP peer IP.
- Click on Save & continue.
- At Route-Based, provide Remote network IP range.
- Click on Done.
- At Policy-Based provide remote network IP range & Local IP range.
- Click on Done.
- If you need to create more tunnels on the same gateway, click Add tunnel and repeat the previous step. You can also add more tunnels later.
- Click on Create.
- After sometime VPN is ready then go to VPN tunnel home page.
- Classic VPN tunnel is there with the name we provide.
Create VPN using Shell.
- Setup a gcloud-cli on your system so click on link https://www.hackerxone.com/blog/how-setup-google-cloud-cligcloud-cli-ubuntu.
- At Classic VPN page click on command line.
- Copy & Paste the commands on terminal.