# Publicly opening the elastic search ports

**URL:** <https://discuss.elastic.co/t/publicly-opening-the-elastic-search-ports/134353>\
**Category:** Beats\
**Created:** [June 4, 2018, 4:34am UTC](https://discuss.elastic.co/t/publicly-opening-the-elastic-search-ports/134353 "2018-06-04T04:34:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishnuduttpv](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vishnuduttpv](https://discuss.elastic.co/u/vishnuduttpv)\
**Post date:** [June 4, 2018, 4:34am UTC](https://discuss.elastic.co/t/publicly-opening-the-elastic-search-ports/134353/1 "2018-06-04T04:34:43Z")

</div>

Hi,  
I am having a reasonable number of servers in various geo locations. I am planning to install beats in those servers and to set a ELK setup as a core monitor server.  
So publicly opening a port will definitely increase the risk.  
What are the ways so that I can push the logs into my core server by minimizing the risks.  
Setting a VPN connection is the later part if nothing else works out!

Thanks In advance  
Regards  
Vishnu

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [June 4, 2018, 7:20pm UTC](https://discuss.elastic.co/t/publicly-opening-the-elastic-search-ports/134353/2 "2018-06-04T19:20:58Z")

</div>

If the clients are in completely different network then Elasticsearch, opening a port is probably the only solution. Also for a VPN you have to open a port.

If you have to open Elasticsearch to a public endpoint, make sure to use the Security features: [https://www.elastic.co/guide/en/x-pack/6.2/elasticsearch-security.html](https://www.elastic.co/guide/en/x-pack/6.2/elasticsearch-security.html)

---

<div class="post-metadata">

**Author:** ![vishnuduttpv](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vishnuduttpv](https://discuss.elastic.co/u/vishnuduttpv)\
**Post date:** [June 7, 2018, 7:46am UTC](https://discuss.elastic.co/t/publicly-opening-the-elastic-search-ports/134353/3 "2018-06-07T07:46:50Z")

</div>

Hi,  
Thankyou ruflin for the response!  
The clients are completely in a different network. The plan for the VPN was the last option if there is not much risk while opening the ES port publicly.  
Thanks

---

<div class="post-metadata">

**Author:** ![Sjaak01](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Sjaak01](https://discuss.elastic.co/u/Sjaak01)\
**Post date:** [June 8, 2018, 6:05am UTC](https://discuss.elastic.co/t/publicly-opening-the-elastic-search-ports/134353/4 "2018-06-08T06:05:54Z")

</div>

Is there a firewall between your internet connection and the elastic server?

If you have a firewall and only allow the IPs of your remote locations to connect on Elastic's port then that should be reasonably safe.

If you don't have a firewall or allow "all" IPs to connect, well that is just asking for problems. Besides the security risks, just think of the fun you could have if you find a open elasticsearch server...

But you should really set up a VPN and a firewall if you care about security at all.

---

<div class="post-metadata">

**Author:** ![vishnuduttpv](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vishnuduttpv](https://discuss.elastic.co/u/vishnuduttpv)\
**Post date:** [June 11, 2018, 4:36am UTC](https://discuss.elastic.co/t/publicly-opening-the-elastic-search-ports/134353/5 "2018-06-11T04:36:25Z")

</div>

Hi,  
Thankyou Sjaak!  
Yes we do have a proxy in front of of my ES server. But the beats clients may be having different IP s for different situations. Different IP in the sense that the IP will vary based on locations. So providing an IP based restriction will be a burden.  
Yes, now if there us no way down, we will be looking out for the VPN connectivity!  
Thanks  
Vishnu

---

<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:** [July 9, 2018, 6:36am UTC](https://discuss.elastic.co/t/publicly-opening-the-elastic-search-ports/134353/6 "2018-07-09T06:36:37Z")

</div>

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