# Simple question - http input plugin

**URL:** https://discuss.elastic.co/t/simple-question-http-input-plugin/179649
**Category:** Logstash
**Created:** [May 5, 2019, 6:23am UTC](https://discuss.elastic.co/t/simple-question-http-input-plugin/179649 "2019-05-05T06:23:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)
#### Post date: [May 5, 2019, 6:23am UTC](https://discuss.elastic.co/t/simple-question-http-input-plugin/179649/1 "2019-05-05T06:23:46Z")

</div>

Hi there,  
I have a kind of newbie question regarding the http input plugin.  
The option **host** says: The host or ip to bind. I changed the default value from 0.0.0.0 to 192.168.56.112. On this ip I have a virtual box test elastic cluster. So after restricting it to this port I send this from my attached client host having this ip 192.168.56.1:  
curl -H 'Content-Type: application/json' -XPUT -i '[http://192.168.56.112:8080](http://192.168.56.112:8080)' --data '{ "TypeID": 100, "quantity": 200 }'  
I was expecting to see NO new event in elasticsearch since I restricted the host plugin to 192.168.56.112, but the event DID arrive.  
Therefore my question: What is the function of the host parameter??  
Thank you very much.

---

<div class="post-metadata">

### Author: ![rugenl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rugenl/32/12887_2.png) [@rugenl](https://discuss.elastic.co/u/rugenl)
#### Post date: [May 5, 2019, 11:34am UTC](https://discuss.elastic.co/t/simple-question-http-input-plugin/179649/2 "2019-05-05T11:34:01Z")

</div>

If I'm understanding this, it's early morning...

Host on the input plugin is what IP to "listen" for traffic. The default is to listen on all. "netstat -anp | grep 'LISTEN'" should show port 8080 listening on 192.168.56.112 but not on localhost.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [May 5, 2019, 1:45pm UTC](https://discuss.elastic.co/t/simple-question-http-input-plugin/179649/3 "2019-05-05T13:45:53Z")

</div>

The host option controls what ip the http input listens on. You cannot control which ips clients connect from.

---

<div class="post-metadata">

### Author: ![smm](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@smm](https://discuss.elastic.co/u/smm)
#### Post date: [May 6, 2019, 5:05am UTC](https://discuss.elastic.co/t/simple-question-http-input-plugin/179649/4 "2019-05-06T05:05:58Z")

</div>

To get it clear for me, this is what I have defined and running:  
...  
http{  
host =\> "192.168.56.112"  
port =\> 8080  
codec =\> json  
}  
...  
netstat -anp | grep 'LISTEN'  
tcp6 0 0 192.168.56.112:8080 :::\* LISTEN 2195/java

Does it then has actually a practical relevance what kind of IP I defnine in host? The client as sender will always send to the server IP ...112 on the port 8080 in this case.  
Thank you for your insights!  
cheers

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [May 6, 2019, 1:20pm UTC](https://discuss.elastic.co/t/simple-question-http-input-plugin/179649/5 "2019-05-06T13:20:36Z")

</div>

> [@smm](#):
>
> Does it then has actually a practical relevance what kind of IP I defnine in host? The client as sender will always send to the server IP ...112 on the port 8080 in this case.

I think every server I have ever worked on has had multiple IP addresses. The host option determines which of those addresses the input will bind to. 192.168.56.112 is very different to 127.0.0.1...

---

<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 3, 2019, 1:26pm UTC](https://discuss.elastic.co/t/simple-question-http-input-plugin/179649/6 "2019-06-03T13:26:10Z")

</div>

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