是否可以将 Google App Engine Flexi 与 Cloud Nat 连接起来

Is it possible to connect Google App engine Flexi with Cloud Nat

由于 GAE 不提供静态 IP,是否有任何方法可以为来自 Google App Engine 的所有出口连接连接 Cloud NAT。

将平台从 GAE 切换到 Compute Engine 或 运行 Compute Engine 中的代理不在范围内。

Cloud NAT (network address translation) 主要是为没有外部 IP 地址的 Google 云平台 (GCP) 虚拟机 (VM) 实例设计的私有 Google Kubernetes Engine (GKE) 集群 以连接到 互联网


You are correct, App Engine does not currently provide a way to map static IP addresses to an application. Instead, Google App Engine hosts your service on a dynamic public IP address of a Google load balancer.

如果您尝试将 Cloud NAT 与 Google App Engine 柔性环境结合使用。我建议您 设置一个 Google Compute Engine VM 用作您的 Google App Engine 应用程序 的代理,如 中所建议].


正如 Official Documentation 所建议的,请注意,使用静态 IP 地址过滤不被认为是一种安全有效的保护手段。例如,攻击者可以设置一个恶意的 App Engine 应用程序,它可以与您的应用程序共享相同的 IP 地址范围。相反,我们建议您使用 OAuth 和证书采取纵深防御方法。