TencentDB for Redis does not support public network access for the time being. You can use a CVM instance with a public IP for port forwarding so as to access TencentDB for Redis over the public network.
Note:
iptable-based forwarding may be unstable; therefore, you are not recommended to access instances over the public network in the production environment.
Note:
The CVM and TencentDB instances must be under the same account and in the same VPC in the same region, or both in the classic network
echo 1 > /proc/sys/net/ipv4/ip_forward
26.xx.x.2:10001
(CVM instance public address with a custom port as desired) to the TencentDB for Redis instance with the private address 10.0.0.5:6379
:iptables -t nat -A PREROUTING -p tcp --dport 10001 -j DNAT --to-destination 10.0.0.5:6379
iptables -t nat -A POSTROUTING -d 10.0.0.5 -p tcp --dport 6379 -j MASQUERADE
info
command. If the database information is returned, the connection is successful.
Was this page helpful?