在同一个安全组中默认打开哪些端口与其中的实例进行通信?

Which ports are opened by default in the same security group to communicate with instances within it?

同一个安全组内的所有端口是默认打开还是需要指定?比如端口 0-65535 上的 TCP 和所有端口上的 ICMP IPv4?

我问是因为我注意到我不需要在同一安全组中指定 SSH 端口 22 就可以访问同一安全组中的其他实例,所以我想知道这是否适用于所有协议和所有端口.

这是目前的样子。 SG 中的实例具有 172.31.80.0/20 范围内的 IP。我只允许来自其他安全组的 SSH,而不是其中的 SSH。

默认情况下,同一安全组中的实例不能相互通信(通过任何端口);但是默认安全组有一个例外。

来自documentation

Instances associated with a security group can't talk to each other unless you add rules allowing the traffic (exception: the default security group has these rules by default).