来自文档:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html#security-group-rules
Source or destination: The source (inbound rules) or destination (outbound rules) for the traffic. Specify one of these options:
(...)
Another security group. This allows instances associated with the specified security group to access instances associated with this security group. This does not add rules from the source security group to this security group. You can specify one of the following security groups:
The current security group.
有人试过吗?
我创建了 2 个盒子 BoxA、BoxB。我在端口“所有端口”上创建了一个从源 GroupA 入站的安全组 GroupA。如果我尝试在端口 9000 上从 BoxA 远程登录 BoxB,而 BoxB 在端口 9000 上有一个 simpleHttpServer,我什么也得不到。
我能做错什么?
最佳答案
在添加新规则时,我对在源(入站规则)和目标(出站规则)中添加另一个安全组的确切含义感到困惑。我发现下面给出的解释(来源:https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#SecurityGroupRules)非常有用。
“当您将安全组指定为规则的源时,允许来自与指定协议(protocol)和端口的源安全组关联的网络接口(interface)的流量。根据网络接口(interface)的私有(private) IP 地址允许传入流量与源安全组关联的(而不是公共(public) IP 或弹性 IP 地址)。将安全组添加为源不会添加源安全组中的规则。”
关于amazon-web-services - AWS 安全组包括另一个安全组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45416882/