# Curl: (7) failed to connect

**URL:** <https://discuss.elastic.co/t/curl-7-failed-to-connect/120073>\
**Category:** Elasticsearch\
**Created:** [February 15, 2018, 9:30pm UTC](https://discuss.elastic.co/t/curl-7-failed-to-connect/120073 "2018-02-15T21:30:42Z")\
**Posts on this page:** 1\
**Showing post:** 14

<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:** [February 16, 2018, 6:10pm UTC](https://discuss.elastic.co/t/curl-7-failed-to-connect/120073/14 "2018-02-16T18:10:08Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

Please edit your posts.

Anyway your server is listening here on `127.0.0.1:9200`. So the only way to access it is locally with `curl 127.0.0.1:9200/`.

If you want to be able to access it from another machine, then you need to configure properly what @warkolm told you

> [@Curl: (7) failed to connect](https://discuss.elastic.co/t/curl-7-failed-to-connect/120073/5):
>
> If you're not familiar with localhost, then check out [https://whatismyipaddress.com/localhost](https://whatismyipaddress.com/localhost) You need to set network.host to something, 0.0.0.0 will bind to all IPs and interfaces on the host, if that is what you want.

---

_[View the full topic](https://discuss.elastic.co/t/curl-7-failed-to-connect/120073)._
