可以访问Google Cloud Compute实例外部IP(启动Fedora35)

发布于 2025-02-09 08:49:32 字数 668 浏览 0 评论 0原文

我有一个nodejs app在其中运行vm实例。 我创建了一个防火墙规则 打开端口TCP:5000 。 它在本地(内部VM)起作用,我能够通过

sudo wget http://localhost:5000

此验证连接状态200确定。

当我用 vm外部IP地址替换localhost时,我会超时。

我尝试了大多数可以在互联网上获得的东西,但是现在我很累。这是我第一次与GCP互动,所以我想这是预期的。

I have a nodejs app running inside it a vm instance.
I created a firewall rule opening port tcp:5000.
It works locally (inside vm) and I am able to verify the connection via

sudo wget http://localhost:5000

this gives status 200 ok.

when I replace the localhost with the vm external Ip address I get a connection time out.
enter image description here
enter image description here

I have tried most things I could get on the internet but now I am tired. Its my first time interacting with gcp so I guess it's expected.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小情绪 2025-02-16 08:49:32

VM实例上的网络标签与您的防火墙规则库存控制器 - 端口不匹配。计算引擎实例具有这些网络标签http-serverhttps-server。为了解决此问题,这些是您的选择。

  1. 更新防火墙规则库存-Controller-PORT并添加这些网络标签http-serverhttps-server。有关更多信息,请检查此文档关于更新防火墙规则的文档。
  2. 在您现有的VM上添加您在防火墙规则contectory-controller-port上添加的其他网络标签。要了解更多信息,请检查此 documeth现有的VM。

The Network tags on the VM instance do not match your firewall rule inventory-controller-port. The Compute Engine Instance has these network tags http-server, https-server. To resolve this issue, these are your options.

  1. Update the Firewall rule inventory-controller-port and add these network tags http-server, https-server. For more information, check this documentation about updating firewall rules.
  2. Add additional network tags that you added on the Firewall rule inventory-controller-port on your existing VM. To know more check this documentation about Adding tags to an existing VM.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文