To ensure the security and stability of AnalyticDB for PostgreSQL databases, AnalyticDB for PostgreSQL instances block access from all IP addresses by default. Before you use an AnalyticDB for PostgreSQL instance, you must add IP addresses or CIDR blocks that are used to access the AnalyticDB for PostgreSQL instance to the whitelists of the instance. A properly configured IP address whitelist can make your AnalyticDB for PostgreSQL instance more secure. We recommend that you maintain IP address whitelists on a regular basis.
Prerequisites
Before you configure a whitelist for an AnalyticDB for PostgreSQL instance, you must obtain the IP address of the client based on its installation location by using the following methods.
- ECS instances:
- Linux instance
Run the
ifconfig
command to view NIC information. You can view the IP addresses, subnet masks, gateways, DNS servers, and MAC addresses in the command output. - Windows instance
In Command Prompt, run the
ipconfig /all
command to view NIC information. You can view the IP addresses, subnet masks, gateways, DNS servers, and MAC addresses in the command output.
- Linux instance
- On-premises devices or third-party clouds:
- Linux operating system: Run the curl ipinfo.io |grep ip command on the on-premises device to obtain its public IP address.
- Windows operating system: Visit ipinfo on the on-premises device to obtain its public IP address.
Procedure
Related operations
Operation | Description |
---|---|
DescribeDBInstanceIPArrayList | Queries the IP addresses that are allowed to access an instance. |
ModifySecurityIps | Modifies an IP address whitelist of an instance. |