繁体   English   中英

如何限制计算引擎仅接受来自app引擎的请求

[英]How to restrict compute engine to accept requests only from app engine

我在Google App engine上运行我的服务器,我正在使用nodejs ,我在Compute engine上部署了mongoDB, Elasticsearch and Redis等所有其他服务。

现在由于安全问题,在所有数据库实例(MongoDB,ES,Redis)上,我不想接受来自任何地方的请求,只是来自App engine

有什么我可以使用VPN OR Networks Or Firewall(Using Target tags and Source tags)或任何东西来接受仅来自应用程序引擎的请求?

我读到了在防火墙部分使用标签,我可以将app引擎实例定义为源标签,并将引擎标签计算为目标标签,这样我的目标标签只能监听源标签

请帮助我们,我很长一段时间都在寻找这个,但没有找到任何有用的东西。

UPDATE

I tried to set my app_engine instance tag and then used that tag to the firewall rule associated with all services(MongoDB, ES, Redis) so that only services will get connected by app engine only, but it is not working now i am not able to connect to my app engine to all of my services.

我只有一个网络是default network(auto-created by google) ,我的所有实例,例如MongoDB以及我的app engine都在同一个default network

我在app.yaml中添加了以下行

network:
  instance_tag: app-tag

下面我坐在firewall rule源标签上面的app-tag对于我的MongoDB数据库。

在此输入图像描述

您可以灵活使用app引擎。 https://cloud.google.com/appengine/docs/flexible/

然后使用数据库在同一网络上设置serivce机器。

在此类配置中,您无需将公共IP设置为数据库,因此无法从内部网络外部访问它们。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM