You can add inbound and outbound rules to a network ACL to control the traffic in and out of a subnet. Network ACL rules are matched in an ascending order, either by the system-generated rule numbers or those you define.
In Table 1, there are two custom inbound rules (rule A and rule B) and one default rule. The rule A number is 1 and rule B number is 2. The default rule is the last rule that is used for matching traffic. When you add rule C, the rule number will be 3, which will be matched later than rules A and B but earlier than the default rule.
Rule Number (Rules A and B) | Rule Number (Rules A, B, and C) | ||
|---|---|---|---|
Custom rule A | 1 | Custom rule A | 1 |
-- | -- | Custom rule B | 2 |
Custom rule B | 2 | Custom rule C | 3 |
Default rule | * | Default rule | * |
In Table 2, there are two custom inbound rules (rule A and rule B) and one default rule. The rule A number is 1 and rule B number is 2. The default rule is the last rule that is used for matching traffic. If you want rule C to be matched earlier than rule B, you can insert rule C above rule B. After rule C is added, the rule C number is 2, and rule B number is 3.
Rule Number (Rules A and B) | Rule Number (Rules A, B, and C) | ||
|---|---|---|---|
Custom rule A | 1 | Custom rule A | 1 |
-- | -- | Custom rule C | 2 |
Custom rule B | 2 | Custom rule B | 3 |
Default rule | * | Default rule | * |
in the upper left corner and choose Network > Virtual Private Cloud.The Virtual Private Cloud page is displayed.
The network ACL list is displayed.
The network ACL summary page is displayed.
The Add Inbound Rule or Add Outbound Rule dialog box is displayed.
to add more rules.Parameter | Description | Example Value |
|---|---|---|
Type | Network ACL type. There are two options: | IPv4 |
Action | The action for the network ACL rule. There are two options: | Allow |
Protocol | The protocol supported by the network ACL to match traffic. The value can be TCP, UDP, or ICMP. | TCP |
Source | The source from which the traffic is allowed or denied. The source can be: Example IPv4 address: 192.168.10.10/32 Example IPv6 address: 2002:50::44/128 Example IPv4 address range: 192.168.52.0/24 Example IPv6 address range: 2407:c080:802:469::/64 0.0.0.0/0 represents all IPv4 addresses. ::/0 represents all IPv6 addresses. Either the source or the destination of a network ACL rule can use the IP address group. For example, if the source uses an IP address group, the destination address cannot use an IP address group. | 192.168.0.0/24 |
Source Port Range | The source ports or port ranges used to match traffic. The value ranges from 1 to 65535. Enter ports in the following format: | 22-30 |
Destination | The destination to which the traffic is allowed or denied. The destination can be: Example IPv4 address: 192.168.10.10/32 Example IPv6 address: 2002:50::44/128 Example IPv4 address range: 192.168.52.0/24 Example IPv6 address range: 2407:c080:802:469::/64 0.0.0.0/0 represents all IPv4 addresses. ::/0 represents all IPv6 addresses. Either the source or the destination of a network ACL rule can use the IP address group. For example, if the source uses an IP address group, the destination address cannot use an IP address group. | 0.0.0.0/0 |
Destination Port Range | The destination ports or port ranges used to match traffic. The value ranges from 1 to 65535. | 22-30 |
Description | Supplementary information about the network ACL rule. This parameter is optional. The description can contain a maximum of 255 characters and cannot contain angle brackets (< or >). | N/A |
Return to the rule list to check the new rule.
in the upper left corner and choose Network > Virtual Private Cloud.The Virtual Private Cloud page is displayed.
The network ACL list is displayed.
The network ACL summary page is displayed.