ElasticSearch cluster nodes joining

While trying to call this api http://40.112.149.76:9200/_nodes/settings?pretty we were getting all the nodes in the cluster.

Then we have created the IPAddress for all the master nodes and have set the private IpAddress in the unicast discovery and network.host for all the VMs. After doing this while calling the above api we are unable to join the nodes.

This issue got resolved after allowing the port 9300