A financial services firm runs compliance monitoring agents on Amazon EC2 instances within a dedicated subnet. These agents must establish outbound connections to an external regulatory API on port to upload audit logs. The security team implements a strict Network Access Control List (Network ACL) for the subnet, adding an outbound rule that permits traffic to the API's IP range on TCP port . No inbound rules are added to the Network ACL. The associated Security Groups are left at their default settings (allowing all outbound traffic and no inbound traffic). During testing, the agents fail to establish a connection with the API.
Which modification is required to allow this communication while maintaining the principle of least privilege?
- Add an inbound rule to the Network ACL that permits traffic from the API's IP range on TCP ports -.Cevap
- BAdd an inbound rule to the Security Group that permits traffic from the API's IP range on TCP port .
- CAdd an inbound rule to the Network ACL that permits traffic from the API's IP range on TCP port .
- DSubmit a request to AWS Support to open the ports at the physical virtualization layer under the Shared Responsibility Model.
Cevap
Add an inbound rule to the Network ACL that permits traffic from the API's IP range on TCP ports -.
Since Network ACLs are stateless, they require explicit rules for both outbound request traffic and inbound response traffic. When the EC2 instances initiate connections to the external API on port , the return traffic is sent to ephemeral ports (-) on the EC2 instances. Therefore, an inbound Network ACL rule must be added to allow traffic from the API's IP address range on ports -. Default Security Groups are stateful, meaning they track connection state and automatically allow the return traffic at the instance level without requiring any inbound Security Group rule changes.
Adım Adım Çözüm
Anahtar Kavram
Stateful vs. Stateless Firewalls (Security Groups vs. Network ACLs) and Ephemeral Ports
Tahmini Süre:2m 0s