A solutions architect is configuring network security for a database migration. An application running on Amazon EC2 instances in Subnet A () must connect to an Amazon RDS for PostgreSQL database located in Subnet B () within the same VPC. The company's security policy requires the use of Network Access Control Lists (Network ACLs) with a strict default-deny rule for both inbound and outbound traffic on all subnets. Which of the following Network ACL configurations will allow the application to connect to the database on the default PostgreSQL port while maintaining least privilege?
- Configure the Network ACL for Subnet A to allow outbound traffic to Subnet B () on TCP port 5432 and inbound traffic from Subnet B () on TCP ports 1024–65535. Configure the Network ACL for Subnet B to allow inbound traffic from Subnet A () on TCP port 5432 and outbound traffic to Subnet A () on TCP ports 1024–65535.Cevap
- BConfigure the Network ACL for Subnet A to allow outbound traffic to Subnet B () on TCP port 5432. Configure the Network ACL for Subnet B to allow inbound traffic from Subnet A () on TCP port 5432.
- CConfigure the Network ACL for Subnet A to allow outbound traffic to Subnet B () on TCP port 5432 and inbound traffic from Subnet B () on TCP port 5432. Configure the Network ACL for Subnet B to allow inbound traffic from Subnet A () on TCP port 5432 and outbound traffic to Subnet A () on TCP port 5432.
- DConfigure the Network ACL for Subnet A to allow outbound traffic to the security group of the database on TCP port 5432. Configure the Network ACL for Subnet B to allow inbound traffic from the security group of the EC2 instances on TCP port 5432.
Cevap
Configure the Network ACL for Subnet A to allow outbound traffic to Subnet B on TCP port 5432 and inbound traffic from Subnet B on TCP ports 1024–65535, and configure the Network ACL for Subnet B to allow inbound traffic from Subnet A on TCP port 5432 and outbound traffic to Subnet A on TCP ports 1024–65535.
The correct configuration acknowledges that Network ACLs are stateless and require rules for both inbound and outbound traffic. Because a client initiates a connection to the PostgreSQL database on TCP port 5432 using an ephemeral source port, the network path must allow outbound traffic on destination port 5432 from the client subnet and inbound traffic on the same port at the database subnet. To allow the response, the database subnet must allow outbound traffic to the ephemeral port range (–) and the client subnet must allow inbound traffic on those same ports.
Adım Adım Çözüm
Anahtar Kavram
Statelessness of Network Access Control Lists (NACLs) and the requirement of ephemeral port ranges for return traffic.