Enable access control for a listener to allow only specific IP addresses (whitelist) or block specific IP addresses (blacklist).
How it works
Access control consists of access control lists (ACLs) and an access control mode.
-
ACL: Add multiple IP addresses or CIDR blocks to centrally manage addresses with the same security requirements.
-
Access control mode: Configure a whitelist or blacklist for each listener.
-
Whitelist: Allows specific IP addresses to access a GA listener. Only requests from IP addresses or CIDR blocks in the selected ACL are forwarded.
-
Blacklist: Blocks specific IP addresses from accessing a GA listener. Requests from IP addresses or CIDR blocks in the selected ACL are not forwarded.
-
-
Configuring a whitelist carries risks. After a whitelist is configured, only whitelisted IP addresses can access the listener. If the whitelist is enabled but the ACL is empty, the listener forwards all requests.
-
If you enable a blacklist for a listener but do not add any IP address to the associated ACL, the listener forwards all requests.
When you create an ACL, specify its IP version as IPv4 or IPv6. Apply the ACL to a listener with an accelerated IP of the same version.
Limitations
Pay-as-you-go
-
Only smart routing listeners support access control.
-
A single Global Accelerator instance supports a maximum of 600 IP addresses or CIDR blocks across all ACL entries for all of its listeners.
For a single listener, the maximum number of IP addresses or CIDR blocks in the associated ACLs is calculated as follows:
-
Total number of ports for the listener (a port range is counted as one port) × Number of ACL entries
-
If the listener protocol is HTTP/3: Total number of ports for the listener (a port range is counted as one port) × Number of ACL entries × 2
-
-
An ACL can be associated with a maximum of 10 listeners.
-
A listener can be associated with at most one IPv4 ACL and one IPv6 ACL.
-
If the accelerated IP uses IPv4 or IPv6 and the listener has both an IPv4 ACL and an IPv6 ACL, only the ACL matching the accelerated IP version takes effect.
-
If the accelerated IP uses dual-stack and the listener has both an IPv4 ACL and an IPv6 ACL, both ACLs take effect.
-
Subscription
-
Only smart routing listeners support access control.
-
An ACL associated with a listener can contain a maximum of 200 unique IP addresses or CIDR blocks.
-
An ACL can be associated with a maximum of 10 listeners.
-
A listener can be associated with at most one IPv4 ACL and one IPv6 ACL.
If the accelerated IP uses IPv4 or IPv6 and the listener has both an IPv4 ACL and an IPv6 ACL, only the ACL matching the accelerated IP version takes effect.
Configuration workflow
Create an ACL
Before you can enable access control, you must create an ACL.
Log on to the GA console.
-
In the left-side navigation pane, choose .
-
On the Access Control page, click Create ACL.
-
In the Create ACL dialog box, configure the parameters and click OK.
Parameter
Description
ACL Name
Enter a name for the ACL.
IP Version
Select the IP version for the ACL.
-
IPv4: Takes effect only for acceleration endpoints that use IPv4 accelerated IPs.
-
IPv6: Takes effect only for acceleration endpoints that use IPv6 accelerated IPs.
Resource Group
Select the resource group to which the ACL belongs.
Create a resource group in Resource Management.
Tag
Add a tag to the ACL.
Select or enter a Key and Value.
To manage ACL tags, use Tag management.
-
Add ACL entries
After you create an ACL, add IP address or CIDR block entries to it.
Log on to the GA console.
-
In the left-side navigation pane, choose .
-
Find the target ACL and click Manage ACL in the Actions column.
-
On the ACL details page, add entries in one of the following ways:
-
Add a single entry
Click Add Rule. In the Add ACL Entry dialog box, enter the IP Address/CIDR Block and a Remark, and then click OK.
-
Add multiple entries
Click Add Multiple Rules. In the Add Multiple Rules dialog box, add multiple IP addresses or CIDR blocks as prompted, and then click OK.
-
Enable access control for a listener
Before you enable access control, make sure that you have created a listener. Add and manage smart routing listeners.
Log on to the GA console.
-
On the Instances page, find the target GA instance, and then click Configure Listener in the Actions column.
-
On the Listeners tab, click the ID of the listener for which you want to enable access control.
-
On the Listener Details tab, in the Access Control section, turn on the Access Control switch.
-
In the Enable Access Control dialog box, configure the following parameters and click OK.
Parameter
Description
ACL Type
Select an access control mode:
-
Whitelist: Forwards requests from IP addresses or CIDR blocks in the selected ACL.
-
Blacklist: Does not forward requests from IP addresses or CIDR blocks in the selected ACL.
Warning-
Configuring a whitelist carries risks. After a whitelist is configured, only whitelisted IP addresses can access the listener. If the whitelist is enabled but the ACL is empty, the listener forwards all requests.
-
If you enable a blacklist for a listener but do not add any IP address to the associated ACL, the listener forwards all requests.
ACL
Select an ACL.
You can also click +Add ACL to add two ACLs at a time.
-
Dissociate an ACL from a listener
Dissociate unused ACLs from a listener.
Dissociating all ACLs from a listener automatically disables its access control.
Log on to the GA console.
-
On the Instances page, find the target GA instance, and then click Configure Listener in the Actions column.
-
On the Listener tab, click the ID of the listener from which you want to dissociate an ACL.
-
On the Listener Details tab, in the Access Control section, click the
icon next to ACL. -
In the Modify ACL dialog box, find the ACL that you want to dissociate, click Disassociate in the Actions column, and then click OK.
Disable access control for a listener
Disable access control when you no longer need to restrict listener access.
Log on to the GA console.
-
On the Instances page, find the target GA instance, and then click Configure Listener in the Actions column.
-
On the Listener tab, click the ID of the listener for which you want to disable access control.
-
On the Listener Details tab, in the Access Control section, turn off the Access Control switch.
-
In the dialog box that appears, click OK.
Delete ACL entries
Delete IP address entries from an ACL.
Log on to the GA console.
-
In the left-side navigation pane, choose .
-
Find the target ACL and click Manage ACL in the Actions column.
-
In the Actions column of the target IP entry, click Delete. Alternatively, select multiple IP entries and click Delete below the entry list.
-
In the dialog box that appears, click OK.
Delete an ACL
Delete unused ACLs.
Before you delete an ACL, dissociate it from all associated listeners. Dissociate an ACL from a listener.
Log on to the GA console.
-
In the left-side navigation pane, choose .
-
Find the target ACL and click Delete in the Actions column.
-
In the dialog box that appears, click OK.
Related API operations
-
CreateAcl: Create an ACL.
-
AddEntriesToAcl: Add IP entries to an ACL.
-
AssociateAclsWithListener: Associate an ACL with a listener.
-
DissociateAclsFromListener: Dissociate an ACL from a listener.
-
RemoveEntriesFromAcl: Remove IP entries from an ACL.
-
DeleteAcl: Delete an ACL.