liveBook · Manning

Access control list

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

A network ACL is an ordered subnet-level rule set that allows or denies network traffic entering or leaving a virtual network subnet.

An AWS network access control list (NACL) is an ordered, subnet-level rule set that allows or denies traffic entering or leaving a VPC subnet. Attach it to a subnet to control traffic between network layers, such as a public proxy subnet and a private backend subnet. section 1.2.2 section 5.5.3

Configure NACL rules with these operating principles:

  • Treat NACLs as stateless: permitting inbound HTTP on port 80 does not automatically permit the response, so allow the relevant ephemeral ports from 1024 through 65535. section 5.5.2
  • Assign rule priorities because a smaller rule number has higher priority; evaluation applies the first matching rule and skips the rest. section 5.5.2
  • Remember that routing and filtering are separate: a private subnet without a route to an internet gateway cannot reach the internet, even when its NACL permits traffic. section 5.5.3
  • Use NACLs alongside security groups, NAT, firewall rules, and route tables rather than treating them as replacements for the whole network design. section 1.2.2 section 5.1

Proxy and backend subnets

For a public proxy subnet, allow inbound HTTP from 0.0.0.0/0 and outbound ephemeral ports. For a backend subnet, allow inbound HTTP from 10.0.1.0/24 and outbound ephemeral ports to that proxy subnet. This limits backend access to the proxy layer while preserving the required request and response paths. section 5.5.2 section 5.5.3

NetworkAclEntryInPublicProxyHTTP:                #1
  Type: 'AWS::EC2::NetworkAclEntry'
  Properties:
    NetworkAclId: !Ref NetworkAclPublicProxy
    RuleNumber: '110'                            #2
    Protocol: '6'
    PortRange:
      From: '80'
      To: '80'
    RuleAction: 'allow'
    Egress: 'false'                              #3
    CidrBlock: '0.0.0.0/0'
NetworkAclEntryInPublicProxyEphemeralPorts:      #4
  Type: 'AWS::EC2::NetworkAclEntry'
  Properties:
    NetworkAclId: !Ref NetworkAclPublicProxy
    RuleNumber: '200'
    Protocol: '6'
    PortRange:
      From: '1024'
      To: '65535'
    RuleAction: 'allow'
    Egress: 'false'
    CidrBlock: '0.0.0.0/0'
NetworkAclEntryOutPublicProxyHTTP:               #5
  Type: 'AWS::EC2::NetworkAclEntry'
  Properties:
    NetworkAclId: !Ref NetworkAclPublicProxy
    RuleNumber: '100'
    Protocol: '6'
    PortRange:
      From: '80'
      To: '80'
    RuleAction: 'allow'
    Egress: 'true'                               #6
    CidrBlock: '0.0.0.0/0'
NetworkAclEntryOutPublicProxyHTTPS:              #7
  Type: 'AWS::EC2::NetworkAclEntry'
  Properties:
    NetworkAclId: !Ref NetworkAclPublicProxy
    RuleNumber: '110'
    Protocol: '6'
    PortRange:
      From: '443'
      To: '443'
    RuleAction: 'allow'
    Egress: 'true'
    CidrBlock: '0.0.0.0/0'
NetworkAclEntryOutPublicProxyEphemeralPorts:     #8
  Type: 'AWS::EC2::NetworkAclEntry'
  Properties:
    NetworkAclId: !Ref NetworkAclPublicProxy
    RuleNumber: '200'
    Protocol: '6'
    PortRange:
      From: '1024'
      To: '65535'
    RuleAction: 'allow'
    Egress: 'true'
    CidrBlock: '0.0.0.0/0'

Inspect the CloudFormation entries that encode rule numbers, protocols, port ranges, direction, actions, and CIDR blocks for a public proxy NACL. section 5.5.2

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Explains attachment, directional rules, priorities, stateless responses, ephemeral ports, and routing limitations through web-application network examples.
Examples
Uses public proxy and private backend subnets, HTTP port 80, ephemeral ports 1024–65535, CIDR ranges, and CloudFormation templates.
What it assumes
Assumes basic VPC and subnet concepts, while illustrating routing, security boundaries, and NACL configuration through concrete AWS architectures.
What you can do after
Configure subnet traffic filtering with AWS CloudFormation and diagnose missing return-path or routing permissions in a web application.
How it connects
Connects NACLs with VPCs, subnets, route tables, internet gateways, NAT, security groups, firewalls, and VPNs.

Also explained in

Compare how 8 books explain access control list →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.