A financial services company is hosting a payment processing application on Amazon EC2 instances inside a private subnet. The instances must initiate outbound HTTPS connections (port 443) to an external payment gateway API and receive the responses. The security team requires that network access controls be configured at both the subnet boundary and the instance level. Which two configuration steps must the cloud practitioner take to allow this traffic while maintaining a secure architecture? (Select TWO.)
- Add an outbound rule to the Security Group allowing TCP port 443 traffic to the destination IP range.Cevap
- Add an outbound rule to the Network ACL allowing TCP port 443 traffic, and an inbound rule allowing TCP traffic on ephemeral ports 1024-65535 from the destination IP range.Cevap
- CAdd an inbound rule to the Security Group on TCP port 443 to allow return traffic, because Security Groups are stateless.
- DAdd only an outbound rule to the Network ACL allowing TCP port 443 traffic, since Network ACLs are stateful and automatically permit return traffic.
- EEnable Amazon Inspector on the private subnet to dynamically adjust Network ACL rules to permit return traffic from the external API.
Cevap
Configure the Security Group with an outbound rule allowing TCP port 443 to the destination IP range, and configure the Network ACL with both an outbound rule for TCP port 443 and an inbound rule allowing response traffic on ephemeral ports (1024-65535).
Security Groups operate at the instance level and are stateful. This means that if an outbound rule is created to allow traffic to a destination (such as TCP port 443 to the payment gateway), the return traffic is automatically allowed back in without requiring a corresponding inbound rule. Network Access Control Lists (Network ACLs) operate at the subnet boundary and are stateless. This means that rules must be explicitly created for both outbound and inbound traffic. For outbound connections initiated by the EC2 instances, the outbound rule must allow TCP port 443 to the destination, and the inbound rule must allow the response traffic coming back on ephemeral ports (typically 1024-65535) from the destination.
Adım Adım Çözüm
Anahtar Kavram
The difference between stateful Security Groups (instance-level) and stateless Network ACLs (subnet-level) in managing outbound traffic and its inbound responses.