简体   繁体   English

如何从 IPV6 地址连接到 GCP(谷歌云平台)云 SQL 实例?

[英]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 .我试图从桌面上的 PgAdmin 4 工具访问作为GCP Cloud SQL实例运行的 Postgres SQL 服务器。 For that you have to whitelist your IP address.为此,您必须将您的 IP 地址列入白名单。 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.直到此时它工作正常,整个团队都使用 IPV4 地址,但我搬到了一个新的国家,我的新ISP 给我分配了一个 IPV6 地址,而且GCP 似乎不允许将 IPV6 地址列入白名单,因此你无法使用它们进行连接。

Here's a picture of the Connections/Allowed Networks tab:这是“连接/允许的网络”选项卡的图片: 在此处输入图像描述

Is there any kind of solution to this?有什么解决办法吗? Or do they expect me to only have ISPs who assign IPV4 addesses to me?还是他们希望我只有 ISP 为我分配 IPV4 地址?

Thank you.谢谢你。

Alternatively, you could just use the Cloud SQL Auth Proxy directly.或者,您可以直接使用Cloud SQL Auth Proxy You'll have to run an instance of it on your local machine and then PgAdmin can connect to the proxy on localhost.您必须在本地计算机上运行它的一个实例,然后 PgAdmin 才能连接到本地主机上的代理。

Yes, there is a workaround for this but not using the UI, instead you need to use the Cloud SDK.是的,有一个解决方法,但不使用 UI,您需要使用 Cloud SDK。

This has recently been added to cloud SDK beta.这最近已添加到云 SDK 测试版中。 So as you can see in the documentation forgcloud sql connect :因此,正如您在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 .如果您从 IPv6 地址连接,或受到某些组织政策(restrictPublicIP、restrictAuthorizedNetworks)的限制,请考虑运行此命令的测试版以避免通过云 SQL 代理连接时出现错误: 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 .目前我找不到任何关于在 UI 中实现此功能的功能请求,因此如果您想对此进行更改,我建议您在Google 的 Issue Tracker 系统中打开一个。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从我的电脑连接到谷歌云平台中私有 ip 的 sql 实例 - How to connect from my pc to sql instance with private ip in google cloud platform 如何更改为双栈子网并更新 VM 实例栈类型 - Google 云 - IPv6 支持 - How to change to dualstack subnet and update a VM Instance stacktype - Google cloud - IPv6 support 无法为 Google Cloud VM 的 IPv6 地址设置 PTR 记录 - Can't set PTR record for IPv6 address for Google Cloud VM 从 Google Cloud Platform (GCP) 中提取项目的“最后访问”信息 - Pull "last access" information on projects from Google Cloud Platform (GCP) 如何在谷歌云平台(GCP)中创建组织下的文件夹? - How to create folders under the organization in Google Cloud Platform (GCP)? 如何在 GCP 中将 curl 设为转发规则的 IPv6 地址? - How to curl an IPv6 address of a forwarding rule in GCP? 如何在 Google Cloud 服务上找到 IPv4 地址? - How do I find the IPv4 address on a Google Cloud service? Google Cloud Platform (GCP) Cloud Shell 缺少“提升”功能 - Google Cloud Platform (GCP) Cloud Shell "Boost" feature missing GCP:如何备份安装到文件存储的实例,或者基本上我想备份谷歌云平台中的文件存储 - GCP: How can I take backup of an instance that is mount to the file store or basically I want to take a backup of file store in google cloud platform 通过 VPN 将 Google Cloud SQL 实例连接到外部副本 - Connect Google Cloud SQL instance to external replica via VPN
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM