You need to enable JavaScript to run this app.
Document Database for MongoDB

Document Database for MongoDB

Copy page
Download PDF
Quick start
Setting allowlist
Copy page
Download PDF
Setting allowlist
After the Document Database for MongoDB instance is created successfully, you can set allowlist for the instance to allow devices to access the instance. This topic describes how to set allowlist via the console.​
Background information​
To ensure the security and stability of the MongoDB database, accessing MongoDB instances from any IP address is not allowed by default in the system. Before using MongoDB instances, you need to create an allowlist and add the client's IP address or CIDR block to the allowlist of the MongoDB instance to allow the client to access the MongoDB instance. We recommend that you regularly maintain and manage the allowlist to ensure the security of accessing MongoDB instances.​
Limits​
​
Associate allowlist during instance creation​
You can associate MongoDB instances with allowlists during instance creation, so that clients in the allowlist can access the instance. For specific procedures, refer to Creating instance.​
Associate allowlist to existing instance​
  1. Log in to the MongoDB console.​
  1. In the upper-left corner of the top menu bar, select the project and region for instance.​
  1. Select either Replica set instances or Sharding instances in the left navigation bar depending on the instance type.​
  1. On the target instance type list page, click the target instance name.​
  1. On the instance details page, click the Security tab.​
  1. Under the Allowlist sub-tab, click Associate allowlist.​
  1. In the pop-up control panel, first confirm the Instance name and Project information, then complete the subsequent operations based on the selected association mode.​
  • If you select Existing allowlist, that is, associate an existing allowlist to the current instance, you need to:​
  1. In the Existing allowlist list, select the allowlists to be associated.​
  1. click OK.​
  • If you select New allowlist, that is, create a new allowlist and automatically associate it to the current instance, you need to:​
  1. Select the project to be added to the allowlist from the Affiliated project drop-down list. By default, the default project will be added.​
  1. Enter a new allowlist name, description (optional), and IP address.​
  1. click OK.​
tip​
  • For more information on configuring the name, description, and IP address when creating an allowlist, refer to Creating allowlist.​
  • If you use the MongoDB cloud service through IAM user, you can only see the allowlist information under the projects that have been authorized for the current IAM user. For more details, refer to Using MongoDB with IAM users.​
Relevant APIs​
​
API​
Description​
Call the CreateAllowList API to create a new IP allowlist.​
Call the ModifyAllowList API to modify the target allowlist settings (such as the name of the allowlist, IP address in the allow list, whether to set it as the default allowlist, etc.).​
Call the DescribeAllowLists API to query all IP allowlists for the account in the specified region.​
Call the DescribeAllowListDetail API to query the details of the target allowlist group, including the IP addresses and the details of associated instances.​
Call AssociateAllowList API to associate the target instance to the specified IP allowlist.​
​
​
Last updated: 2026.01.29 19:23:22