IP address whitelists specify whether clients can access ApsaraMQ for RocketMQ instances. You can configure an IP address whitelist for an instance to allow only clients in specific CIDR blocks to access the instance.
By default, the whitelist contains 0.0.0.0/0, which allows connections from all IP addresses. After you add specific entries, the instance accepts connections only from those IP addresses.
The following entry types are supported:
| Entry type | Example |
|---|---|
| Public IP address | 203.0.113.1 |
| Internal IP address | 192.168.1.100 |
| CIDR block | 10.0.0.0/24 |
Removing an entry immediately blocks the corresponding client. Before you modify the whitelist, make sure your own IP address remains in the list to avoid locking yourself out.
Prerequisites
Before you begin, make sure that you have:
An ApsaraMQ for RocketMQ instance
Permissions to manage access control settings for the instance
Add IP addresses or CIDR blocks
Log on to the ApsaraMQ for RocketMQ console. In the left-side navigation pane, click Instances.
In the top navigation bar, select a region, such as China (Hangzhou). On the Instances page, click the name of the instance that you want to manage.
In the left-side navigation pane, click Access Control.
On the Access Control page, click the IP Address Whitelist tab, and then click Add IP Address.
In the Add IP Address panel, enter the IP addresses or CIDR blocks and click OK.
NoteSeparate multiple entries with semicolons (;) or commas (,).
View the IP address whitelist
Log on to the ApsaraMQ for RocketMQ console. In the left-side navigation pane, click Instances.
In the top navigation bar, select a region, such as China (Hangzhou). On the Instances page, click the name of the instance that you want to manage.
In the left-side navigation pane, click Access Control.
On the Access Control page, click the IP Address Whitelist tab to view all entries.
Delete an IP address or CIDR block
After you delete an entry, clients with that IP address or CIDR block can no longer access the instance. Make sure no active clients depend on the entry before you proceed.
On the Access Control page, click the IP Address Whitelist tab.
Find the entry that you want to remove and click Delete in the Actions column.
In the Confirm Deletion dialog box, click OK.
Related API operations
Use the following API operations to manage IP address whitelists programmatically:
| API operation | Description |
|---|---|
| CreateInstanceIpWhitelist | Add entries to a whitelist |
| ListInstanceIpWhitelist | Query whitelist entries |
| DeleteInstanceIpWhitelist | Remove entries from a whitelist |