AWS 账户带宽使用率越来越高
AWS Account Bandwidth ussage getting high
我在 terraform 中使用以下安全组创建了 t2.micro 实例。
允许 80 端口
resource "aws_security_group" "access-http" {
name = "Allow-80"
description = "Allow 80 inbound traffic"
ingress {
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
}
允许 8080 端口
resource "aws_security_group" "access-http-web" {
name = ""
description = "Allow 8080 inbound traffic"
ingress {
from_port = 8080
to_port = 8080
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
}
允许 22 端口
resource "aws_security_group" "access-ssh" {
name = "Access-ssh"
ingress {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 1194
to_port = 1194
protocol = "udp"
cidr_blocks = ["0.0.0.0/0"]
}
}
如果此安全组出现任何安全问题。我使用了 Network(VPC) 并且 Subnet 选项是默认选择的一个。请多多指教。
如果这是我,我会终止实例并创建一个新实例。当您创建 "Allow 22 Port" 安全组时,您应该确保源地址是您当前的 IP 地址。如果您的 public (home/office) IP 地址是动态的,那么您需要在每次连接时检查并通过控制台在安全组中更新它是否已更改。
我在 terraform 中使用以下安全组创建了 t2.micro 实例。
允许 80 端口
resource "aws_security_group" "access-http" {
name = "Allow-80"
description = "Allow 80 inbound traffic"
ingress {
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
}
允许 8080 端口
resource "aws_security_group" "access-http-web" {
name = ""
description = "Allow 8080 inbound traffic"
ingress {
from_port = 8080
to_port = 8080
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
}
允许 22 端口
resource "aws_security_group" "access-ssh" {
name = "Access-ssh"
ingress {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 1194
to_port = 1194
protocol = "udp"
cidr_blocks = ["0.0.0.0/0"]
}
}
如果此安全组出现任何安全问题。我使用了 Network(VPC) 并且 Subnet 选项是默认选择的一个。请多多指教。
如果这是我,我会终止实例并创建一个新实例。当您创建 "Allow 22 Port" 安全组时,您应该确保源地址是您当前的 IP 地址。如果您的 public (home/office) IP 地址是动态的,那么您需要在每次连接时检查并通过控制台在安全组中更新它是否已更改。