A financial company separates its auditing workloads in Subnet A () and production workloads in Subnet B () within the same VPC. Security regulations dictate that auditing instances in Subnet A must be allowed to initiate SSH connections (port 22) to production workloads in Subnet B. However, production workloads must be prevented from initiating any connection back to the auditing workloads. To provide defense-in-depth, the network architect must configure Network Access Control Lists (Network ACLs) on both subnets to permit only this specific traffic flow and its return packets. Which configuration of Network ACL rules for Subnet A and Subnet B will correctly allow the auditing traffic while following the principle of least privilege?
- ASubnet A: Outbound rule allowing TCP port 22 to with no inbound rules. Subnet B: Inbound rule allowing TCP port 22 from with no outbound rules.
- BSubnet A: Outbound rule allowing TCP port 22 to , and Inbound rule allowing TCP port 22 from . Subnet B: Inbound rule allowing TCP port 22 from , and Outbound rule allowing TCP port 22 to .
- Subnet A: Outbound rule allowing TCP port 22 to , and Inbound rule allowing TCP ports 1024-65535 from . Subnet B: Inbound rule allowing TCP port 22 from , and Outbound rule allowing TCP ports 1024-65535 to .Cevap
- DSubnet A: Inbound rule allowing TCP port 22 from , and Outbound rule allowing TCP ports 1024-65535 to . Subnet B: Outbound rule allowing TCP port 22 to , and Inbound rule allowing TCP ports 1024-65535 from .
Cevap
Subnet A: Outbound rule allowing TCP port 22 to , and Inbound rule allowing TCP ports 1024-65535 from . Subnet B: Inbound rule allowing TCP port 22 from , and Outbound rule allowing TCP ports 1024-65535 to .
Network ACLs are stateless network-filtering boundaries. When an EC2 instance in Subnet A initiates an SSH connection to an EC2 instance in Subnet B, the outgoing request leaves Subnet A on port 22 and reaches Subnet B on port 22. Thus, Subnet A needs an outbound rule for port 22, and Subnet B needs an inbound rule for port 22. The return packets from Subnet B are sent from port 22 back to the ephemeral port range (1024-65535) allocated by the client in Subnet A. Because Network ACLs do not automatically track session state, Subnet B must have an outbound rule to allow traffic to the ephemeral ports of Subnet A, and Subnet A must have an inbound rule to allow traffic on the ephemeral ports from Subnet B.
Adım Adım Çözüm
Anahtar Kavram
VPC Network Security and Stateless Network ACL Rules