Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect to a GCP (Google Cloud Platform) Cloud SQL instance from an IPV6 address?

I am trying to reach our Postgres SQL server running as a GCP Cloud SQL instance from the PgAdmin 4 tool on desktop. For that you have to whitelist your IP address. Until this point it was working fine, the whole team used IPV4 addresses, but I moved to a new country where my new ISP assigned an IPV6 address to me, and it seems like GCP doesn't allow IPV6 addesses to be whitelisted, thus you can't use them to connect.

Here's a picture of the Connections/Allowed Networks tab: enter image description here

Is there any kind of solution to this? Or do they expect me to only have ISPs who assign IPV4 addesses to me?

Thank you.

like image 779
Bence Mányoki Avatar asked Nov 01 '25 12:11

Bence Mányoki


1 Answers

Yes, there is a workaround for this but not using the UI, instead you need to use the Cloud SDK.

This has recently been added to cloud SDK beta. So as you can see in the documentation for gcloud sql connect:

If you're connecting from an IPv6 address, or are constrained by certain organization policies (restrictPublicIP, restrictAuthorizedNetworks), consider running the beta version of this command to avoid error by connecting through the Cloud SQL proxy: gcloud beta sql connect.

I couldn't find any Feature Requests for this being implemented into the UI at the moment, so if you'd like to have this changed I would suggest you to open one in Google's Issue Tracker system.

like image 169
Ralemos Avatar answered Nov 03 '25 12:11

Ralemos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!