TencentDB for Tendis does not support direct access over a public network, but you can use a CVM instance with a public IP for port forwarding to access a Tendis instance over a public network.
Port forwarding with iptables is not stable, so we do not recommend this public network access solution in a production environment.
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 public IP and customizable port) to a Tendis instance whose private IP and port are
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
26.xx.xx.2:10001in the sample code), you can use the same command as the private network connection command. For more information, please see Connecting to Tendis Instances.
infocommand. If database information is returned, the connection is successful.
Contact our sales team or business advisors to help your business.
Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.
Was this page helpful?