Network ACL Configuration Examples
This section shows common network ACL configuration examples.
Denying Access from a Specific Port
You might want to block TCP 445 to protect against the WannaCry ransomware attacks. You can add a network ACL rule to deny all incoming traffic from TCP port 445.
Network ACL configuration
Allowing Access from Specific Ports and Protocols
In this example, an edge instance in a subnet is used as the web server, and you need to allow inbound traffic from HTTP port 80 and HTTPS port 443 and allow all outbound traffic regardless of the port. You need to configure both the network ACL rules and security group rules to allow the traffic.
Network ACL configuration
Table 2 lists the inbound and outbound network ACL rules required.
| Direction | Action | Protocol | Source | Source Port Range | Destination | Destination Port | Description |
|---|---|---|---|---|---|---|---|
| Inbound | Allow | TCP | 0.0.0.0/0 | 1-65535 | 0.0.0.0/0 | 80 | Allows inbound HTTP traffic from any IP address to the edge instance in the subnet through port 80. |
| Inbound | Allow | TCP | 0.0.0.0/0 | 1-65535 | 0.0.0.0/0 | 443 | Allows inbound HTTPS traffic from any IP address to the edge instance in the subnet through port 443. |
| Outbound | Allow | All | 0.0.0.0/0 | All | 0.0.0.0/0 | All | Allow all outbound traffic from the subnet. |
Security group configuration
Table 3 lists the inbound and outbound security group rules required.
| Direction | Protocol/Application | Port | Source/Destination | Description |
|---|---|---|---|---|
| Inbound | TCP | 80 | Source: 0.0.0.0/0 | Allows inbound HTTP traffic from any IP address to edge instances in the security group through port 80. |
| Inbound | TCP | 443 | Source: 0.0.0.0/0 | Allows inbound HTTPS traffic from any IP address to edge instances in the security group through port 443. |
| Outbound | All | All | Destination: 0.0.0.0/0 | Allow all outbound traffic from the security group. |
A network ACL adds an additional layer of security. Even if the security group rules allow more traffic than that actually required, the network ACL rules allow only access from HTTP port 80 and HTTPS port 443 and deny other inbound traffic.
Last Article: Importing or Exporting Network ACL Rules
Next Article: Associating a Network ACL with Subnets
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.