Soru

Zorluk: KolayVPC Network Security

An application developer has deployed a web server on an Amazon EC2 instance inside a public subnet. To control traffic, the developer associates a custom Network Access Control List (NACL) with the subnet. The developer adds an inbound rule allowing TCP traffic on port 80 from any IP address to reach the web server. However, external web clients are unable to load the webpage hosted on the server.

Which configuration change is necessary to allow the web clients to successfully establish a connection?

  1. A
    Verify that the Network Access Control List has a corresponding outbound rule for port 80, as the Network Access Control List will automatically handle the return traffic dynamically.
  2. B
    Configure the outbound rules of the associated Security Group to allow traffic to ephemeral ports, as Security Groups are stateless by default.
  3. Add an outbound rule to the Network Access Control List that allows TCP traffic to ephemeral ports (1024-65535).Cevap
  4. D
    Deploy AWS WAF to bypass the Network Access Control List rules and handle the outbound session tracking.

Cevap

Add an outbound rule to the Network Access Control List that allows TCP traffic to ephemeral ports (1024-65535)
Network Access Control Lists are stateless, meaning that outbound response traffic must be explicitly allowed even if the inbound request was permitted. When a client initiates a connection to a web server (port 80), the server sends the response back to a random port in the client's ephemeral port range (typically 1024-65535). Therefore, an outbound rule allowing traffic to these ephemeral ports is required.

Adım Adım Çözüm

1
Identify the firewall layer causing the block.
The block is happening at the subnet level because of the custom Network Access Control List, which defaults to denying outbound traffic.
We need to determine why traffic is blocked despite the inbound rules being correct.
2
Analyze the statefulness behavior of the firewall layers.
Security Groups are stateful and automatically allow response traffic, whereas Network Access Control Lists are stateless and require explicit outbound rules for response traffic.
This helps determine whether the configuration needs to happen at the Security Group or Network Access Control List layer.
3
Determine the destination ports for the outbound return traffic.
Web clients connect using ephemeral ports (1024-65535), so the return traffic from the web server (originating from port 80) is destined for these ephemeral ports.
This ensures the outbound Network Access Control List rule is configured with the correct port range.

Anahtar Kavram

Network Access Control Lists are stateless firewalls at the subnet level, meaning that return traffic must be explicitly allowed via outbound rules, typically targeting the client's ephemeral port range.
Bu soruyu puanla