我正在运行我的服务器Google App engine
我在哪里使用nodejs
我还有所有其他服务,例如mongoDB, Elasticsearch and Redis
部署于Compute engine
.
现在,出于安全考虑,在所有数据库实例(MongoDB、ES、Redis)上,我不想接受来自任何地方的请求,而只想接受来自App engine
.
有什么我可以做的吗VPN OR Networks Or Firewall(Using Target tags and Source tags)
或者什么只接受来自应用程序引擎的请求?
我读到了有关在防火墙部分中使用标签的信息,我可以在其中将应用程序引擎实例定义为源标签,将计算引擎标签定义为目标标签,以便我的目标标签只能侦听源标签.
请帮助我,我已经搜索了很长时间但没有找到任何有用的东西。
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
下面我坐在上面的源标签app-tag
in firewall rule
对于我的 MongoDB 数据库。