Bulk configure IP whitelists with a template

Updated at:

If you manage multiple ApsaraDB RDS for SQL Server instances that require the same IP whitelist, you can use a whitelist template. This feature lets you create a set of whitelist rules and apply them to multiple instances.

Prerequisites

A public endpoint is enabled for the ApsaraDB RDS for SQL Server instance.

Limits

  • An ApsaraDB RDS for SQL Server instance supports up to 1,000 whitelist rules. If you exceed this limit when you modify an IP whitelist or associate a whitelist template, the operation fails.

    Note
    • The total number of whitelist rules for an ApsaraDB RDS for SQL Server instance includes rules configured directly on the instance and those inherited from associated whitelist templates.

    • A whitelist rule can be a specific IP address or a CIDR block.

  • A single whitelist template can be associated with up to 500 instances.

Usage notes

  • Changes to a whitelist template take effect immediately on the template itself. The changes are applied to the IP whitelist groups of all associated instances in about one minute.

  • If a whitelist template is already associated with multiple instances, modifying the template affects all associated instances. Assess the potential impact before you proceed.

  • Deleting a whitelist template removes the corresponding IP whitelist group from all associated instances, which may interrupt connections from the IP addresses in that group. If the template is associated with only a few instances, we recommend that you disassociate it from each instance before you delete the template.

Billing

This feature is free of charge.

Procedure

Configure a whitelist template

  1. Go to the ApsaraDB RDS console. In the navigation pane on the left, click Whitelist Template.

  2. Configure the whitelist template:

    • Create a template: Click Create Whitelist Template. In the panel that appears, enter a template name and IP addresses for the whitelist, and then click OK.

      Note
      • Template names must be unique within the same account.

      • Setting the whitelist to 0.0.0.0/0 opens your instance to the internet. Use this setting with caution. If you use it for connection testing, remove it immediately after the test is complete.

      • If you set the whitelist to only 127.0.0.1, all external access is denied. If other IP addresses or CIDR blocks are also configured, the 127.0.0.1 entry has no effect.

      • When this template is applied to an instance, the new whitelist rules take effect in about one minute.

    • Modify a template: In the Actions column of the target whitelist template, click Modify. In the panel that appears, make the desired changes and then click OK.

      Important

      After a whitelist template is created, you cannot change its name.

      1. Associate instances (by Instance ID/Instance Name):

        1. In the All Instances panel on the left, you can select instances in bulk or use the Search box to find the instances to associate.

        2. Select the instances and click image to move them to the Selected Instances panel on the right. To remove an instance, click image.

        Note

        You can associate up to 20 instances at a time.

      2. Edit the whitelist: Modify or add IP addresses to the whitelist as needed.

      Note

      After a whitelist template is modified, the changes are applied to all associated instances in about one minute.

    • Delete a template: In the Actions column of the target whitelist template, click Delete. In the confirmation dialog box that appears, click Delete.

      Note

      When you delete a whitelist template, the corresponding whitelist groups are also deleted from all associated instances.

Manage whitelist template associations

  1. Go to the ApsaraDB RDS console. In the navigation pane on the left, click Instances.

  2. Click the ID of the target instance. In the navigation pane on the left, click Whitelist and SecGroup.

  3. On the Whitelist Template tab, manage the associations.

    • Associate a template: Click Associate Whitelist Template. In the panel that appears, select the target whitelist template and click OK.

      Note

      After the association is successful, the whitelist group from the template appears in the whitelist group list.

    • Disassociate a template: In the whitelist group list, click Disassociate next to the target whitelist group. In the confirmation dialog box, click OK.

Related topics