A company is deploying a two-tier application in a VPC. The application tier runs on Amazon EC2 instances in a private subnet with CIDR block . The database tier runs on an Amazon RDS for SQL Server DB instance in a separate database subnet with CIDR block . The database instance listens on TCP port . The network architecture requires using a custom Network Access Control List (Network ACL) for the database subnet to restrict traffic. Which combination of Network ACL rules must be applied to the database subnet to allow the application tier to connect to the database?
- An inbound rule that allows TCP traffic on port from , and an outbound rule that allows TCP traffic on ports to .Cevap
- BAn inbound rule that allows TCP traffic on port from , and an outbound rule that allows TCP traffic on port to .
- CAn inbound rule that allows TCP traffic on port from , with no outbound rules required because Network ACLs automatically track connection state.
- DAn inbound rule that allows TCP traffic on port from the Security Group ID of the application tier EC2 instances, and an outbound rule that allows all traffic to .
Cevap
An inbound rule that allows TCP traffic on port from , and an outbound rule that allows TCP traffic on ports to .
Network ACLs are stateless filters that apply to subnets. A database connection requires an inbound rule to allow traffic from the application subnet to the database port (). Because Network ACLs do not track connection states, a corresponding outbound rule must be created to allow the database's responses back to the application subnet. Since clients initiate connections from a random port within their ephemeral port range (), the outbound rule must allow traffic to this destination port range.
Adım Adım Çözüm
Anahtar Kavram
VPC Network ACL Statelessness and Ephemeral Ports
Tahmini Süre:1m 30s