By default, a PolarDB-X instance only allows connections from 127.0.0.1, which blocks all external access. Add the IP addresses or Classless Inter-Domain Routing (CIDR) blocks of your application servers to grant access.
Limits and quotas
| Limit | Value |
|---|---|
| Whitelists per instance | 50 |
| IP addresses and CIDR blocks per whitelist | 300 |
| IPv6 support | Not supported |
| Time for changes to take effect | Approximately 1 minute |
Special IP values:
| Value | Effect |
|---|---|
127.0.0.1 | Blocks all connections |
0.0.0.0/0 | Allows connections from all IP addresses (security risk — use with caution) |
Prerequisites
Before you begin, ensure that you have:
A PolarDB-X instance
The public IP addresses or CIDR blocks of the servers that need database access
Add a whitelist
Log on to the PolarDB-X console.
In the top navigation bar, select the region where your instance is deployed.
On the Instances page, click the PolarDB-X 2.0 tab.
Find the instance and click its ID.
In the left-side navigation pane, choose ConfigurationManagement > Safety management.
On the Whitelist settings tab, click Add Whitelist.
In the Add Whitelist panel, configure the following parameters.
Parameter Description Group Name A name for the whitelist group. Group Whitelist The IP addresses or CIDR blocks to allow. Separate multiple entries with commas — for example, 192.168.0.1,192.168.0.0/24. Maximum 300 entries per whitelist.Click OK.
Modify a whitelist
Log on to the PolarDB-X console.
In the top navigation bar, select the region where your instance is deployed.
On the Instances page, click the PolarDB-X 2.0 tab.
Find the instance and click its ID.
In the left-side navigation pane, choose ConfigurationManagement > Safety management.
On the Whitelist settings tab, find the whitelist and click Configuration in the Operation column.

In the Configure Whitelist panel, update the Group Whitelist field with the new IP addresses or CIDR blocks.
Parameter Description Group Whitelist The updated IP addresses or CIDR blocks. You can enter IP addresses (for example, 192.168.0.1) and CIDR blocks (for example,192.168.0.0/24). Separate multiple entries with commas — for example,192.168.0.1,192.168.0.0/24. Maximum 300 entries per whitelist. To block all access, specify127.0.0.1. To allow all access, specify0.0.0.0/0(security risk — use with caution).Click OK.
Delete a whitelist
Log on to the PolarDB-X console.
In the top navigation bar, select the region where your instance is deployed.
On the Instances page, click the PolarDB-X 2.0 tab.
Find the instance and click its ID.
In the left-side navigation pane, choose ConfigurationManagement > Safety management.
On the Whitelist settings tab, find the whitelist and click Delete in the Operation column.

In the confirmation dialog, click OK.