# Elasticsearch available on internal and public ip

**URL:** <https://discuss.elastic.co/t/elasticsearch-available-on-internal-and-public-ip/257170>\
**Category:** Elasticsearch\
**Created:** [December 1, 2020, 8:16am UTC](https://discuss.elastic.co/t/elasticsearch-available-on-internal-and-public-ip/257170 "2020-12-01T08:16:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bertram\_van\_de\_Ven](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bertram_van_de_ven/32/79988_2.png) [@Bertram\_van\_de\_Ven](https://discuss.elastic.co/u/Bertram_van_de_Ven)\
**Post date:** [December 1, 2020, 8:16am UTC](https://discuss.elastic.co/t/elasticsearch-available-on-internal-and-public-ip/257170/1 "2020-12-01T08:16:37Z")

</div>

We have an ElasticSearch cluster running, it's local (company network) available and everything works. And I also made each node available on an external ip by configuring the `network.bind_host` on localhost, local and public ip.

What isn't working is the SniffingConnectionPool, I get a PingFailure error when I configure the external ip's. Sniffing on the local ip's is working as expected. I think the reason for that is the publish\_address (I see that when I request `GET _nodes/http,settings` ) is always the local ip adress, even when I call the external ip.

So my question is how do I make the publish\_address working for the local AND public ip? Is it "only" adding the external ip(s) to the `discovery.zen.ping.unicast.hosts` ?

---

<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:** [December 1, 2020, 8:32am UTC](https://discuss.elastic.co/t/elasticsearch-available-on-internal-and-public-ip/257170/2 "2020-12-01T08:32:57Z")

</div>

I don't think this is possible, a node can only have one HTTP publish address so you must choose which one you want.

Rather than using sniffing, can you set up DNS and use a `StaticConnectionPool`?

Also note that you [shouldn't expose Elasticsearch to the public internet](https://discuss.elastic.co/t/is-it-safe-to-expose-elasticsearch-to-the-internet/247041).

> [@Bertram\_van\_de\_Ven](#):
>
> Is it "only" adding the external ip(s) to the `discovery.zen.ping.unicast.hosts` ?

This setting is purely about nodes in the cluster discovering each other. It has no bearing on anything to do with HTTP.

---

<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:** [December 29, 2020, 8:32am UTC](https://discuss.elastic.co/t/elasticsearch-available-on-internal-and-public-ip/257170/3 "2020-12-29T08:32:57Z")

</div>

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