# How to access ES from hosts other than localhost?

**URL:** <https://discuss.elastic.co/t/how-to-access-es-from-hosts-other-than-localhost/243513>\
**Category:** Elasticsearch\
**Created:** [August 3, 2020, 7:29am UTC](https://discuss.elastic.co/t/how-to-access-es-from-hosts-other-than-localhost/243513 "2020-08-03T07:29:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aj\_t](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Aj\_t](https://discuss.elastic.co/u/Aj_t)\
**Post date:** [August 3, 2020, 7:29am UTC](https://discuss.elastic.co/t/how-to-access-es-from-hosts-other-than-localhost/243513/1 "2020-08-03T07:29:34Z")

</div>

I just have one node where I am running ES and Kibana. In addition to the localhost, I would like to access ES from another host ( **remote\_ip1** ) as well. But, I would like to avoid setting the `network.host` to `0.0.0.0`. When I put just the 2 hosts I would like to access ES from, it is not starting.

Here's my current elasticsearch.yml:

```auto
 path.data: /var/lib/elasticsearch
 path.logs: /var/log/elasticsearch
 network.host: [localhost, remote_ip1]
 discovery.seed_hosts : []
 cluster.initial_master_nodes : []
 http.port: 9200

```

I am getting the following error:

```
[2020-08-03T01:56:42,689][ERROR][o.e.b.Bootstrap] [localhost] Exception
org.elasticsearch.transport.BindTransportException: Failed to bind to remote_ip1:[9300-9400]

```

What config changes do I need to make to the elasticsearch.yml to get this working?

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [August 3, 2020, 10:49am UTC](https://discuss.elastic.co/t/how-to-access-es-from-hosts-other-than-localhost/243513/2 "2020-08-03T10:49:09Z")

</div>

That is the 'listening' IP, either localhost or the machines IP or 0.0.0.0 (which is similar) - this is basic TCP/IP config, so for ANY other host to reach this one, set it to either the machine's IP or 0.0.0.0 - the effect is the same.

This is NOT the IP of the client, or other machine, etc. but of what IP the Elasticsearch node listens on - in the TCP world, this is an interface, either localhost/127.0.0.1, an interface IP, or 0.0.0.0 which is all interfaces (which in practice this is usually both localhost and the machine's IP).

So set to 0.0.0.0 and you're done; if you want to limit access to the one other host, use cloud security groups or iptables.

---

<div class="post-metadata">

**Author:** ![Aj\_t](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Aj\_t](https://discuss.elastic.co/u/Aj_t)\
**Post date:** [August 3, 2020, 11:09am UTC](https://discuss.elastic.co/t/how-to-access-es-from-hosts-other-than-localhost/243513/3 "2020-08-03T11:09:26Z")

</div>

Ah I see. I was under the impression that this was the client’s IP. Thanks for clearing that up.

Yeah, I’m already using UFW to manage the firewall.

---

<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:** [August 31, 2020, 11:09am UTC](https://discuss.elastic.co/t/how-to-access-es-from-hosts-other-than-localhost/243513/4 "2020-08-31T11:09:26Z")

</div>

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