# I can only send curl commands on the localhost

**URL:** <https://discuss.elastic.co/t/i-can-only-send-curl-commands-on-the-localhost/85769>\
**Category:** Elasticsearch\
**Created:** [May 15, 2017, 1:24pm UTC](https://discuss.elastic.co/t/i-can-only-send-curl-commands-on-the-localhost/85769 "2017-05-15T13:24:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![menelink](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@menelink](https://discuss.elastic.co/u/menelink)\
**Post date:** [May 15, 2017, 1:24pm UTC](https://discuss.elastic.co/t/i-can-only-send-curl-commands-on-the-localhost/85769/1 "2017-05-15T13:24:25Z")

</div>

Greetings,

I've been trying to send some curl requests to elasticsearch (port 9200) from my desktop but all I get is a net::ERR\_CONNECTION\_REFUSED message.

Now all problems disappear when I execute the command locally on the elasticsearch server.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![bobby259](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@bobby259](https://discuss.elastic.co/u/bobby259)\
**Post date:** [May 15, 2017, 2:34pm UTC](https://discuss.elastic.co/t/i-can-only-send-curl-commands-on-the-localhost/85769/2 "2017-05-15T14:34:03Z")

</div>

Make sure you are using the public IP of the node to make api call (curl commands). Before that make sure the node is accessible from your desktop by pinging the IP.  
I use a tool called "postman" to make api calls. This might come handy if you are a beginner.  
Your curl command should look like:  
GET http://:9200  
{  
..  
..  
}

---

<div class="post-metadata">

**Author:** ![Bertrand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bertrand/32/45679_2.png) [@Bertrand](https://discuss.elastic.co/u/Bertrand)\
**Post date:** [May 16, 2017, 3:17pm UTC](https://discuss.elastic.co/t/i-can-only-send-curl-commands-on-the-localhost/85769/3 "2017-05-16T15:17:36Z")

</div>

ElasticSearch binds on `localhost` by default.  
Check doc at [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html)

You should change the `network.host` property to something accessible from the outside.  
For instance `network.host: _site:ipv4_`

---

<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:** [June 13, 2017, 3:18pm UTC](https://discuss.elastic.co/t/i-can-only-send-curl-commands-on-the-localhost/85769/4 "2017-06-13T15:18:15Z")

</div>

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