A company has an application running on Amazon EC2 instances in a private subnet. The application must communicate with an external third-party service over HTTPS (port 443). The network security team requires that no traffic is allowed to exit or enter the VPC except what is strictly required for this application to communicate with the external service's public IP range (). The subnets use a custom Network ACL (NACL) and the EC2 instances use a custom Security Group.
Which configuration of Security Groups and Network ACLs will securely allow this communication while maintaining the principle of least privilege?
- Configure the Security Group with an outbound rule allowing HTTPS (port 443) to , and no inbound rules. Configure the Network ACL with an outbound rule allowing HTTPS (port 443) to , and an inbound rule allowing TCP traffic on ephemeral ports () from .Cevap
- BConfigure the Security Group with an outbound rule allowing HTTPS (port 443) to , and an inbound rule allowing TCP traffic on ephemeral ports () from . Configure the Network ACL with an outbound rule allowing HTTPS (port 443) to , and no inbound rules.
- CConfigure the Security Group with an outbound rule allowing HTTPS (port 443) to , and no inbound rules. Configure the Network ACL with an outbound rule allowing HTTPS (port 443) to , and an inbound rule allowing HTTPS (port 443) from .
- DConfigure the Security Group with an outbound rule allowing HTTPS (port 443) to , and no inbound rules. Configure the Network ACL with an outbound rule allowing all traffic () and configure AWS WAF on the subnet to restrict outbound traffic destinations to .
Cevap
Configure the Security Group with an outbound rule allowing HTTPS (port 443) to the destination IP range, and configure the Network ACL with an outbound rule allowing HTTPS (port 443) to the destination IP range and an inbound rule allowing TCP traffic on ephemeral ports from the destination IP range.
The correct option correctly applies the stateful nature of Security Groups and the stateless nature of Network ACLs. Security Groups only require an outbound rule for port 443 because they are stateful and automatically track and allow the return traffic. Network ACLs, being stateless, require rules in both directions: an outbound rule to allow traffic to the service on port 443, and an inbound rule to allow the return traffic from the service back to the client's ephemeral ports ().
Adım Adım Çözüm
Anahtar Kavram
Stateful vs. Stateless Filtering in VPC Network Security
Tahmini Süre:1m 30s