# Elasticsearch URL not accessible outside of the server publicly

**URL:** <https://discuss.elastic.co/t/elasticsearch-url-not-accessible-outside-of-the-server-publicly/96044>\
**Category:** Elasticsearch\
**Created:** [August 7, 2017, 5:40am UTC](https://discuss.elastic.co/t/elasticsearch-url-not-accessible-outside-of-the-server-publicly/96044 "2017-08-07T05:40:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bishwadeep\_Kc](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@Bishwadeep\_Kc](https://discuss.elastic.co/u/Bishwadeep_Kc)\
**Post date:** [August 7, 2017, 5:40am UTC](https://discuss.elastic.co/t/elasticsearch-url-not-accessible-outside-of-the-server-publicly/96044/1 "2017-08-07T05:40:49Z")

</div>

## Hi there, I installed elasticsearch following the article on [https://www.howtoforge.com/tutorial/how-to-install-elastic-stack-on-ubuntu-16-04/](https://www.howtoforge.com/tutorial/how-to-install-elastic-stack-on-ubuntu-16-04/). I manage to run it successfully on my local machine because I was accessing it from my local environment. I have installed it on my dev server and I want to access it from another server. I can access it with localhost:9200 in my dev server but not from outside the server. I tried updating the elasticsearch.yml file with following settings:

## bootstrap.mlockall: true network.host: 0.0.0.0 http.port: 9200

Enabled port 9200 to be accessed publicly with "ufw enable"  
sudo netstat -plnt shows the port is listening.  
But still I am not able to access the URL publicly.  
Can you please suggest me what I need to do to make it work?

Thank you,  
Bishwadeep KC

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 7, 2017, 6:54am UTC](https://discuss.elastic.co/t/elasticsearch-url-not-accessible-outside-of-the-server-publicly/96044/2 "2017-08-07T06:54:22Z")

</div>

Can you show your elasticsearch logs?

---

<div class="post-metadata">

**Author:** ![Bishwadeep\_Kc](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@Bishwadeep\_Kc](https://discuss.elastic.co/u/Bishwadeep_Kc)\
**Post date:** [August 8, 2017, 1:21am UTC](https://discuss.elastic.co/t/elasticsearch-url-not-accessible-outside-of-the-server-publicly/96044/3 "2017-08-08T01:21:05Z")

</div>

Hi David,  
There were not any errors in the log file (only stopping.. closing.. starting). The service restart works completely fine. I was able to access the localhost:9200 from the server.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 8, 2017, 3:50am UTC](https://discuss.elastic.co/t/elasticsearch-url-not-accessible-outside-of-the-server-publicly/96044/4 "2017-08-08T03:50:41Z")

</div>

I'm not looking for errors. I'm looking for your logs.

---

<div class="post-metadata">

**Author:** ![poojagupta](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@poojagupta](https://discuss.elastic.co/u/poojagupta)\
**Post date:** [August 8, 2017, 9:21am UTC](https://discuss.elastic.co/t/elasticsearch-url-not-accessible-outside-of-the-server-publicly/96044/5 "2017-08-08T09:21:25Z")

</div>

Hi Bishwadeep,

Can you access the URL with IP of your node on which elastic search is installed outside of local server?  
Please share your /etc/hosts file snapshot.

For accessing the elasticsearch URL outside of local server you have to make some changes in hosts file.

---

<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:** [September 5, 2017, 9:21am UTC](https://discuss.elastic.co/t/elasticsearch-url-not-accessible-outside-of-the-server-publicly/96044/6 "2017-09-05T09:21:28Z")

</div>

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