从外部网络访问 Google MemoryStore

Access Google MemoryStore from outside network

有没有办法允许外部世界访问 Google Memorystore 并仅通过 IP 地址将连接列入白名单?

我有一些需要访问 redis 的关闭 google 服务,但似乎无法使用 IP 访问 Memorystore。

您可以按照this other thread中提出的解决方案进行操作。这样,您将使用该 Compute Engine 实例作为代理,您只需要配置一些防火墙规则以仅允许特定 IP 地址访问该 VM。

分几步说:

  • 在 Google Memorystore 实例正在使用的同一 VPC 中创建您的 VM
  • 添加防火墙规则以拒绝所有流量(入口和出口)和其他更高优先级的规则,允许来自您的目标 VPC 的所需 IP 地址的所有流量(同样,入口和出口)
  • 按照 mentioned thread
  • 中的说明使用端口转发