如何从 IPV6 地址连接到 GCP(Google Cloud Platform)Cloud SQL 实例?
我正在尝试从桌面上的 PgAdmin 4 工具访问作为 GCP Cloud SQL 实例运行的 Postgres SQL 服务器。为此,您必须将您的 IP 地址列入白名单。到目前为止,一切都工作正常,整个团队都使用 IPV4 地址,但我搬到了一个新的国家/地区,我的新 ISP 为我分配了 IPV6 地址,而 GCP 似乎没有”不允许将 IPV6 地址列入白名单,因此您无法使用它们进行连接。
有什么办法可以解决这个问题吗? 或者他们是否希望我只拥有为我分配 IPV4 地址的 ISP?
谢谢。
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:
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,有一个解决方法,但不使用 UI,而是需要使用 Cloud SDK。
该功能最近已添加到云 SDK 测试版中。正如您在
gcloud sql connect
:我目前在 UI 中找不到任何关于此功能的功能请求,因此,如果您想对此进行更改,我建议您在 Google 的问题跟踪系统。
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
: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.
或者,您可以直接使用 Cloud SQL 身份验证代理 。您必须在本地计算机上运行它的一个实例,然后 PgAdmin 可以连接到本地主机上的代理。
Alternatively, you could just use the Cloud SQL Auth Proxy directly. You'll have to run an instance of it on your local machine and then PgAdmin can connect to the proxy on localhost.
或者,您可以(至少在 macOS 上)强制使用 IPv4 进行外部连接)
(网络连接 > TCP/IP > IP V6 > 仅本地链接
Alternatively, you can (at least on macOS) force an IPv4 for external connections)
(Networks Connection > TCP/IP > IP V6 > Link-local only