# Binding to Public / Private IPs

**URL:** <https://discuss.elastic.co/t/binding-to-public-private-ips/15570>\
**Category:** Elasticsearch\
**Created:** [February 3, 2014, 8:07pm UTC](https://discuss.elastic.co/t/binding-to-public-private-ips/15570 "2014-02-03T20:07:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/olu/32/1825_2.png) [@Olu](https://discuss.elastic.co/u/Olu)\
**Post date:** [February 3, 2014, 8:07pm UTC](https://discuss.elastic.co/t/binding-to-public-private-ips/15570/1 "2014-02-03T20:07:35Z")

</div>

ElasticSearch noob here.

How do I specify the IP address that ES binds to??

I have an EC2 instance that runs ES on it. curling localhost:9200 on that  
machine provides me with ES data. However, trying to query ES using the  
public IP address of the EC2 instance (curl  
http://\<public\_ip\_address\>:9200/\_search?...), this does not work.

I have turned off all firewalls on the server. iptables and ip6tables have  
all been turned on. Port 9200 and 9300 (default ports ES uses) are also  
open.

Taking a look at the logs, I can see the ES binds to the private IP address  
of the ec2 instance when starting up. I've tried changing the network  
bind\_host, publish\_host variables to the explicit public IP address but ES  
still binds to the private IP address when starting.

I'm not sure what else to try. Trying to set up Kibana fails with this  
setup, b/c even though KIbana and ES are on the same server, Kibana is  
using the the url http://\<public\_ip\_address\>:9200 to try to connect to ES  
but it cannot connect using that url.

There might be an easy solution to this but any help in solving this would  
be greatly appreciated.

Thanks!!

--  
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/1f74bfc7-2784-4053-8944-4a1048a2a04e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1f74bfc7-2784-4053-8944-4a1048a2a04e%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [February 3, 2014, 9:04pm UTC](https://discuss.elastic.co/t/binding-to-public-private-ips/15570/2 "2014-02-03T21:04:35Z")

</div>

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

help

Regards,  
Mark Walkom

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

On 4 February 2014 07:07, Olu [oowoseni@gmail.com](mailto:oowoseni@gmail.com) wrote:

> Elasticsearch noob here.
> 
> How do I specify the IP address that ES binds to??
> 
> I have an EC2 instance that runs ES on it. curling localhost:9200 on that  
> machine provides me with ES data. However, trying to query ES using the  
> public IP address of the EC2 instance (curl http://\<public\_ip\_address\>:9200/\_search?...),  
> this does not work.
> 
> I have turned off all firewalls on the server. iptables and ip6tables have  
> all been turned on. Port 9200 and 9300 (default ports ES uses) are also  
> open.
> 
> Taking a look at the logs, I can see the ES binds to the private IP  
> address of the ec2 instance when starting up. I've tried changing the  
> network bind\_host, publish\_host variables to the explicit public IP address  
> but ES still binds to the private IP address when starting.
> 
> I'm not sure what else to try. Trying to set up Kibana fails with this  
> setup, b/c even though KIbana and ES are on the same server, Kibana is  
> using the the url http://\<public\_ip\_address\>:9200 to try to connect to ES  
> but it cannot connect using that url.
> 
> There might be an easy solution to this but any help in solving this would  
> be greatly appreciated.
> 
> Thanks!!
> 
> --  
> 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/1f74bfc7-2784-4053-8944-4a1048a2a04e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1f74bfc7-2784-4053-8944-4a1048a2a04e%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAEM624bdPubFoBzn-rXdaCkPA8Er7J-zARMEVbBPLmSBCi\_bzw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624bdPubFoBzn-rXdaCkPA8Er7J-zARMEVbBPLmSBCi_bzw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Olu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/olu/32/1825_2.png) [@Olu](https://discuss.elastic.co/u/Olu)\
**Post date:** [February 3, 2014, 9:07pm UTC](https://discuss.elastic.co/t/binding-to-public-private-ips/15570/3 "2014-02-03T21:07:57Z")

</div>

I've tried taking a look at the network settings. I've even downloaded the  
cloud-aws plugin and tried changing the host settings to no avail.

On Monday, February 3, 2014 4:04:35 PM UTC-5, Mark Walkom wrote:

> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-network.htmlwill) help
> 
> 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 4 February 2014 07:07, Olu \<[oowo...@gmail.com](mailto:oowo...@gmail.com) \<javascript:\>\> wrote:
> 
> > Elasticsearch noob here.
> > 
> > How do I specify the IP address that ES binds to??
> > 
> > I have an EC2 instance that runs ES on it. curling localhost:9200 on that  
> > machine provides me with ES data. However, trying to query ES using the  
> > public IP address of the EC2 instance (curl  
> > http://\<public\_ip\_address\>:9200/\_search?...), this does not work.
> > 
> > I have turned off all firewalls on the server. iptables and ip6tables  
> > have all been turned on. Port 9200 and 9300 (default ports ES uses) are  
> > also open.
> > 
> > Taking a look at the logs, I can see the ES binds to the private IP  
> > address of the ec2 instance when starting up. I've tried changing the  
> > network bind\_host, publish\_host variables to the explicit public IP address  
> > but ES still binds to the private IP address when starting.
> > 
> > I'm not sure what else to try. Trying to set up Kibana fails with this  
> > setup, b/c even though KIbana and ES are on the same server, Kibana is  
> > using the the url http://\<public\_ip\_address\>:9200 to try to connect to ES  
> > but it cannot connect using that url.
> > 
> > There might be an easy solution to this but any help in solving this  
> > would be greatly appreciated.
> > 
> > Thanks!!
> > 
> > --  
> > 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/1f74bfc7-2784-4053-8944-4a1048a2a04e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1f74bfc7-2784-4053-8944-4a1048a2a04e%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/ea6c73b3-8b7a-4b8d-a417-2d0461f220e2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ea6c73b3-8b7a-4b8d-a417-2d0461f220e2%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Tony\_Su](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Tony\_Su](https://discuss.elastic.co/u/Tony_Su)\
**Post date:** [February 3, 2014, 10:00pm UTC](https://discuss.elastic.co/t/binding-to-public-private-ips/15570/4 "2014-02-03T22:00:57Z")

</div>

Although I haven't tried to configure what you asked about, I am interested.  
Based on the link Mark posted,  
Did you uncomment and try to configure the settings in  
/etc/elasticsearch/elasticsearch.yml ?

If I understand the documentation correctly, that is what you likely need  
to do if you don't use the plugin.

Tony

On Monday, February 3, 2014 1:07:57 PM UTC-8, Tom Jackson wrote:

> I've tried taking a look at the network settings. I've even downloaded the  
> cloud-aws plugin and tried changing the host settings to no avail.
> 
> On Monday, February 3, 2014 4:04:35 PM UTC-5, Mark Walkom wrote:
> 
> > [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-network.htmlwill](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-network.htmlwill) help
> > 
> > Regards,  
> > Mark Walkom
> > 
> > Infrastructure Engineer  
> > Campaign Monitor  
> > email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com)  
> > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > 
> > On 4 February 2014 07:07, Olu [oowo...@gmail.com](mailto:oowo...@gmail.com) wrote:
> > 
> > > Elasticsearch noob here.
> > > 
> > > How do I specify the IP address that ES binds to??
> > > 
> > > I have an EC2 instance that runs ES on it. curling localhost:9200 on  
> > > that machine provides me with ES data. However, trying to query ES using  
> > > the public IP address of the EC2 instance (curl  
> > > http://\<public\_ip\_address\>:9200/\_search?...), this does not work.
> > > 
> > > I have turned off all firewalls on the server. iptables and ip6tables  
> > > have all been turned on. Port 9200 and 9300 (default ports ES uses) are  
> > > also open.
> > > 
> > > Taking a look at the logs, I can see the ES binds to the private IP  
> > > address of the ec2 instance when starting up. I've tried changing the  
> > > network bind\_host, publish\_host variables to the explicit public IP address  
> > > but ES still binds to the private IP address when starting.
> > > 
> > > I'm not sure what else to try. Trying to set up Kibana fails with this  
> > > setup, b/c even though KIbana and ES are on the same server, Kibana is  
> > > using the the url http://\<public\_ip\_address\>:9200 to try to connect to ES  
> > > but it cannot connect using that url.
> > > 
> > > There might be an easy solution to this but any help in solving this  
> > > would be greatly appreciated.
> > > 
> > > Thanks!!
> > > 
> > > --  
> > > 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/msgid/elasticsearch/1f74bfc7-2784-4053-8944-4a1048a2a04e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1f74bfc7-2784-4053-8944-4a1048a2a04e%40googlegroups.com)  
> > > .  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/7d0a95af-8b20-4ce7-a681-b36967d7ff0a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7d0a95af-8b20-4ce7-a681-b36967d7ff0a%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 1:53am UTC](https://discuss.elastic.co/t/binding-to-public-private-ips/15570/5 "2017-07-06T01:53:03Z")

</div>


