ladderlore
Request a guide
  • Type a service name, like S3 or IAM.

Concept · Builds on CLF-C02

Security groups and network ACLs in layers

Chain security groups tier to tier, keep network ACLs for broad blocks, and know the ports and rules.

You know from Cloud Practitioner

  • A security group is stateful, at the instance, and has allow rules only.
  • A network ACL is stateless, at the subnet, and has allow and deny rules.
  • VPC Flow Logs record accepted and rejected traffic.
Read the Cloud Practitioner lesson
VPC
Internet
Load BalancingEC2RDS44380803306
Each tier allows only the tier in front of it.
  • App tier only from the web tier

    Security group that references the web group
  • Block one abusive IP range

    Network ACL deny rule
  • Reply traffic after an allowed request

    Security group: automatic. Network ACL: add ephemeral ports
  • Find which rule blocks a path

    Reachability Analyzer
Which control fits which need.

What it is

In a three-tier design, each security group names the tier in front of it as its source, not an IP range. The web group allows HTTPS from the internet. The app group allows its port from the web group. The database group allows its port from the app group. When instances scale or change IPs, the rules still work.

What it is

Network ACL rules have numbers. AWS reads them from the lowest number up and stops at the first match. Because a network ACL is stateless, return traffic needs its own rule, usually for ephemeral ports 1024 to 65535. The default network ACL allows all traffic. A new custom one denies all until you add rules. The default security group allows traffic between its members and all outbound traffic.

VPC Reachability Analyzer checks the path between two resources by reading the configuration. It sends no packets and points to the component that blocks the path.

Remember

  • Reference a security group as a source instead of a CIDR range.
  • Network ACL rules: lowest number first, first match wins.
  • Network ACL return traffic needs ephemeral ports 1024 to 65535 allowed.
  • Block one abusive IP with a network ACL deny. Security groups cannot deny.

Remember

  • Ports: HTTPS 443, SSH 22, RDP 3389, MySQL 3306, PostgreSQL 5432, SQL Server 1433.
  • Reachability Analyzer finds the blocking rule without sending traffic.

On the exam

  • “Allow the database only from the application servers, even as they scale” points to a security group that references the application security group.
  • “Block a known malicious IP address range at the subnet” points to a network ACL deny rule.
  • “Find why instance A cannot reach instance B” points to VPC Reachability Analyzer.