Network ACLs

Network ACLs in Amazon VPC

ℹ️ Definition and Basic Characteristics

  • A Network ACL is an additional layer of security for a VPC, operating at the subnet level
  • It acts as a stateless firewall that controls traffic entering and leaving a subnet
  • Every VPC has a default Network ACL that allows all IPv4/IPv6 traffic
  • You can create a custom Network ACL with your own rules

⚠️ Limits and Requirements

  • Every subnet must be associated with a Network ACL
  • A single Network ACL can be applied to multiple subnets
  • A subnet can only be associated with one Network ACL at a time
  • Up to 32766 rules per Network ACL

🔒 Operating Characteristics

  • It is a stateless service — separate rules must be configured for inbound and outbound traffic
  • Rules are evaluated in order, from the lowest number to the highest
  • Supports both Allow and Deny rules
  • Rule changes are automatically applied to associated subnets

Network ACL Rule Structure

ℹ️ Rule Components

  • Rule Number: Determines the order in which rules are evaluated
  • Type: The traffic type (e.g., SSH, HTTP, Custom)
  • Protocol: The network protocol used
  • Port Range: The allowed port or port range
  • Source/Destination: The traffic source/destination (as a CIDR)
  • Allow/Deny: Whether to allow or block the traffic

💡 Pro Tips

  • Order your rules in a sensible priority sequence
  • Use Deny rules to block unwanted traffic
  • Keep documentation for your custom rules
  • Review rules carefully before applying them to avoid service disruption