What Are the Differences Between Security Groups and Network ACLs?
Table 1 lists the differences between security groups and network access control lists (ACLs).
| Category | Security Group | Network ACL |
|---|---|---|
| Targets | Operates at the instance level | Operates at the subnet level |
| Rules | Supports only Allow rules. | Supports both Allow and Deny rules. |
| Priority | If security group rules conflict, the overlapping elements of these rules take effect. | If network ACL rules conflict, the rule with the highest priority takes effect. |
| Usage | Automatically applies to instances in the security group that is selected during instance creation. You must select a security group when creating instances. | Applies to all instances in the subnets associated with the network ACL. Selecting a network ACL is not allowed during subnet creation. You must create a network ACL, associate subnets with it, add inbound and outbound network rules, and enable network ACL. The network ACL then takes effect for the associated subnets and instances in the subnets. |
| Packets | Only packet filtering based on the 3-tuple (protocol, port, and peer IP address) is supported. | Only packet filtering based on the 5-tuple (protocol, source port, destination port, source IP address, and destination IP address) is supported. |
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.