This topic describes how to configure an IP address whitelist on an ApsaraDB RDS for SQL Server instance. An IP address whitelist allows only the specified devices to access your RDS instance.

For more information about how to configure an IP address whitelist for an RDS instance that runs another database engine, see the following topics:

Scenarios

An IP address whitelist consists of IP addresses and Classless Inter-Domain Routing (CIDR) blocks that are granted access to your RDS instance. You can configure IP address whitelists to provide high-level access control and security protection for your RDS instance. We recommend that you update the configured IP address whitelists on a regular basis.

In most cases, you need to configure an IP address whitelist in the following scenarios:

  • Scenario 1

    After your RDS instance is created, you need to add the IP addresses of specific devices to an IP address whitelist of the instance. This allows these devices to access your RDS instance.

  • Scenario 2

    Your RDS instance cannot be connected. You need to check the IP address whitelists of the instance. Then, you can modify the IP address whitelists that are improperly configured.

    The following table provides the IP address whitelist settings in various connection scenarios.

    Note A virtual private cloud (VPC) is an isolated network on Alibaba Cloud. It is more secure than the classic network. For more information, see What is a VPC?
    Connection scenario Network type IP address whitelist setting
    Connect an Elastic Compute Service (ECS) instance to your RDS instance The ECS and RDS instances reside in the same VPC. This is the recommended connection scenario. Add the private IP address of the ECS instance to an IP address whitelist of your RDS instance.
    The ECS and RDS instances reside in different VPCs. Instances in different VPCs cannot communicate with each other over internal networks. In this case, add the private IP address of the ECS instance to an IP address whitelist of your RDS instance.
    The ECS and RDS instances reside in the classic network. Add the private IP address of the ECS instance to an IP address whitelist of your RDS instance.
    The ECS instance resides in the classic network.

    Your RDS instance resides in a VPC.

    Instances of different network types cannot communicate with each other over internal networks. In this case, perform the following operations:
    1. Migrate the ECS instance from the classic network to the VPC where your RDS instance resides. For more information, see Migrate an ECS instance from the classic network to a VPC.
      Note This operation is supported only when the ECS and RDS instances reside in the same region. If the ECS and RDS instances reside in different regions, we recommend that you use Data Transmission Service (DTS) to migrate your RDS instance to the region where the ECS instance resides. This makes your database service stable. For more information, see Migrate data between ApsaraDB RDS for MySQL instances.
    2. Add the private IP address of the ECS instance to an IP address whitelist of your RDS instance.
    The ECS instance resides in a VPC.

    Your RDS instance resides in the classic network.

    Instances of different network types cannot communicate with each other over internal networks. In this case, perform the following operations:
    1. Migrate your RDS instance from the classic network to the VPC where the ECS instance resides. For more information, see Change the network type of an ApsaraDB RDS for SQL Server instance.
      Note This operation is supported only when the ECS and RDS instances reside in the same region. If the ECS and RDS instances reside in different regions, we recommend that you use DTS to migrate your RDS instance to the region where the ECS instance resides. This makes your database service stable. For more information, see Migrate data between ApsaraDB RDS for MySQL instances.
    2. Add the private IP address of the ECS instance to an IP address whitelist of your RDS instance.
    Connect a self-managed host to your RDS instance None. Add the public IP address of the self-managed host to an IP address whitelist of your RDS instance.
    Note

Precautions

  • A maximum of 50 IP address whitelists can be configured for each RDS instance.
  • When you configure IP address whitelists, the workloads on your RDS instance are not interrupted.
  • The IP address whitelist labeled default can be cleared, but cannot be deleted.
  • Do not modify or delete the IP address whitelists that are generated by other Alibaba Cloud services. If you delete these IP address whitelists, the related Alibaba Cloud services cannot connect to your RDS instance. For example, the IP address whitelist labeled ali_dms_group is generated by Data Management (DMS), and the IP address whitelist labeled hdm_security_ips is generated by Database Autonomy Service (DAS).
  • The IP address whitelist labeled default contains only the 127.0.0.1 IP address. This indicates that no IP addresses can access your RDS instance.

Procedure

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the left-side navigation pane, click Data Security.
  3. Click Create Whitelist and in the Create Whitelist dialog box set the Whitelist Name parameter. This allows you to create an IP address whitelist. Otherwise, click Modify to the right of an existing IP address whitelist. This allows you to modify the IP address whitelist.
  4. Enter the specified IP addresses or CIDR blocks. Then, click ok.
    Note
    • If you enter more than one IP address or CIDR block, you must separate these IP addresses or CIDR blocks with commas (,). Do not add spaces preceding or following the commas. Example: 192.168.0.1,172.16.213.9.
    • A maximum of 1,000 IP addresses and CIDR blocks can be configured for each RDS instance. If you want to enter a large number of IP addresses, we recommend that you merge discontinuous IP addresses into CIDR blocks, for example, 10.10.10.0/24.
    • After you add IP addresses or CIDR blocks to the IP address whitelist labeled default, ApsaraDB RDS deletes the default IP address 127.0.0.1.
  5. Optional. Click Add Internal IP Addresses of ECS Instances. In the dialog box that appears, view the IP addresses of all the ECS instances that are created within your Alibaba Cloud account. Then, add the specified IP addresses to the IP address whitelist.
    Loading ECS Inner IP

What to do next

Related operations

API Description
DescribeDBInstanceIPArrayList Queries the IP address whitelists of an ApsaraDB RDS instance.
ModifySecurityIps Modifies an IP address whitelist of an ApsaraDB RDS instance.