An organization hosts a web application on Amazon EC2 instances in a public subnet. The security team wants to allow web clients to access the instances over HTTP (port 80) and HTTPS (port 443). However, to prevent data exfiltration, the EC2 instances must be restricted from initiating any outbound connections to the internet, while still allowing them to return responses to client requests. Which of the following configurations are required to achieve this goal? (Select TWO.)
- Configure the Security Group associated with the EC2 instances to allow inbound traffic on TCP ports 80 and 443 from any source, and remove the default outbound rule that allows all traffic.Cevap
- Configure the Network Access Control List (Network ACL) of the public subnet to allow inbound traffic on TCP ports 80 and 443 from any source, and add an outbound rule allowing TCP traffic to ephemeral ports 1024-65535.Cevap
- CConfigure the Security Group associated with the EC2 instances to allow inbound traffic on TCP ports 80 and 443, and add an outbound Security Group rule allowing return traffic to ephemeral ports 1024-65535.
- DConfigure the Network Access Control List (Network ACL) of the public subnet to allow inbound traffic on TCP ports 80 and 443 from any source, and remove all outbound rules from the Network ACL.
- EConfigure the Web Application Firewall (AWS WAF) associated with the public subnet to block all outgoing traffic initiating from the EC2 instances while allowing return traffic.
Cevap
Configure the Security Group associated with the EC2 instances to allow inbound traffic on TCP ports 80 and 443 from any source, and remove the default outbound rule that allows all traffic. Additionally, configure the Network Access Control List (Network ACL) of the public subnet to allow inbound traffic on TCP ports 80 and 443 from any source, and add an outbound rule allowing TCP traffic to ephemeral ports 1024-65535.
The correct combination involves understanding the stateful nature of Security Groups and the stateless nature of Network ACLs. The Security Group configuration allows inbound HTTP/HTTPS traffic, which automatically permits outbound responses due to state tracking, while removing outbound rules prevents the instances from initiating outbound connections. The Network ACL configuration requires inbound rules for ports 80/443 and outbound rules for the ephemeral ports (1024-65535) to allow return packets, because Network ACLs do not track connection states.
Adım Adım Çözüm
Anahtar Kavram
Stateful vs. Stateless network filtering in AWS (Security Groups vs. Network ACLs)