Tunneling Anypoint Platform and GCP (Addendum)

ANUPAM GOGOI
3 min readOct 23, 2022

--

Introduction

I have already written an article on how to create a tunnel from Anypoint Platform to GCP in one of my previous articles.

In this article, I would like to explore this a bit more by creating a Classic VPN in GCP.

VPN Setup in GCP

In this phase, we are going to set up a classic VPN in GCP.

Classic VPN

Choose VPC

Next, we choose a VPC to expose it via this VPN. In my case, it's gke-vpc with CIDR 10.101.0.0/22. Then we reserve a Static IP for our VPN.

Tunnel Configuration

Next, we need to configure tunnels.

We will need a bunch of information for the above form from the Anypoint Platform. So, let's switch to Anypoint Platform now.

VPN setup in Anypoint Platform

Below is the configuration in pictorial view.

Get tunnel configs

The below diagram speaks all the necessary configurations.

Click CREATE and if everything is correct your tunnel will be created.

Testing the tunnel

I have launched a VM in GCP in the defined VPC i.e 10.101.0.0/22. The IP of the VM instance is 10.101.0.10.

I have deployed an API in CloudHub in the specified VPC of Anypoint Platform i.e 10.10.0.0/22. The IP address of the worker is 10.10.3.134.

Cool. Now let's ping from both sides.

Ping from Worker (Anypoint Platform) to VM (GCP)

To test this option, I have created an Mule API to run almost all Linux commands available in the worker.

So, check the below result. I can successfully ping the VM in GCP.

Ping from VM (GCP) to Worker (Anypoint Platform)

Hurray!!!. It also pinged.

So, our tunnel is working perfectly.

Conclusion

In this brief article, I have shown how to create a tunnel from the Anypoint Platform to GCP in a classic way. It's simple.

Have fun!

--

--

ANUPAM GOGOI
ANUPAM GOGOI

Written by ANUPAM GOGOI

Mulesoft, WSO2, Java & Go expert. Checkout my DZone articles also: https://dzone.com/users/2946660/agogoi.html

No responses yet