# Network.host default isn't just localhost

**URL:** <https://discuss.elastic.co/t/network-host-default-isnt-just-localhost/66164>\
**Category:** Elasticsearch\
**Created:** [November 15, 2016, 8:10pm UTC](https://discuss.elastic.co/t/network-host-default-isnt-just-localhost/66164 "2016-11-15T20:10:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwink](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@bwink](https://discuss.elastic.co/u/bwink)\
**Post date:** [November 15, 2016, 8:10pm UTC](https://discuss.elastic.co/t/network-host-default-isnt-just-localhost/66164/1 "2016-11-15T20:10:15Z")

</div>

I read in the document that by default elasticsearch 5.0 only binds & publishes to localhost which is a good security posture; however using Debian, I have found that is not the case.

If I leave network.host blank, it binds & publishes to every IP on the machine.

I have three devices (eth0, loopback & tun0). I want to bind & publish to the tun0 and lo, but not the eth0 interface. I have found no way to do that. I can get it to bind to every interface/IP address or only bind to one specific IP or interface but not two and exclude the third.

I have a simple solution "IPTables"; however it seems from your documentation that it's been compiled to only use the localhost by default and that's not the case.

Bruce

---

<div class="post-metadata">

**Author:** ![xavierfacq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavierfacq/32/8744_2.png) [@xavierfacq](https://discuss.elastic.co/u/xavierfacq)\
**Post date:** [November 16, 2016, 10:30am UTC](https://discuss.elastic.co/t/network-host-default-isnt-just-localhost/66164/2 "2016-11-16T10:30:51Z")

</div>

Hi,

Can you provide your elasticsearch.yml configuration ?

Did you read :  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html)  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#network-interface-values](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#network-interface-values)

---

<div class="post-metadata">

**Author:** ![bwink](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@bwink](https://discuss.elastic.co/u/bwink)\
**Post date:** [November 23, 2016, 3:58pm UTC](https://discuss.elastic.co/t/network-host-default-isnt-just-localhost/66164/3 "2016-11-23T15:58:24Z")

</div>

Hi Xavier,

Yes I did. That worked in 2.4 but on my debian box on 5.0 it didn't.

bmw

---

<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 21, 2016, 3:58pm UTC](https://discuss.elastic.co/t/network-host-default-isnt-just-localhost/66164/4 "2016-12-21T15:58:27Z")

</div>

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