A company is hosting a virtual classroom platform with video processing workloads on Amazon EC2 instances inside a private subnet. The security team wants to implement a multi-layered security approach: they need to block a specific range of malicious external IP addresses at the subnet boundary, and they must allow administrative SSH traffic to the instances from a designated bastion host while ensuring that the return traffic is automatically permitted. Which TWO of the following configurations should the team implement?
- Add an inbound deny rule for the malicious IP range to the Network Access Control List (Network ACL) associated with the subnetAnswer
- Add an inbound allow rule for SSH from the bastion host IP address to the Security Group associated with the EC2 instancesAnswer
- CAdd an inbound deny rule for the malicious IP range to the Security Group associated with the EC2 instances
- DAdd an outbound allow rule for SSH return traffic to the Security Group associated with the EC2 instances
- ESubmit an AWS Support ticket requesting that the physical network infrastructure switches block the malicious IP range
Answer
Configure an inbound deny rule for the malicious IP range in the Network Access Control List (Network ACL) associated with the subnet, and configure an inbound allow rule for SSH from the bastion host in the Security Group associated with the EC2 instances.
The correct configurations involve using a Network ACL at the subnet boundary to explicitly deny the malicious IP range, and using a stateful Security Group at the instance level to allow inbound SSH from the bastion host. Since Network ACLs support deny rules and operate at the subnet level, they block the traffic before it reaches the instances. Since Security Groups are stateful, return traffic is automatically allowed, making outbound configurations for this stream unnecessary.
Step-by-Step Solution
Key Concept
Security Groups are stateful firewalls operating at the instance level (allowing only allow rules), whereas Network ACLs are stateless firewalls operating at the subnet level (supporting both allow and deny rules). Under the Shared Responsibility Model, configuration of these firewalls is the customer's responsibility.