如何访问私有 EC2 实例中运行的应用程序

发布于 2025-01-17 11:51:57 字数 456 浏览 2 评论 0原文

我有一个应用程序在私有 EC2 实例的端口 9001 上运行。

我有一个在公共子网中运行的 Web 服务器。子网以及 IGW 和 NAT 网关的路由表已正确设置。

我为每个实例定义了安全组。

Web 服务器 SG:

入站:Webserver Inbound​​

应用程序服务器 SG:

入站:允许来自 Web 服务器 SG 的所有流量

该应用程序在端口 9001 上列出。所以我需要明确提及端口9001在Web服务器SG中,然后应用程序服务器将流量发送到Web服务器?

或者我是否需要明确允许来自私有 EC2 实例的流量(例如出站规则)?

I have an application running at port 9001 in the private EC2 instance.

I have a web server running in the public subnet. The subnets and the routeing table with IGW and NAT Gateways are set up properly.

I have security groups defined for each instance.

Web Server SG:

Inbound: Webserver Inbound

App server SG:

Inbound: Allowed all traffic from web Server SG

The application is listing on port 9001. So Do I need to explicitly mention port 9001 in the Web server SG and then the Application server will send the traffic to the webserver?

Or Do I need to explicitly allow traffic from Private EC2 instances like outbound rules?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文