如何在Google Compute Engine中打开特定端口(例如9090) [英] How to open a specific port such as 9090 in Google Compute Engine

查看:142
本文介绍了如何在Google Compute Engine中打开特定端口(例如9090)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个Google Compute Engine实例,并且我想在两个实例中都打开端口9090.我认为我们需要添加一些防火墙规则.

I have 2 Google Compute Engine instances and I want to open port 9090 in both the instances. I think we need to add some firewall rules.

你能告诉我我该怎么做吗?

Can you tell me how can I do that?

推荐答案

您需要:

  1. 转到cloud.google.com

  1. Go to cloud.google.com

转到我的控制台

选择您的项目

选择网络>​​ VPC网络

Choose Networking > VPC network

选择防火墙规则"

选择创建防火墙规则"

Choose "Create Firewall Rule"

要将规则应用于选择VM实例,请选择目标">指定的目标标记",然后在目标标记"中输入标记的名称.此标记将用于将新的防火墙规则应用于您想要的任何实例.然后,确保实例已应用了网络标签.

To apply the rule to select VM instances, select Targets > "Specified target tags", and enter into "Target tags" the name of the tag. This tag will be used to apply the new firewall rule onto whichever instance you'd like. Then, make sure the instances have the network tag applied.

要允许到端口9090的传入TCP连接,请在协议和端口"中输入tcp:9090

To allow incoming TCP connections to port 9090, in "Protocols and Ports" enter tcp:9090

点击创建

希望对您有帮助.

更新,请参阅文档进行自定义你的规则.

Update Please refer to docs to customize your rules.

这篇关于如何在Google Compute Engine中打开特定端口(例如9090)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆