gpt4 book ai didi

amazon-web-services - AWS 安全组导出上的协议(protocol) -1 是什么意思?

转载 作者:行者123 更新时间:2023-12-04 16:30:40 26 4
gpt4 key购买 nike

我明白了egress AWS 安全组上的属性控制出站流量,但有人知道 -1 的协议(protocol)是什么意思吗?

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"] }
}

最佳答案

它在 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.

关于amazon-web-services - AWS 安全组导出上的协议(protocol) -1 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45519815/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com