After you create an ApsaraDB for MongoDB instance, configure an IP address whitelist or security group to allow external access. By default, the whitelist contains only 127.0.0.1, which blocks all external access.
Prerequisites
Instance endpoints appear on the Basic Information and Database Connections pages only after you configure a whitelist.
-
An ApsaraDB for MongoDB instance
-
The instance ID and region
Usage notes
-
Regularly review your IP address whitelists to keep instances secure.
-
The default whitelist is system-created and can be edited but not deleted. How do I understand the names and sources of an IP address whitelist for ApsaraDB for MongoDB?
Procedure
-
Go to the Replica Set Instances or Sharded Cluster Instances page.
-
In the top navigation bar, select the region and resource group, and then click the instance ID.
-
In the left-side navigation pane, choose .
-
Click Create Whitelist.
-
In the Create Whitelist panel, configure the following settings:
-
Enter a whitelist name.
The name must be 2-32 characters long, start with a lowercase letter, end with a lowercase letter or digit, and contain only lowercase letters, digits, and underscores (_).
-
Select the IPv4 or IPv6 tab.
NoteIPv6 is available only for MongoDB 4.2 instances.
-
In the IP Whitelist field, add IP addresses.
Separate multiple entries with commas (,). Up to 1,000 entries per whitelist.
IP version
Supported formats
Example
IPv4
Individual IP addresses
10.23.12.24IPv4
CIDR blocks (prefix length: 1 to 32)
10.23.12.24/24IPv6
Individual IP addresses
--
WarningIf the whitelist contains only
0.0.0.0/0or is empty, all IP addresses can access the instance, which poses a security risk. Proceed with caution.
-
-
Click OK.