All Products
Search
Document Center

AnalyticDB:Configure an IP address whitelist

Last Updated:Jul 31, 2023

By default, all external IP addresses are denied to access AnalyticDB for PostgreSQL instances. Before you connect to and use an instance, you must add the IP address or CIDR block of your client to the whitelist of AnalyticDB for PostgreSQL.

This step is optional. To connect to a database by using an integrated development environment (IDE), you must configure an IP address whitelist. To connect to a database by using Data Management (DMS), you can skip this step.

Prerequisites

  • An AnalyticDB for PostgreSQL instance is created. For more information, see Create an instance.

  • Before you configure a whitelist for an AnalyticDB for PostgreSQL instance, you must obtain the IP addresses of your client based on its installation location by using the following methods.

    Client installation location

    Network type

    How to obtain IP addresses

    ECS instance (recommended)

    VPC

    Check the IP address of the Elastic Computer Service (ECS) instance. For more information, see the "How do I query the IP addresses of ECS instances?" section of the Network FAQ topic.

    Note

    Make sure that the ECS and AnalyticDB for PostgreSQL instances reside in the same virtual private cloud (VPC). The VPC IDs of the two instances must be the same. If the VPC IDs are different, change the VPC of the ECS instance. For more information, see Change the VPC of an ECS instance.

    On-premises device or third-party cloud

    Internet

    The method that is used to obtain the public IP address of the on-premises device may vary based on your network environment or operating system.

    • Linux: Open the CLI, enter the curl ifconfig.me command, and then press Enter.

    • Windows: Visit http://myip.ipip.net/ on the on-premises device to obtain its public IP address.

    • macOS: Start Terminal, enter the curl ifconfig.me command, and then press Enter.

Procedure

  1. Log on to the AnalyticDB for PostgreSQL console.
  2. In the upper-left corner of the console, select a region.
  3. Find the instance that you want to manage and click the instance ID.
  4. In the left-side navigation pane, click Security Controls.
  5. On the Whitelist Settings tab, click Modify to the right of the default whitelist.
  6. In the Modify Whitelist panel, enter the IP addresses or CIDR blocks that are allowed for access in IP Addresses.
  7. Click OK.

References

For more information about how to configure an IP address whitelist, see Configure an IP address whitelist.

What to do next

Connect to a database