# ES 2.0 network config options

**URL:** <https://discuss.elastic.co/t/es-2-0-network-config-options/33396>\
**Category:** Elasticsearch\
**Created:** [October 30, 2015, 4:02pm UTC](https://discuss.elastic.co/t/es-2-0-network-config-options/33396 "2015-10-30T16:02:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_KITHEN](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@Brian\_KITHEN](https://discuss.elastic.co/u/Brian_KITHEN)\
**Post date:** [October 30, 2015, 4:02pm UTC](https://discuss.elastic.co/t/es-2-0-network-config-options/33396/1 "2015-10-30T16:02:55Z")

</div>

Hello,  
I just upgraded ES to the latest version using the debian package.

I tried to run ES 2.0 with the new `elasticsearch.yml` file, containing less options than the config file of ES 1.7.3. I set the `network.bind_host: _eth0_` to listen for HTTP on eth0 and `network.publish_host: _eth1_` for communication between nodes. But I can't get a different IP for listening on each port (9200 and 9300). Only one IP is listening on both ports.

I also made many tries with the `network.host` option.

In a nutshell, the config file from the previous version (ES 1.7.3) isn't compatible.  
Am I missing something ?

(This doc was used [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html))

---

<div class="post-metadata">

**Author:** ![jhnlsn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jhnlsn/32/5603_2.png) [@jhnlsn](https://discuss.elastic.co/u/jhnlsn)\
**Post date:** [October 30, 2015, 5:34pm UTC](https://discuss.elastic.co/t/es-2-0-network-config-options/33396/2 "2015-10-30T17:34:26Z")

</div>

If you want to enable the behavior that you would expect with the 1.x version of ES then you need to set network.host: 0.0.0.0

At which point ES will be available at any of the IP addresses including loopback and public.

---

<div class="post-metadata">

**Author:** ![jhnlsn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jhnlsn/32/5603_2.png) [@jhnlsn](https://discuss.elastic.co/u/jhnlsn)\
**Post date:** [October 30, 2015, 5:35pm UTC](https://discuss.elastic.co/t/es-2-0-network-config-options/33396/3 "2015-10-30T17:35:33Z")

</div>

I don't fully understand all the bind and publish host configuration, so until then I've just bound it to all available IP's this way.

---

<div class="post-metadata">

**Author:** ![json](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/json/32/4125_2.png) [@json](https://discuss.elastic.co/u/json)\
**Post date:** [October 31, 2015, 4:57am UTC](https://discuss.elastic.co/t/es-2-0-network-config-options/33396/4 "2015-10-31T04:57:01Z")

</div>

You just need `network.bind_host: 0`. Filed issue [https://github.com/elastic/docs/issues/48](https://github.com/elastic/docs/issues/48).

---

<div class="post-metadata">

**Author:** ![Brian\_KITHEN](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@Brian\_KITHEN](https://discuss.elastic.co/u/Brian_KITHEN)\
**Post date:** [November 2, 2015, 9:59am UTC](https://discuss.elastic.co/t/es-2-0-network-config-options/33396/5 "2015-11-02T09:59:43Z")

</div>

Thanks for the answers.  
I had to set those two options so it could do what we needed:

```
network.bind_host: 0.0.0.0

network.publish_host: _eth1_
```

---

<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:** [November 2, 2015, 10:47am UTC](https://discuss.elastic.co/t/es-2-0-network-config-options/33396/6 "2015-11-02T10:47:36Z")

</div>

@Brian_KITHEN you should be aware that you also open the loopback device. A more safe configuration to restrict ES to a NIC would be

```auto
network.bind_host: "_eth1_" 
network.publish_host: "_eth1_"

```

which is (surprisingly) different from

```auto
network.host: "_eth1_" 

```

which also binds to `0.0.0.0`

---

<div class="post-metadata">

**Author:** ![Brian\_KITHEN](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@Brian\_KITHEN](https://discuss.elastic.co/u/Brian_KITHEN)\
**Post date:** [November 2, 2015, 11:08am UTC](https://discuss.elastic.co/t/es-2-0-network-config-options/33396/7 "2015-11-02T11:08:57Z")

</div>

I need my nodes to listen on port 9300 with there private IP, which is on eth1.

So, ideally, I would like to have 9200 binded to eth0 (Public IP) and 9300 to eth1, without opening any loopback for both ports. I tried many times but couldn't get the perfect configuration.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 2, 2015, 11:22am UTC](https://discuss.elastic.co/t/es-2-0-network-config-options/33396/8 "2015-11-02T11:22:37Z")

</div>

May be change `transport.host` in that case [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html#\_tcp\_transport?q=transport](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-transport.html#_tcp_transport?q=transport) hosts

And `http.host` with [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html)

---

<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, 11:41pm UTC](https://discuss.elastic.co/t/es-2-0-network-config-options/33396/9 "2017-07-05T23:41:18Z")

</div>


