To ensure the security and stability of Tair (Redis OSS-compatible) instances, access from all IP addresses to Tair (and open-source Redis) instances is blocked by default. Before you use a Tair (and open-source Redis) instance, you must add the IP address or IP address range of your client to the instance's whitelist. Maintain your whitelist regularly to keep access secure.
Whitelist configuration methods
|
Method |
Description |
Use cases |
|
Add to an IP whitelist |
Add your client IP address to the instance whitelist. |
|
|
Add a security group |
A security group acts as a virtual firewall that controls inbound and outbound traffic for the ECS instances within it. Associate the ECS security group with your Tair instance to grant access to all ECS instances in the group without adding each IP individually. |
Bulk add private and public IPs of ECS instances by using a security group |
|
Configure an IP whitelist by using the Alibaba Cloud app (mobile) |
The Alibaba Cloud app is the official mobile application from Alibaba Cloud that allows you to manage your cloud resources anytime, anywhere. You can use the Alibaba Cloud app to quickly configure an IP whitelist. You can also monitor cloud resources, stay updated on product news, and purchase cloud products. |
Add VPC or public IPs via the mobile app |
Whitelist groups and ECS security groups can be used together. Both the IPs in whitelist groups and the ECS instances in added security groups can access the instance.
Add an ECS private IP to a whitelist
If your ECS and Tair instances are in the same VPC, connect over the VPC.
If your ECS and Tair instances are in different VPCs, change the VPC of the ECS instance.
Log on to the 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.
-
In the left-side navigation pane, click Whitelist Settings.
-
In the default whitelist group, click Modify.
NoteYou can also click Add Whitelist to create a group. The name must be 2–32 characters: lowercase letters, digits, and underscores (_). It must start with a lowercase letter and end with a lowercase letter or a digit.
-
For Add Method, select Import ECS Internal IP Address. This displays the private IPs of ECS instances in the same region.
Hover over an IP address to view the ID and name of the associated ECS instance.
-
Select the required IP addresses and move them to the box on the right.
-
Click OK.
-
Optional: To remove all IP addresses from a whitelist group, click Delete to the right of the target whitelist group.
You cannot delete system-generated whitelist groups, such as default and hdm_security_ips.
Add a public IP to a whitelist
To connect from a local device or from an ECS instance in a different VPC, add the public IP address to a whitelist.
Log on to the 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.
-
In the navigation pane on the left, click Whitelist Settings.
-
In the default whitelist group, click Modify.
NoteYou can also click Add Whitelist to create a group. The name must be 2–32 characters: lowercase letters, digits, and underscores (_). It must start with a lowercase letter and end with a lowercase letter or a digit.
-
For Add Method, select Add Manually.
-
In the Whitelist text box, enter the IP addresses or CIDR blocks.
Separate multiple IP addresses with commas (,). Up to 1,000 unique addresses are supported. Formats:
-
A specific IP address, for example, 10.23.12.24.
-
A CIDR block in CIDR notation. For example, 10.23.12.0/24 represents the IP address range from 10.23.12.0 to 10.23.12.255. The prefix length must be an integer from 1 to 32.
WarningAdding 0.0.0.0/0 allows access from any IP address, which poses a significant security risk. Use with caution.
-
-
Click OK.
-
Optional: To remove all IP addresses from a whitelist group, click Delete to the right of the target whitelist group.
You cannot delete system-generated whitelist groups, such as default and hdm_security_ips.
Bulk add ECS IPs via security group
When multiple ECS instances need to access a Tair instance, you can add a Tair to the instance's whitelist. Once added, the security group grants access to the Tair instance for all associated resources within it, including their private and public IPs.
-
This access control applies only to resources associated with the security group, such as ECS instances. It does not apply to CIDR blocks or IP addresses defined in security group rules.
-
The Tair instance must be compatible with Redis 4.0 (latest minor version) or a later major version. To upgrade the major version, see Upgrade the major version.
Log on to the 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.
-
In the navigation pane on the left, click Whitelist Settings.
-
Click the Security Groups tab.
-
On the Security Groups tab, click Add Security Group.
-
In the dialog box that appears, select the security group that you want to add.
You can perform a fuzzy search by Security Group Name or Security Group ID.
Figure 3. Add Security Group
NoteYou can add up to 10 security groups to each instance.
-
Click OK.
-
Optional: To remove all security groups, click Delete.
Configure a whitelist with the Alibaba Cloud app
-
Download and install the Alibaba Cloud app by using one of the following methods:
-
Go to the Alibaba Cloud app introduction page and scan the QR code in the upper-right corner.
-
Search for Alibaba Cloud in your app store.
-
-
Open the Alibaba Cloud app. On the O&M page, in the My Resources section, find Tair (Redis OSS-compatible) and then tap Instance List.
-
Tap the target instance. At the top of the page, tap Account & Whitelist.
-
Perform one of the following operations based on your business needs:
-
To manually modify a whitelist, tap the
icon to the right of the target whitelist group, tap Modify, and then enter the IP whitelist. -
To add a whitelist group, tap Add Whitelist Group at the bottom of the page and enter a group name and an IP whitelist.
-
To delete a whitelist group, tap the
icon to the right of the target whitelist group and select Delete.
-
API reference
|
API |
Description |
|
Queries the IP whitelist of an instance. |
|
|
Modifies the IP whitelist of an instance. |
|
|
Queries the security groups that are configured in the whitelist of an instance. |
|
|
Modifies the security groups in the whitelist of an instance. |