源端口和目标端口不同,因此我需要在入站 aws 安全组中提及哪个端口号
在 aws 入站/出站安全组天气的端口范围选项中,我们需要提及源 IP 端口或目标 IP 端口。
Q1:例如,PROD 正在尝试连接网关,在这种情况下,在网关入站安全组天气中,我需要在端口范围列中提及 PROD 端口或 GATEWAY 端口。 作为回报,GATEWAY 正在尝试连接 PROD,然后在网关出站安全组天气中,我需要提及端口范围中的 PROD 端口或其他 GATEWAY 端口。
In the port range option of aws inbound/outbound security groups weather we need to mention sourceip port or else destinationip port.
Q1: For example PROD is trying to connect GATEWAY in this case in the gateway inbound security group weather I need to mention the PROD port or else GATEWAY port in the port range column.
And in return GATEWAY is trying to connect PROD then in Gateway outbound security group weather I need to mention the PROD port or else GATEWAY port in the port range.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
定义规则时,请使用与目标关联的端口号。例如:
Laptop
连接到EC2-Instance
EC2-Instance
安全组允许端口 80 上的入站连接哪个端口用作笔记本电脑上的“源”端口并不重要。安全组仅查看目标端口。
另一个示例:
EC2-Instance
连接到EC2-Instance
允许出站www.example.com
端口 80 上的强> 连接使用哪个端口作为
EC2-Instance
上的“源”端口并不重要。AWS Virtual Private Cloud (VPC) 中的安全组是有状态的。这意味着如果允许流量“流入”,那么也允许“流出”。因此,无需仅仅为了响应传入连接而定义出站规则。纯粹由于入站规则接受传入流量,响应将被自动允许。
When defining rules, use the port number associated with the destination. For example:
Laptop
connects toEC2-Instance
EC2-Instance
permits inbound connections on port 80It does not matter which port is used as the 'source' port on
Laptop
. The security group only looks at the destination port.Another example:
EC2-Instance
connects towww.example.com
on the InternetEC2-Instance
permits outbound connections on port 80It does not matter which port is used as the 'source' port on the
EC2-Instance
.Security Groups in AWS Virtual Private Clouds (VPCs) are stateful. This means that if traffic is allow 'in', then it is also allowed 'out'. So there is no need to define Outbound rules just to respond to Incoming connections. Responses will be automatically permitted purely as a result of having Inbound rules accept the incoming traffic.