简体   繁体   English

AWS安全组出口上的-1协议是什么意思?

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

I understand the egress property on an AWS security group controls the outbound traffic, but does anyone know what the protocol of -1 means? 我了解AWS安全组上的egress属性可以控制出站流量,但是没有人知道-1协议的含义吗?

resource "aws_security_group" "elb" {
  name = "example-elb”
  ingress {
    from_port = 80
    to_port = 80
    protocol = "tcp”
    cidr_blocks = [" 0.0.0.0/ 0”]
  }
  egress {
    from_port = 0
    to_port = 0
    protocol = "-1"
    cidr_blocks = [" 0.0.0.0/ 0"] }
}

It's in the documentation : 文档中

The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). IP协议名称(tcp,udp,icmp)或编号(请参阅协议编号)。 (VPC only) Use -1 to specify all protocols. (仅VPC)使用-1指定所有协议。 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. 如果指定-1或tcp,udp,icmp或58(ICMPv6)以外的协议号,则无论指定哪个端口,都允许所有端口上的通信。 For tcp, udp, and icmp, you must specify a port range. 对于tcp,udp和icmp,必须指定端口范围。 For protocol 58 (ICMPv6), you can optionally specify a port range; 对于协议58(ICMPv6),可以选择指定端口范围。 if you don't, traffic for all types and codes is allowed. 如果不这样做,则允许所有类型和代码的流量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS 和 Terraform - 安全组中的默认出口规则 - AWS and Terraform - Default egress rule in security group AWS Workspace 安全组出口要求 - AWS Workspace Security Group Egress Requirments 什么角色允许 EC2 用户运行 aws ec2 authorize-security-group-egress - What role allows an EC2 user to run aws ec2 authorize-security-group-egress 出站流量对分配给AWS RDS实例的AWS安全组意味着什么? - What does Outbound traffic mean for an AWS Security Group assigned to an AWS RDS instance? 用于AWS服务的AWS私有子网安全组出口白名单? - AWS private subnet security group egress whitelist for AWS services? “链接” AWS 安全组是什么意思? - What does it mean to "link" AWS security groups? AWS Cloudformation:允许所有出口的安全组规则 - AWS Cloudformation: Security Group Rule to allow all egress AWS Cloudformation 为安全组配置 ICMP 协议 - AWS Cloudformation configure ICMP protocol for the security group 是否可以使用 Cloudformation 删除 aws 安全组默认出口允许所有规则? - Is it possible to delete the aws Security Group Default Egress allow all Rule with Cloudformation? 条件表达式在 aws_security_group 资源出口块 terraform 中不起作用 - Conditional Expression not working in aws_security_group resource egress block terraform
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM