# Restrict http module to certain port

**URL:** <https://discuss.elastic.co/t/restrict-http-module-to-certain-port/126533>\
**Category:** Elasticsearch\
**Created:** [April 3, 2018, 9:04am UTC](https://discuss.elastic.co/t/restrict-http-module-to-certain-port/126533 "2018-04-03T09:04:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![weejim\_sc](https://avatars.discourse-cdn.com/v4/letter/w/ac8455/32.png) [@weejim\_sc](https://discuss.elastic.co/u/weejim_sc)\
**Post date:** [April 3, 2018, 9:04am UTC](https://discuss.elastic.co/t/restrict-http-module-to-certain-port/126533/1 "2018-04-03T09:04:24Z")

</div>

Is there a way to restrict the http services to localhost only  
for e.g :  
[http://localhost:9200](http://localhost:9200)

---

<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:** [April 3, 2018, 9:22am UTC](https://discuss.elastic.co/t/restrict-http-module-to-certain-port/126533/2 "2018-04-03T09:22:16Z")

</div>

You can set:

```auto
http.host: localhost

```

---

<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:** [May 1, 2018, 9:22am UTC](https://discuss.elastic.co/t/restrict-http-module-to-certain-port/126533/3 "2018-05-01T09:22:42Z")

</div>

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