# 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:** 1\
**Showing post:** 2

<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.

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-available-on-internal-and-public-ip/257170)._
