Alibaba Cloud currently only supports intranet connection to Redis. If you want to connect and operate on the local PC, you need to operate indirectly through ECS
Preparation conditions
Install Redis on the local PC and confirm that it is in normal use. Refer to (1) How to properly open Redis for Windows
Mapping on ECS
Since Redis only supports the intranet, it is necessary to establish the mapping between the intranet and Redis, as well as the mapping between the intranet and the public network
1. Log in to ECS and open cmd
1. Run netsh interface portproxy add v4tov4 listenaddress=intranet IP address listenport=6379 connectaddress=Redis address connectport=6379
2. Run netsh interface portproxy add v4tov4 listenaddress=external IP address listenport=6379 connectaddress=intranet IP address connectport=6379
3. Run netsh interface portproxy show all to view the established mappings
4. You can delete unnecessary mappings by running netsh interface portproxy delete v4tov4 listenaddress=IP address listenport=6379
Local PC connection and operation
1. Open cmd
2. Run redis-cli -h public IP address -a ECS login password to connect
3. Run auth redis password for authorization
4. Verify that the connection is successful, refer to (1) How to open Redis for Windows correctly
refer to: