![](/img/trans.png)
[英]Use Google App Engine or Google Cloud Compute VM to Test Run My App?
[英]Connect to Compute Engine From App Engine or CLoud Run with firewall and IAP
我有一个在 Google 计算引擎上运行的 SFTP 服务器。 防火墙设置为允许来自身份感知代理的流量。
我可以在本地使用gcloud ssh
连接到服务,但无法从 App Engine 或 Cloud Run 连接。 Cloud Run 和 App Engine 的服务帐号已经拥有 IAP 隧道和 Https 权限。
后端使用ssh2-sftp-client在 Node 中编写。
如何保护 Compute Engine 并允许来自 Cloud Run 和 App Engine 端口 22 的 tcp 流量仍然通过 go?
有两种可能的解决方法:
如果您使用 App Engine Standard ,您可以尝试无服务器 VPC 访问:
Serverless VPC Access 使您能够从 App Engine 应用直接连接到 Compute Engine VM 实例、Memorystore 实例、Cloud SQL 实例以及具有内部 IP 地址的任何其他资源。
不幸的是,目前 Cloud Run 无法使用无服务器 VPC 访问(更多信息请参见文档尚未支持的服务),但您可以在 Google Public Issue Tracker 上提出功能请求,加入、评论和跟踪进度。 此外,App Engine Flex 也不提供此类服务。
如果您使用 App Engine Flex 或 Cloud Run,请按照以下步骤操作:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.