Lab VPC Overview
Our lab uses a specifically provisioned VPC—not the default one—with the CIDR block 10.0.0.0/16. This means the first two octets (10.0) define the network portion, while the rest designate hosts. Below is an image of the AWS VPC dashboard displaying essential details like VPC ID, state, and IP address ranges:
- IPv4 addressing per the defined CIDR block.
- Optional IPv6 addressing with a dedicated pool.
- Features such as DNS hostnames, default shared tenancy, and DHCP configurations.
- A primary route table and an associated access control list (ACL) for security management.
Network ACLs in the VPC
Within the lab VPC, a Network ACL is linked with eight subnets. Acting as a rule-based firewall at the subnet level, these ACLs process rules sequentially from highest to lowest priority. By default, the inbound rules permit all IPv4 and IPv6 traffic using explicit allow rules that conclude with a deny rule.



Remember, Network ACLs are stateless, so rules must be defined separately for inbound and outbound traffic.
Security Groups: The Stateful Firewall for EC2 Instances
Security Groups serve as stateful firewalls for EC2 instances and other AWS resources. They automatically track connection states, meaning that once an inbound request is allowed, the corresponding outbound response is automatically permitted. Consider these aspects of security groups:- By default, all traffic is denied unless explicitly allowed.
- A security group might, for example, allow inbound HTTP requests while enabling outbound HTTP and HTTPS traffic.
- Even if an outbound rule is removed, statefulness ensures that legitimate inbound connections can still receive a response.

- Network ACLs: Stateless and applied to subnets.
- Security Groups: Stateful and applied to individual network interfaces.
Summary
This lesson provided an overview of the interaction between VPCs, subnets, and their security configurations:- VPCs form the backbone of your network infrastructure.
- Network ACLs are stateless firewalls that require explicit inbound and outbound rules at the subnet level.
- Security Groups are stateful firewalls that simplify traffic management on individual resources.