A company is hosting a secure web application on Amazon EC2 instances located in a public subnet. To implement a defense-in-depth strategy, the network team uses both Security Groups and Network Access Control Lists (Network ACLs). External clients must be allowed to access the application over HTTPS (port 443), while all other inbound traffic must be blocked. Which two configurations are required to allow this traffic to flow successfully to and from the instances?
- Add an inbound rule to the instance's Security Group that allows TCP traffic on port 443 from 0.0.0.0/0.Cevap
- Add an outbound rule to the subnet's Network ACL that allows TCP traffic on ephemeral ports (1024–65535) to 0.0.0.0/0.Cevap
- CAdd an outbound rule to the instance's Security Group that allows TCP traffic on ephemeral ports (1024–65535) to 0.0.0.0/0.
- DAdd an inbound rule to the subnet's Network ACL that allows TCP traffic on port 443, and rely on its stateful nature to automatically permit the return traffic.
- EAssociate the Network ACL directly with the EC2 instances, while applying the Security Group to the public subnet.
Cevap
Add an inbound rule to the instance's Security Group that allows TCP traffic on port 443 from 0.0.0.0/0, and add an outbound rule to the subnet's Network ACL that allows TCP traffic on ephemeral ports (1024–65535) to 0.0.0.0/0.
To allow external HTTPS traffic to reach the EC2 instances and return successfully, two levels of evaluation must be satisfied. First, at the instance level, the stateful Security Group must permit inbound traffic on TCP port 443. Because it is stateful, the return traffic is automatically allowed. Second, at the subnet level, the stateless Network ACL must permit both the inbound request on TCP port 443 and the outbound response. Since the client establishes the connection, the response traffic travels back to the client's ephemeral port range (typically 1024–65535), which must be explicitly permitted by an outbound rule in the Network ACL.
Adım Adım Çözüm
Anahtar Kavram
The difference between stateful Security Groups (operating at the instance level) and stateless Network ACLs (operating at the subnet level).
Tahmini Süre:2m 0s