Cloud SQL private IP access via VPN Tunneling

432 views
Skip to first unread message

Agam Bajwa

unread,
Jun 30, 2020, 3:26:08 PM6/30/20
to Google Cloud SQL discuss
I have two projects 1 and 2 and two vpc networks vpc1 and vpc2 in the respective projects. I need to connect to sql instance in vpc2 (project2) from vm in vpc1 project1 using private IP. After trying diiferent methods and exploring options like vpc peering, cloud NAT (which wouldn't work for me) I found the cloud VPN solution. I am following this google docs link - https://cloud.google.com/sql/docs/postgres/configure-private-ip#vpn to connect to cloudSQL instance using its private IP. I have setup VPN Tunneling and all the necessary steps that were mentioned in the steps 1 and 2 in the link itself, but not able to connect to the instance. I have tested the VPN connectivity as well. I am able to ping a vm2 in vpc2 (project2) from vm1 in vpc1 (project1).

I suspect the problem is in the final steps over here:
https://i.stack.imgur.com/aIyq8.png

No problem in step a and step b is also clear, but what exactly needs to be done in step c is not clear. Can you explain what needs to be done over there.

Van Duong

unread,
Oct 5, 2021, 3:56:14 AM10/5/21
to Google Cloud SQL discuss
Hi,
Please make sure to use Cloud VPN with Dynamic routing (BGP).

Reply all
Reply to author
Forward
0 new messages