如何从 IPV6 地址连接到 GCP(Google Cloud Platform)Cloud SQL 实例?

发布于 2025-01-13 05:44:20 字数 495 浏览 4 评论 0原文

我正在尝试从桌面上的 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:
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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

旧情勿念 2025-01-20 05:44:20

是的,有一个解决方法,但不使用 UI,而是需要使用 Cloud SDK。

该功能最近已添加到云 SDK 测试版中。正如您在 gcloud sql connect

如果您从 IPv6 地址进行连接,或受到某些组织策略(restrictPublicIP、restrictAuthorizedNetworks)的限制,请考虑运行此命令的 Beta 版,以避免通过 Cloud SQL 代理连接时出现错误:gcloud beta sql连接

我目前在 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:

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.

笑咖 2025-01-20 05:44:20

或者,您可以直接使用 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.

伊面 2025-01-20 05:44:20

或者,您可以(至少在 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文