Using OpenVPN or Cloud VPN to connect to AlloyDB Instance

170 Views Asked by At

TLTR; - Want to connect to google Alloydb using OpenVPN

A little bit more detailed:

I'm trying to connect from my local to Alloydb so that we are able to perform some queries on AlloyDB but it's only reachable in a privat IP.

I have it working using a VM with alloydb-auth proxy and then a ssh tunnel but that's too cumbersome for other developers to use. Initially we decided to go with the Cloud VPN solution but Google's solution for it is quite confusing so we went with OpenVPN Solution via marketplace. I managed to get the public IP of the VM when i activate the VPN but I'm still not able to reach Alloy DB. I believe I'm missing some routing from the public IP to the AlloyDB but not sure what. Can you give me a hand?

P.S. If there is a easier solution using Cloud VPN from google I'm up for it i just don't find the documentation easy to follow.

Thanks in advance :)

1

There are 1 best solutions below

0
On BEST ANSWER

I've discovered that I need to add the address of the alloydb to the private subnets which the clients should have access and whitelist that same IP on the firewall rules.

Will Mark it as closed