A SysOps Administrator is investigating a connection timeout issue between an application server in subnet A () and a database server in subnet B (). Both subnets are within the same VPC. Security groups have been verified as correct. The administrator reviews the following VPC Flow Log records for the network interface of the database server:
2 123456789012 eni-0123456789abcdef0 10.0.1.50 10.0.2.10 49152 3306 6 20 1040 1620123456 1620123516 ACCEPT OK
2 123456789012 eni-0123456789abcdef0 10.0.2.10 10.0.1.50 3306 49152 6 20 1040 1620123456 1620123516 REJECT OK
Which of the following actions must the administrator perform to resolve this connection issue? (Select TWO.)
- Add an outbound rule to the database subnet's Network ACL (NACL) to allow outbound TCP traffic on ports to the application subnet CIDR block ().Answer
- Add an inbound rule to the application subnet's Network ACL (NACL) to allow inbound TCP traffic on ports from the database subnet CIDR block ().Answer
- CAdd an outbound rule to the database server's Security Group to allow outbound TCP traffic on ports to the application server ().
- DConfigure an IAM role with the `sts:AssumeRole` action for the VPC Flow Logs service and attach it to the database EC2 instance.
- EAdd a route to the database subnet's route table that targets the Internet Gateway (IGW) for the destination .
Answer
To resolve the connection issue, the administrator must add an outbound rule to the database subnet's Network ACL (NACL) allowing outbound TCP traffic on ports to the application subnet, and add an inbound rule to the application subnet's Network ACL (NACL) allowing inbound TCP traffic on ports from the database subnet.
The VPC Flow Logs reveal that inbound traffic from the application server (source IP on source port ) to the database server (destination IP on database port ) is accepted. However, the outbound response from the database server (source IP on source port ) back to the application server (destination IP on destination port ) is rejected. Since Security Groups are stateful, any accepted inbound request will automatically allow the outbound response. The rejection must therefore be occurring at a stateless boundary, which is the Network ACL (NACL). To fix this, an outbound rule must be added to the database subnet's NACL to allow traffic to the ephemeral ports () of the application subnet. Additionally, since NACLs are stateless at both boundaries, the application subnet's NACL must also contain an inbound rule allowing the response traffic on the ephemeral port range from the database subnet.
Step-by-Step Solution
Key Concept
Stateless network access control list (NACL) evaluation versus stateful security group evaluation in Amazon VPC, and interpreting custom flow logs.
Estimated Time:3m 0s