All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Step 2: Configure whitelists

Last Updated:Sep 09, 2024

By default, Redis instances block access from all IP addresses to ensure the security and stability of Redis databases. Before you use a Redis instance, you must add IP addresses or CIDR blocks that are used to access the Redis instance to the whitelists of the instance.

Procedure

In this example, the client resides on an Elastic Compute Service (ECS) instance, and the ECS instance is deployed in the same virtual private cloud (VPC) as the Redis instance.

  1. Log on to the ApsaraDB for Redis console and go to the Instances page. In the top navigation bar, select the region in which the instance that you want to manage resides. Then, find the instance and click the instance ID.

  2. In the left-side navigation pane, click Whitelist Settings.

  3. Find the default whitelist and click Modify in the Actions column.

  4. If you set Add way to Load ECS Internal Network IP, the panel displays the private IP addresses of ECS instances that are deployed in the same region as the Redis instance.

    Move the pointer over an IP address to view the ID and name of the ECS instance to which the IP address is assigned.

  5. Select the required IP addresses and move them to the right-side section.

  6. Click OK.

    Next, you can connect to the Redis instance from the client. For more information, see Step 3: Connect to an ApsaraDB for Redis instance.

References

If you want to access a Redis instance from an on-premises device or if your ECS instance is not in the same VPC as the Redis instance, you can connect to the Redis instance over the Internet. However, this is not recommended. You can copy the IP address of the client to a whitelist of the Redis instance. For more information, see Configure whitelists.