# Elasticsearch 7.5.2 Cluster on EC2: Security Group

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-5-2-cluster-on-ec2-security-group/217481>\
**Category:** Elasticsearch\
**Created:** [February 1, 2020, 4:40am UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-cluster-on-ec2-security-group/217481 "2020-02-01T04:40:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ckough](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ckough/32/61892_2.png) [@ckough](https://discuss.elastic.co/u/ckough)\
**Post date:** [February 1, 2020, 4:40am UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-cluster-on-ec2-security-group/217481/1 "2020-02-01T04:40:19Z")

</div>

Hi There,

I'm testing out a 3 x ES Node cluster on EC2. When I set my Security Group to inbound allow all (outbound is allow all in all cases), the cluster has no issue.

But when I set a new SG to allow inbound 9200, 9300, 22, 443, 80 from ANY source (0.0.0.0/0) and use it on 1 of the nodes, that node becomes disconnected with the rest of the cluster.

When i add a new rule to allow inbound any port from the any of the 3 nodes into the SG, the affected node can now join the cluster again.

Are there any additional ports I need to allow inbound for an EC2 ES cluster?

Thanks in advance!  
CK

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 1, 2020, 8:13am UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-cluster-on-ec2-security-group/217481/2 "2020-02-01T08:13:22Z")

</div>

By default Elasticsearch nodes communicate with each other on port 9300, but maybe you're not using the default config.

When the node disconnects from the cluster, it will likely log some useful details. Can you share the logs? Look in particular for messages from the `ClusterFormationFailureHelper`.

---

<div class="post-metadata">

**Author:** ![ckough](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ckough/32/61892_2.png) [@ckough](https://discuss.elastic.co/u/ckough)\
**Post date:** [February 1, 2020, 11:09am UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-cluster-on-ec2-security-group/217481/3 "2020-02-01T11:09:15Z")

</div>

Strangely when I took out the rules and put them back again, it works. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 29, 2020, 11:09am UTC](https://discuss.elastic.co/t/elasticsearch-7-5-2-cluster-on-ec2-security-group/217481/4 "2020-02-29T11:09:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
