# Accessing Port 9200 Remotely

**URL:** <https://discuss.elastic.co/t/accessing-port-9200-remotely/21840>\
**Category:** Elasticsearch\
**Created:** [January 26, 2015, 10:42pm UTC](https://discuss.elastic.co/t/accessing-port-9200-remotely/21840 "2015-01-26T22:42:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Mittner](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@Dave\_Mittner](https://discuss.elastic.co/u/Dave_Mittner)\
**Post date:** [January 26, 2015, 10:42pm UTC](https://discuss.elastic.co/t/accessing-port-9200-remotely/21840/1 "2015-01-26T22:42:29Z")

</div>

I'm at a bit of a loss here...

I have a pretty standard setup of elasticsearch and I'm able to curl/telnet  
to port 9200 locally, but the connection is refused if accessed from  
another server. I'm likewise unable to connect to port 9300. For Kibana3  
I've also added:

http.cors.allow-origin: "\*"  
http.cors.enabled: true

Our servers are on Amazon EC2 but we really don't need all the automated  
discovery stuff within the EC2 plugin. The ports are open through the  
security group and there's nothing in IP tables or any other firewalls. I  
also get slightly different behavior once the ports were open so it feels  
like the connection is being refused by the server or elasticsearch, itself.

Any pointers?  
Is the EC2 plugin a requirement in this case?

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/f8ecd552-336a-408b-9068-6d087d4c48e0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%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:** [January 26, 2015, 11:58pm UTC](https://discuss.elastic.co/t/accessing-port-9200-remotely/21840/2 "2015-01-26T23:58:32Z")

</div>

You don't need the plugin, it can make discovery easier though.

You haven't bound ES to localhost only have you?

On 27 January 2015 at 09:42, Dave Mittner [dave.mittner@gmail.com](mailto:dave.mittner@gmail.com) wrote:

> I'm at a bit of a loss here...
> 
> I have a pretty standard setup of elasticsearch and I'm able to  
> curl/telnet to port 9200 locally, but the connection is refused if accessed  
> from another server. I'm likewise unable to connect to port 9300. For  
> Kibana3 I've also added:
> 
> http.cors.allow-origin: "\*"  
> http.cors.enabled: true
> 
> Our servers are on Amazon EC2 but we really don't need all the automated  
> discovery stuff within the EC2 plugin. The ports are open through the  
> security group and there's nothing in IP tables or any other firewalls. I  
> also get slightly different behavior once the ports were open so it feels  
> like the connection is being refused by the server or elasticsearch, itself.
> 
> Any pointers?  
> Is the EC2 plugin a requirement in this case?
> 
> 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/f8ecd552-336a-408b-9068-6d087d4c48e0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%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/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![James\_Carr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james_carr/32/956_2.png) [@James\_Carr](https://discuss.elastic.co/u/James_Carr)\
**Post date:** [January 27, 2015, 12:04am UTC](https://discuss.elastic.co/t/accessing-port-9200-remotely/21840/3 "2015-01-27T00:04:01Z")

</div>

- make sure you haven't bound to 127.0.0.1
- make sure relevant security groups have been opened.

On Mon, Jan 26, 2015 at 5:58 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:

> You don't need the plugin, it can make discovery easier though.
> 
> You haven't bound ES to localhost only have you?
> 
> On 27 January 2015 at 09:42, Dave Mittner [dave.mittner@gmail.com](mailto:dave.mittner@gmail.com) wrote:
> 
> > I'm at a bit of a loss here...
> > 
> > I have a pretty standard setup of elasticsearch and I'm able to  
> > curl/telnet to port 9200 locally, but the connection is refused if accessed  
> > from another server. I'm likewise unable to connect to port 9300. For  
> > Kibana3 I've also added:
> > 
> > http.cors.allow-origin: "\*"  
> > http.cors.enabled: true
> > 
> > Our servers are on Amazon EC2 but we really don't need all the automated  
> > discovery stuff within the EC2 plugin. The ports are open through the  
> > security group and there's nothing in IP tables or any other firewalls. I  
> > also get slightly different behavior once the ports were open so it feels  
> > like the connection is being refused by the server or elasticsearch, itself.
> > 
> > Any pointers?  
> > Is the EC2 plugin a requirement in this case?
> > 
> > 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/f8ecd552-336a-408b-9068-6d087d4c48e0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%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/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.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/CAJreXKDEaW6AbAHFo4YPn2gVHhK1AEa\_rS-BdtvPdCh\_eXkGnw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAJreXKDEaW6AbAHFo4YPn2gVHhK1AEa_rS-BdtvPdCh_eXkGnw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Dave\_Mittner](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@Dave\_Mittner](https://discuss.elastic.co/u/Dave_Mittner)\
**Post date:** [January 27, 2015, 12:16am UTC](https://discuss.elastic.co/t/accessing-port-9200-remotely/21840/4 "2015-01-27T00:16:15Z")

</div>

I'm binding to "localhost"; nothing else seems to work. I get "Failed to  
bind" errors in the log if I try using the actual hostname.

On Monday, January 26, 2015 at 5:04:34 PM UTC-7, James Carr wrote:

> - make sure you haven't bound to 127.0.0.1
> - make sure relevant security groups have been opened.
> 
> On Mon, Jan 26, 2015 at 5:58 PM, Mark Walkom \<[markw...@gmail.com](mailto:markw...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > You don't need the plugin, it can make discovery easier though.
> > 
> > You haven't bound ES to localhost only have you?
> > 
> > On 27 January 2015 at 09:42, Dave Mittner \<[dave.m...@gmail.com](mailto:dave.m...@gmail.com)  
> > \<javascript:\>\> wrote:
> > 
> > > I'm at a bit of a loss here...
> > > 
> > > I have a pretty standard setup of elasticsearch and I'm able to  
> > > curl/telnet to port 9200 locally, but the connection is refused if accessed  
> > > from another server. I'm likewise unable to connect to port 9300. For  
> > > Kibana3 I've also added:
> > > 
> > > http.cors.allow-origin: "\*"  
> > > http.cors.enabled: true
> > > 
> > > Our servers are on Amazon EC2 but we really don't need all the automated  
> > > discovery stuff within the EC2 plugin. The ports are open through the  
> > > security group and there's nothing in IP tables or any other firewalls. I  
> > > also get slightly different behavior once the ports were open so it feels  
> > > like the connection is being refused by the server or elasticsearch, itself.
> > > 
> > > Any pointers?  
> > > Is the EC2 plugin a requirement in this case?
> > > 
> > > 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/f8ecd552-336a-408b-9068-6d087d4c48e0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.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/b05ca44e-a4ad-482c-9f4c-53f845303d9f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b05ca44e-a4ad-482c-9f4c-53f845303d9f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![James\_Carr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james_carr/32/956_2.png) [@James\_Carr](https://discuss.elastic.co/u/James_Carr)\
**Post date:** [January 27, 2015, 12:33am UTC](https://discuss.elastic.co/t/accessing-port-9200-remotely/21840/5 "2015-01-27T00:33:27Z")

</div>

You should bind to 0.0.0.0 not localhost. Then you can hit it remotely.

You can also use a reverse-proxy. It is what we do 🙂

On Mon, Jan 26, 2015 at 6:16 PM, Dave Mittner [dave.mittner@gmail.com](mailto:dave.mittner@gmail.com)  
wrote:

> I'm binding to "localhost"; nothing else seems to work. I get "Failed to  
> bind" errors in the log if I try using the actual hostname.
> 
> On Monday, January 26, 2015 at 5:04:34 PM UTC-7, James Carr wrote:
> 
> > - make sure you haven't bound to 127.0.0.1
> > - make sure relevant security groups have been opened.
> > 
> > On Mon, Jan 26, 2015 at 5:58 PM, Mark Walkom [markw...@gmail.com](mailto:markw...@gmail.com) wrote:
> > 
> > > You don't need the plugin, it can make discovery easier though.
> > > 
> > > You haven't bound ES to localhost only have you?
> > > 
> > > On 27 January 2015 at 09:42, Dave Mittner [dave.m...@gmail.com](mailto:dave.m...@gmail.com) wrote:
> > > 
> > > > I'm at a bit of a loss here...
> > > > 
> > > > I have a pretty standard setup of elasticsearch and I'm able to  
> > > > curl/telnet to port 9200 locally, but the connection is refused if accessed  
> > > > from another server. I'm likewise unable to connect to port 9300. For  
> > > > Kibana3 I've also added:
> > > > 
> > > > http.cors.allow-origin: "\*"  
> > > > http.cors.enabled: true
> > > > 
> > > > Our servers are on Amazon EC2 but we really don't need all the  
> > > > automated discovery stuff within the EC2 plugin. The ports are open through  
> > > > the security group and there's nothing in IP tables or any other firewalls.  
> > > > I also get slightly different behavior once the ports were open so it feels  
> > > > like the connection is being refused by the server or elasticsearch, itself.
> > > > 
> > > > Any pointers?  
> > > > Is the EC2 plugin a requirement in this case?
> > > > 
> > > > 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/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f8ecd552-336a-408b-9068-6d087d4c48e0%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 [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/CAEYi1X84jXq9GK3AfYjxBNLsoJDJk  
> > > sAUZSr-PvNaH%2BBZDkn3gg%[40mail.gmail.com](http://40mail.gmail.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X84jXq9GK3AfYjxBNLsoJDJksAUZSr-PvNaH%2BBZDkn3gg%40mail.gmail.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/b05ca44e-a4ad-482c-9f4c-53f845303d9f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b05ca44e-a4ad-482c-9f4c-53f845303d9f%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/b05ca44e-a4ad-482c-9f4c-53f845303d9f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b05ca44e-a4ad-482c-9f4c-53f845303d9f%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/CAJreXKCPhwY7OYpKnOo6ORe5BucnyGMCyDWFgcQHxwB%2BxAig1w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAJreXKCPhwY7OYpKnOo6ORe5BucnyGMCyDWFgcQHxwB%2BxAig1w%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:36am UTC](https://discuss.elastic.co/t/accessing-port-9200-remotely/21840/6 "2017-07-06T00:36:32Z")

</div>


