What does protocol -1 on AWS security group egress mean?

Question:

I understand the egress property on an AWS security group controls the outbound traffic, but does anyone know what the protocol of -1 means?

Answer:

It’s in the documentation:

The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). (VPC only) Use -1 to specify all protocols. If you specify -1, or a protocol number other than tcp, udp, icmp, or 58 (ICMPv6), traffic on all ports is allowed, regardless of any ports you specify. For tcp, udp, and icmp, you must specify a port range. For protocol 58 (ICMPv6), you can optionally specify a port range; if you don’t, traffic for all types and codes is allowed.

Leave a Reply