# Listen on \_local\_ and \_ec2\_

**URL:** <https://discuss.elastic.co/t/listen-on--local--and--ec2-/39534>\
**Category:** Elasticsearch\
**Created:** [January 19, 2016, 11:09am UTC](https://discuss.elastic.co/t/listen-on--local--and--ec2-/39534 "2016-01-19T11:09:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgvarley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mgvarley/32/687_2.png) [@mgvarley](https://discuss.elastic.co/u/mgvarley)\
**Post date:** [January 19, 2016, 11:09am UTC](https://discuss.elastic.co/t/listen-on--local--and--ec2-/39534/1 "2016-01-19T11:09:26Z")

</div>

Hi - I am just in the process of moving from 1.7 to 2.1. I am using AWS to run my ES instances and have separate VPC networks setup for production and staging. I have my ES instances sitting behind an Elastic load-balancer but typically SSH onto the boxes and run sensitive commands against localhost. With the default settings my instance was only binding to localhost and so was not joining the load balancer. I set:

`network.host: _ec2_`

...in elasticsearch.yml and the instances were picked up by the load balancer but I could no longer run localhost calls on the box. I have tried the following in my config:

`network.bind\_host:

- _local_
- _ec2_  
network.publish\_host: _ec2_`

...but this puts me back where I was before, bound to localhost but not accessible by the load balancer health check.

How can I configure Elasticsearch 2.1 to behave as 1.7 in this respect?

Thanks in advance for any advice, I have spent the last couple of hours on this and trawling the forums but appear to be stuck.

Thanks,

Mark

---

<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:** [January 19, 2016, 11:33am UTC](https://discuss.elastic.co/t/listen-on--local--and--ec2-/39534/2 "2016-01-19T11:33:35Z")

</div>

Support for multiple addresses will be added in 2.2.0. See [https://github.com/elastic/elasticsearch/pull/13954](https://github.com/elastic/elasticsearch/pull/13954)

For now, on the localhost you have to use the `_ec2_` ip address as well.

See also [ES 2.1 only bind on localhost](https://discuss.elastic.co/t/es-2-1-only-bind-on-localhost/36720)

---

<div class="post-metadata">

**Author:** ![mgvarley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mgvarley/32/687_2.png) [@mgvarley](https://discuss.elastic.co/u/mgvarley)\
**Post date:** [January 19, 2016, 1:23pm UTC](https://discuss.elastic.co/t/listen-on--local--and--ec2-/39534/3 "2016-01-19T13:23:08Z")

</div>

Thanks very much David, would be great to have this feature, look forward to 2.2

---

<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:23pm UTC](https://discuss.elastic.co/t/listen-on--local--and--ec2-/39534/4 "2017-07-05T23:23:29Z")

</div>


