02Chapter 2: Where security groups apply: network interfaces and VPCsThis chapter assumes you know TCP/IP basics (IP addresses, CIDR, ports), have launched EC2 instances, and understand what a VPC and a subnet are. You should also be able to run AWS CLI commands.3 min read
03Chapter 3: Reading and writing a ruleThis chapter assumes you know CIDR notation, TCP and UDP ports, and how to run AWS CLI commands. It also assumes you know what a security group is and that it attaches to network interfaces. Here you will learn to read each field of a rule and write rules from the CLI.2 min read
04Chapter 4: Allow-only rules and implicit denyThis chapter assumes you know TCP/IP basics (CIDR notation, ports, protocols), can launch EC2 instances, understand VPCs and subnets, and can run AWS CLI commands. It covers how a security group decides what to block, and the mistakes that follow from that model.3 min read
05Chapter 5: Stateful filtering and return trafficThis chapter assumes you know TCP/IP basics (IP addresses, CIDR notation, ports), have launched EC2 instances, and understand what a VPC and a subnet are. It builds on the earlier chapters on rule anatomy and allow-only rules.3 min read
06Chapter 6: How rules combine: no ordering, multiple groups add upThis chapter assumes you know CIDR notation, ports and protocols, and that a security group is attached to an EC2 instance's network interface. It covers how AWS decides whether traffic is allowed when a network interface has many rules, or many security groups.3 min read
07Chapter 7: Choosing a source: CIDR blocks, prefix lists and groupsThis chapter assumes you know CIDR notation, how a security group rule is built (direction, protocol, port range, source or destination), and that security group rules only allow traffic. Each inbound rule needs a source. Each outbound rule needs a destination. This chapter covers the three kinds of2 min read
08Chapter 8: Referencing one security group from anotherThis chapter assumes you know CIDR notation, ports, and how to attach a security group to an EC2 instance. It also assumes you have read the earlier chapters on rule anatomy and stateful filtering.3 min read
09Chapter 9: The default security group and its defaultsThis chapter assumes you know how allow-only, stateful rules work and how a rule can name another security group as its source. It builds on those ideas to explain the group that AWS creates for you in every VPC.3 min read
10Chapter 10: Designing web, application and database tiersThis chapter assumes you know CIDR notation, ports, EC2 instances, and how a VPC and its subnets fit together. It also assumes you have read the earlier chapters on allow-only rules, stateful filtering and security group references.3 min read
11Chapter 11: Least privilege and safer administrative accessThis chapter assumes you know how to read a security group rule (protocol, port, source), that rules only allow traffic, and that groups can reference other groups. Here you apply those ideas to keep access narrow, especially for administration.2 min read
12Chapter 12: Managing rules with the AWS CLI and TerraformThis chapter assumes you know CIDR notation, ports, and what a security group is and attaches to. You also need a working AWS CLI and a VPC to try the commands in. Here you will create, inspect, and remove rules from the command line, then declare the same rules in Terraform.2 min read
13Chapter 13: Security groups versus network ACLsThis chapter assumes you know CIDR notation, ports, and the basics of VPC subnets, and that you have read the earlier chapters on stateful, allow-only security group rules. Security groups are one of two firewall controls in a VPC. The other is the network access control list (network ACL, or NACL).3 min read
14Chapter 14: Troubleshooting blocked connectionsThis chapter assumes you know TCP/IP basics, CIDR notation, and how a VPC, subnets and EC2 instances fit together. You should also know that security group rules are allow-only and stateful, and that several groups on one interface add up.2 min read
15Chapter 15: Quotas and keeping rule sets manageableThis chapter assumes you can read a security group rule, know that rules from multiple groups add up, and have used the AWS CLI. Security groups have quotas. A rule set that grows by one-off additions will eventually hit them, and it will also become hard to audit well before that.3 min read