A SysOps administrator is troubleshooting connectivity between an application tier in private subnet and a PostgreSQL database instance () in private subnet . The database instance's security group is already configured to allow inbound TCP traffic on port from the application tier's security group.
VPC Flow Logs are enabled on the network interface of the database instance and record the following entry:
`2 123456789012 eni-0123456789abcdef0 10.0.2.45 10.0.3.89 49152 5432 6 1 40 1620000000 1620000010 REJECT OK`
Which TWO configuration changes are required to resolve this issue and allow successful database connections? (Select TWO.)
- Add an inbound rule to the database subnet's Network ACL that allows TCP traffic on port from source CIDR .Cevap
- Add an outbound rule to the database subnet's Network ACL that allows TCP traffic on ephemeral ports () to destination CIDR .Cevap
- CAdd an outbound rule to the database instance's security group that allows TCP traffic on ephemeral ports () to the application tier's security group.
- DCreate a new IAM role with the `iam:PassRole` permission to allow the database network interface to publish logs to CloudWatch Logs.
- EAdd a route to the database subnet's route table targeting the Internet Gateway for destination CIDR .
Cevap
To resolve the connectivity issue, the database subnet's Network ACL must be configured to allow the inbound traffic on port from the application subnet, and allow the outbound return traffic on the ephemeral port range () to the application subnet.
The VPC Flow Logs entry shows an ingress packet from the application server (, source port ) to the database instance (, destination port ) being rejected. Because the database instance's security group is already configured to allow this inbound traffic, the block is occurring at the database subnet's Network Access Control List (Network ACL). Since Network ACLs are stateless, rules must be configured explicitly for both inbound and outbound traffic. First, an inbound rule must be added to the database subnet's Network ACL to allow TCP traffic on port from the application subnet CIDR (). Second, because the client initiated the connection using an ephemeral port (), an outbound rule must be added to the database subnet's Network ACL to allow the database's response traffic on the ephemeral port range () back to the application subnet.
Adım Adım Çözüm
Anahtar Kavram
Stateless Network ACLs require explicit inbound and outbound rules for traffic flow, including allowing return traffic on ephemeral ports, whereas stateful Security Groups automatically allow return traffic.