This topic describes how to configure an Access Control List (ACL) for a Smart Access Gateway (SAG) app instance to control its network traffic.
Step 1: Create an ACL instance
Log on to the SAG console.
In the top navigation bar, select the region.
In the left-side navigation pane, click ACL.
On the ACL page, click Create access control.
-
In the Create access control dialog box, set the following parameters and click OK.
Parameter
Description
Resource Group
Select the resource group to which the ACL instance belongs.
Instance Name
Enter a name for the ACL instance.
Instance Type
Select the type of SAG instance to associate with the ACL. Valid values:
-
SAG Device
-
SAG App
This example uses SAG App.
-
Step 2: Add an ACL rule
On the ACL page, find the ACL that you want to manage and click Configure Rules in the Actions column.
-
On the details page of the ACL instance, click the Rules tab, and then click Add Rule.
-
In the Add Rule dialog box, set the following parameters and click OK.
Parameter
Description
Instance Name
Enter a name for the ACL rule.
Direction
Select the direction of traffic to which the ACL rule applies.
-
Outbound: traffic from the client to external networks.
-
Inbound: traffic from external networks to the client.
Authorization Policy
Select Allow or Block to specify whether to permit or deny traffic.
Protocol
Select the protocol to which the ACL rule applies.
For a list of supported protocols, see the options in the console.
Source network segment
The rule direction determines the source CIDR block:
-
If the rule direction is Outbound, the source CIDR block is the CIDR block of the client that initiates requests.
-
If the rule direction is Inbound, the source CIDR block is the CIDR block of the external service that initiates requests.
Source port range
Source port range.
The valid source port range depends on the protocol that you select. Examples:
-
If you select All (All Protocols Supported), the source port range is -1/-1 and cannot be changed.
-
If you select HTTP, the source port range defaults to 1/65535 and can be changed.
For the valid source port range of each protocol, see the console. The following formats are supported:
-
1/200: ports 1 through 200.
-
80/80: port 80.
-
-1/-1: all ports.
Destination Network segment
The rule direction determines the destination CIDR block:
-
If the rule direction is Outbound, the destination CIDR block is the CIDR block of the external service being accessed.
-
If the rule direction is Inbound, the destination CIDR block is the CIDR block of the client being accessed.
Destination port range
Destination port range.
The valid destination port range depends on the protocol that you select. Examples:
-
If you select All (All Protocols Supported), the destination port range is -1/-1 and cannot be changed.
-
If you select TELNET, the destination port range is 23/23 and cannot be changed.
For the valid destination port range of each protocol, see the console. The following formats are supported:
-
1/200: ports 1 through 200.
-
80/80: port 80.
-
-1/-1: all ports.
Priority
Select the priority of the ACL rule.
Valid values: 1 to 100. A smaller value indicates a higher priority.
Auto Generation of Reverse Direction Rule
If enabled, a corresponding ACL rule is automatically generated for traffic in the reverse direction.
For example, if you create an inbound ACL rule, the system automatically creates a corresponding outbound ACL rule.
Important-
We recommend enabling this feature. An ACL rule in only one direction may cause request failures because responses cannot be returned.
-
If the ACL rule's protocol is not UDP or TCP, the protocol of the automatically generated reverse-direction rule is TCP by default.
-
Step 3: Associate the ACL
On the ACL details page, click the Associated Instances tab.
-
On the Associated Instances tab, click Associate with Instance.
-
In the Associate with Instance dialog box, select one or more SAG app instances and click OK.
In the Associate with Instance dialog box, you can search for the SAG app instance by resource group, instance name, or instance ID.
More operations
|
Actions |
Steps |
|
Clone an ACL instance |
You can clone an ACL instance to copy its rules. Then, you can associate the new ACL instance with an SAG app instance.
|
|
Edit an ACL rule |
|
|
Delete an ACL rule |
|
|
Disassociate an ACL from an SAG app instance |
|
|
Delete an ACL instance |
|
API reference
-
CreateACL: creates an ACL.
-
ModifyACL: renames an ACL.
-
DeleteACL: deletes an ACL.
-
AssociateACL: associates an ACL with an SAG instance.
-
DisassociateACL: disassociates an ACL from an SAG instance.
-
AddACLRule: adds an access control rule to an ACL.
-
ModifyACLRule: modifies an access control rule.
-
DeleteACLRule: deletes an access control rule.
-
DescribeACLAttribute: queries the details of a specified ACL.
-
DescribeACLs: queries the ACLs in a specified region.