# Network.publish\_host does not seem to do what it says it does

**URL:** <https://discuss.elastic.co/t/network-publish-host-does-not-seem-to-do-what-it-says-it-does/17055>\
**Category:** Elasticsearch\
**Created:** [April 16, 2014, 10:28pm UTC](https://discuss.elastic.co/t/network-publish-host-does-not-seem-to-do-what-it-says-it-does/17055 "2014-04-16T22:28:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![OJ\_LaBoeuf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oj_laboeuf/32/1638_2.png) [@OJ\_LaBoeuf](https://discuss.elastic.co/u/OJ_LaBoeuf)\
**Post date:** [April 16, 2014, 10:28pm UTC](https://discuss.elastic.co/t/network-publish-host-does-not-seem-to-do-what-it-says-it-does/17055/1 "2014-04-16T22:28:24Z")

</div>

I'm trying to bind the API to 127.0.0.1 and use the apache reverse proxy  
settings with kibana to talk to ES. This works as I expected.

However, I need to bind the inter-cluster communication to a real IP  
address, supposedly with network.publish\_host, but this does not work.  
Both bind to 127.0.0.1

Running from the latest deb package, on ubuntu 12.04

from /etc/elasticsearch/elasticsearch.yaml

network.bind\_host: 127.0.0.1  
network.publish\_host: my.redacted.ip.address

netstat -an | grep 9300  
tcp 0 0 127.0.0.1:9300 0.0.0.0:\* LISTEN

netstat -an | grep 9200  
tcp 0 0 127.0.0.1:9200 0.0.0.0:\* LISTEN

this is a major deal as I do not want to bind the api directly to a  
routable interface.

from the docs:

The network.bind\_host setting allows to control the host different network  
components will bind on. By default, the bind host will be anyLocalAddress  
(typically 0.0.0.0 or ::0).

The network.publish\_host setting allows to control the host the node will  
publish itself within the cluster so other nodes will be able to connect to  
it. Of course, this can’t be the anyLocalAddress, and by default, it will  
be the first non loopback address (if possible), or the local address.

The network.host setting is a simple setting to automatically set both  
network.bind\_host and network.publish\_host to the same host value.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 16, 2014, 11:20pm UTC](https://discuss.elastic.co/t/network-publish-host-does-not-seem-to-do-what-it-says-it-does/17055/2 "2014-04-16T23:20:03Z")

</div>

As far as I am aware you can't split the two, they both need to be on the  
same interface/IP.  
I don't know if this is a bug or if the docs are incorrect.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 17 April 2014 08:28, OJ LaBoeuf [orangepeelbeef@gmail.com](mailto:orangepeelbeef@gmail.com) wrote:

> I'm trying to bind the API to 127.0.0.1 and use the apache reverse proxy  
> settings with kibana to talk to ES. This works as I expected.
> 
> However, I need to bind the inter-cluster communication to a real IP  
> address, supposedly with network.publish\_host, but this does not work.  
> Both bind to 127.0.0.1
> 
> Running from the latest deb package, on ubuntu 12.04
> 
> from /etc/elasticsearch/elasticsearch.yaml
> 
> network.bind\_host: 127.0.0.1  
> network.publish\_host: my.redacted.ip.address
> 
> netstat -an | grep 9300  
> tcp 0 0 127.0.0.1:9300 0.0.0.0:\*  
> LISTEN
> 
> netstat -an | grep 9200  
> tcp 0 0 127.0.0.1:9200 0.0.0.0:\*  
> LISTEN
> 
> this is a major deal as I do not want to bind the api directly to a  
> routable interface.
> 
> from the docs:
> 
> The network.bind\_host setting allows to control the host different  
> network components will bind on. By default, the bind host will be  
> anyLocalAddress (typically 0.0.0.0 or ::0).
> 
> The network.publish\_host setting allows to control the host the node will  
> publish itself within the cluster so other nodes will be able to connect to  
> it. Of course, this can't be the anyLocalAddress, and by default, it will  
> be the first non loopback address (if possible), or the local address.
> 
> The network.host setting is a simple setting to automatically set both  
> network.bind\_host and network.publish\_host to the same host value.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624ZP-\_h720RhceosOs%2B1mjKByxYa1gSP\_hv%3DzeYfSx4FKg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZP-_h720RhceosOs%2B1mjKByxYa1gSP_hv%3DzeYfSx4FKg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![OJ\_LaBoeuf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oj_laboeuf/32/1638_2.png) [@OJ\_LaBoeuf](https://discuss.elastic.co/u/OJ_LaBoeuf)\
**Post date:** [April 17, 2014, 6:23am UTC](https://discuss.elastic.co/t/network-publish-host-does-not-seem-to-do-what-it-says-it-does/17055/3 "2014-04-17T06:23:53Z")

</div>

That doesn't make a lot of sense then. Why would you be able to set the  
publish host to something different if they both have to bind to the same  
interface? I'm not understanding what the purpose of these configuration  
bits is. I was also told in the IRC room that this was how you separated  
them a while back...

I can't really believe that nobody else has run into this? Why would you  
want to bind your zero security direct access api to a routable layer 3  
address if you don't have to?

Kibana proxypass config is also set to use 127.0.0.1 as its bind, is it  
then expected that there is no cluster capability whatsoever?

The only alternative I can think of is to bind it on 0.0.0.0 and then rely  
on host based firewall to only allow connection via 127.0.0.1 for 9200 and  
l3 ip for 9300, but this seems like something the app should be able to do.

On Wednesday, April 16, 2014 4:20:03 PM UTC-7, Mark Walkom wrote:

> As far as I am aware you can't split the two, they both need to be on the  
> same interface/IP.  
> I don't know if this is a bug or if the docs are incorrect.
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com) \<javascript:\>  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 17 April 2014 08:28, OJ LaBoeuf \<[orangep...@gmail.com](mailto:orangep...@gmail.com) \<javascript:\>\>wrote:
> 
> > I'm trying to bind the API to 127.0.0.1 and use the apache reverse proxy  
> > settings with kibana to talk to ES. This works as I expected.
> > 
> > However, I need to bind the inter-cluster communication to a real IP  
> > address, supposedly with network.publish\_host, but this does not work.  
> > Both bind to 127.0.0.1
> > 
> > Running from the latest deb package, on ubuntu 12.04
> > 
> > from /etc/elasticsearch/elasticsearch.yaml
> > 
> > network.bind\_host: 127.0.0.1  
> > network.publish\_host: my.redacted.ip.address
> > 
> > netstat -an | grep 9300  
> > tcp 0 0 127.0.0.1:9300 0.0.0.0:\*  
> > LISTEN
> > 
> > netstat -an | grep 9200  
> > tcp 0 0 127.0.0.1:9200 0.0.0.0:\*  
> > LISTEN
> > 
> > this is a major deal as I do not want to bind the api directly to a  
> > routable interface.
> > 
> > from the docs:
> > 
> > The network.bind\_host setting allows to control the host different  
> > network components will bind on. By default, the bind host will be  
> > anyLocalAddress (typically 0.0.0.0 or ::0).
> > 
> > The network.publish\_host setting allows to control the host the node  
> > will publish itself within the cluster so other nodes will be able to  
> > connect to it. Of course, this can’t be the anyLocalAddress, and by  
> > default, it will be the first non loopback address (if possible), or the  
> > local address.
> > 
> > The network.host setting is a simple setting to automatically set both  
> > network.bind\_host and network.publish\_host to the same host value.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4a10c90b-4069-46bf-ad6b-fa41cadaeea1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4a10c90b-4069-46bf-ad6b-fa41cadaeea1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 17, 2014, 7:29am UTC](https://discuss.elastic.co/t/network-publish-host-does-not-seem-to-do-what-it-says-it-does/17055/4 "2014-04-17T07:29:16Z")

</div>

The notes I recorded from the ES training I did a while back are my source,  
but I may be wrong.  
Hopefully someone else can clarify or confirm.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 17 April 2014 16:23, OJ LaBoeuf [orangepeelbeef@gmail.com](mailto:orangepeelbeef@gmail.com) wrote:

> That doesn't make a lot of sense then. Why would you be able to set the  
> publish host to something different if they both have to bind to the same  
> interface? I'm not understanding what the purpose of these configuration  
> bits is. I was also told in the IRC room that this was how you separated  
> them a while back...
> 
> I can't really believe that nobody else has run into this? Why would you  
> want to bind your zero security direct access api to a routable layer 3  
> address if you don't have to?
> 
> Kibana proxypass config is also set to use 127.0.0.1 as its bind, is it  
> then expected that there is no cluster capability whatsoever?
> 
> The only alternative I can think of is to bind it on 0.0.0.0 and then  
> rely on host based firewall to only allow connection via 127.0.0.1 for 9200  
> and l3 ip for 9300, but this seems like something the app should be able  
> to do.
> 
> On Wednesday, April 16, 2014 4:20:03 PM UTC-7, Mark Walkom wrote:
> 
> > As far as I am aware you can't split the two, they both need to be on the  
> > same interface/IP.  
> > I don't know if this is a bug or if the docs are incorrect.
> > 
> > Regards,  
> > Mark Walkom
> > 
> > Infrastructure Engineer  
> > Campaign Monitor  
> > email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com)  
> > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > 
> > On 17 April 2014 08:28, OJ LaBoeuf [orangep...@gmail.com](mailto:orangep...@gmail.com) wrote:
> > 
> > > I'm trying to bind the API to 127.0.0.1 and use the apache reverse  
> > > proxy settings with kibana to talk to ES. This works as I expected.
> > > 
> > > However, I need to bind the inter-cluster communication to a real IP  
> > > address, supposedly with network.publish\_host, but this does not work.  
> > > Both bind to 127.0.0.1
> > > 
> > > Running from the latest deb package, on ubuntu 12.04
> > > 
> > > from /etc/elasticsearch/elasticsearch.yaml
> > > 
> > > network.bind\_host: 127.0.0.1  
> > > network.publish\_host: my.redacted.ip.address
> > > 
> > > netstat -an | grep 9300  
> > > tcp 0 0 127.0.0.1:9300 0.0.0.0:\*  
> > > LISTEN
> > > 
> > > netstat -an | grep 9200  
> > > tcp 0 0 127.0.0.1:9200 0.0.0.0:\*  
> > > LISTEN
> > > 
> > > this is a major deal as I do not want to bind the api directly to a  
> > > routable interface.
> > > 
> > > from the docs:
> > > 
> > > The network.bind\_host setting allows to control the host different  
> > > network components will bind on. By default, the bind host will be  
> > > anyLocalAddress (typically 0.0.0.0 or ::0).
> > > 
> > > The network.publish\_host setting allows to control the host the node  
> > > will publish itself within the cluster so other nodes will be able to  
> > > connect to it. Of course, this can't be the anyLocalAddress, and by  
> > > default, it will be the first non loopback address (if possible), or the  
> > > local address.
> > > 
> > > The network.host setting is a simple setting to automatically set both  
> > > network.bind\_host and network.publish\_host to the same host value.
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).
> > > 
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%  
> > > [40googlegroups.com](http://40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/4a10c90b-4069-46bf-ad6b-fa41cadaeea1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4a10c90b-4069-46bf-ad6b-fa41cadaeea1%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/4a10c90b-4069-46bf-ad6b-fa41cadaeea1%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/4a10c90b-4069-46bf-ad6b-fa41cadaeea1%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624bzaMWgajKcYQS90E1Wn0JqNgJi687HodYiphOO-F3Fbg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624bzaMWgajKcYQS90E1Wn0JqNgJi687HodYiphOO-F3Fbg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [April 17, 2014, 7:42am UTC](https://discuss.elastic.co/t/network-publish-host-does-not-seem-to-do-what-it-says-it-does/17055/5 "2014-04-17T07:42:44Z")

</div>

Due to limitations of TCP/IP server socket bind, you can do the following:

- just use network.host to configure an IP address. This is the most common  
case.

- use network.bind\_host to a single internal IP address and  
network.publish\_host to a single external IP address on the same(!) network  
interface (also known as virtual IP address). ES uses the "bind all"  
address as a fall back if the bind fails.

- use the "bind all" address = 0.0.0.0 (or IPv6 ::1) for network.host if  
you want to use different (=all) network interfaces you want ES to listen on

The name "publish\_host" is a bit unfortunate. This is not a second IP  
address on another interface.

Jörg

On Thu, Apr 17, 2014 at 12:28 AM, OJ LaBoeuf [orangepeelbeef@gmail.com](mailto:orangepeelbeef@gmail.com)wrote:

> I'm trying to bind the API to 127.0.0.1 and use the apache reverse proxy  
> settings with kibana to talk to ES. This works as I expected.
> 
> However, I need to bind the inter-cluster communication to a real IP  
> address, supposedly with network.publish\_host, but this does not work.  
> Both bind to 127.0.0.1
> 
> Running from the latest deb package, on ubuntu 12.04
> 
> from /etc/elasticsearch/elasticsearch.yaml
> 
> network.bind\_host: 127.0.0.1  
> network.publish\_host: my.redacted.ip.address
> 
> netstat -an | grep 9300  
> tcp 0 0 127.0.0.1:9300 0.0.0.0:\*  
> LISTEN
> 
> netstat -an | grep 9200  
> tcp 0 0 127.0.0.1:9200 0.0.0.0:\*  
> LISTEN
> 
> this is a major deal as I do not want to bind the api directly to a  
> routable interface.
> 
> from the docs:
> 
> The network.bind\_host setting allows to control the host different  
> network components will bind on. By default, the bind host will be  
> anyLocalAddress (typically 0.0.0.0 or ::0).
> 
> The network.publish\_host setting allows to control the host the node will  
> publish itself within the cluster so other nodes will be able to connect to  
> it. Of course, this can’t be the anyLocalAddress, and by default, it will  
> be the first non loopback address (if possible), or the local address.
> 
> The network.host setting is a simple setting to automatically set both  
> network.bind\_host and network.publish\_host to the same host value.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/632b4ca3-6dad-4476-9b35-a6806b9fc783%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFnEHJHaNOSDua6fO8%3DtrqyTYp%2BbFP%2B-CabZ1EGqM61PA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFnEHJHaNOSDua6fO8%3DtrqyTYp%2BbFP%2B-CabZ1EGqM61PA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![davmrtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davmrtl/32/3477_2.png) [@davmrtl](https://discuss.elastic.co/u/davmrtl)\
**Post date:** [November 18, 2015, 4:52pm UTC](https://discuss.elastic.co/t/network-publish-host-does-not-seem-to-do-what-it-says-it-does/17055/6 "2015-11-18T16:52:27Z")

</div>

The [doc of Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html) about `network.host` should be updated in order to reflect your three options.

I've spent a lot of time searching for "bind\_all" since Elasticsearch 2.0.

---

<div class="post-metadata">

**Author:** ![j16r](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/j16r/32/9676_2.png) [@j16r](https://discuss.elastic.co/u/j16r)\
**Post date:** [May 9, 2016, 10:32pm UTC](https://discuss.elastic.co/t/network-publish-host-does-not-seem-to-do-what-it-says-it-does/17055/7 "2016-05-09T22:32:15Z")

</div>

I've been trying this (as you suggested):

```
network.publish_host: _ec2:privateIpv4_
network.bind_host: 0.0.0.0

```

As I want to be able to `curl localhost:9200` as well as `curl http://mycluster.org:9200`, and it appears that if you set `bind_host` to `0.0.0.0` independent of `publish_host`, it'll advertise its address as `127.0.0.1` and then you'll get this:

> [2016-05-09 21:45:18,484][WARN][discovery.zen.ping.unicast] [client\_0] failed to send ping to [{#zen\_unicast\_1#}{127.0.0.1}{127.0.0.1:9300}]  
> SendRequestTransportException[[127.0.0.1:9300][internal:discovery/zen/unicast]]; nested: NodeNotConnectedException[[127.0.0.1:9300] Node not connected];

This doesn't really make any sense to me, I would expect `publish_host` to be the ip advertised to other elasticsearch instances, and `bind_host` only to affect how listen works.

Furthermore if you happen to configure your cluster this way, it seems totally stuck in this fashion!

---

<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 5, 2017, 10:52pm UTC](https://discuss.elastic.co/t/network-publish-host-does-not-seem-to-do-what-it-says-it-does/17055/8 "2017-07-05T22:52:55Z")

</div>


