Remote access to cockroach db on ec2

I created a cluster of three nodes, and they look good in cockroach console, and I can connect to any database through “coakroach sql” from other ec2 instances which are on the same AWS subnet as cokroach nodes.

However, I can’t connect to them from internet through their Elastic IPs of these ec2 cockroach nodes. Why?

Thanks for the help.

Hey @gao-jian!

Have you set the node’s security group allow communication on port 26257 from external IPs?

Best,
Sean

Sean,

The reason is the outbound ports are not open in the network, including 26257. I changed it to 8000 and it is working now.

Thanks.

Great, glad you were able to get it working!