# How to get client ip address

**URL:** <https://discuss.elastic.co/t/how-to-get-client-ip-address/52111>\
**Category:** Logstash\
**Created:** [June 7, 2016, 5:30pm UTC](https://discuss.elastic.co/t/how-to-get-client-ip-address/52111 "2016-06-07T17:30:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sai\_Birada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sai_birada/32/142367_2.png) [@Sai\_Birada](https://discuss.elastic.co/u/Sai_Birada)\
**Post date:** [June 7, 2016, 5:30pm UTC](https://discuss.elastic.co/t/how-to-get-client-ip-address/52111/1 "2016-06-07T17:30:05Z")

</div>

I had configured filebeat on client machines and logstash on central server. I want to log client ip as a field, so that i can filter the logs based on thier host ips, filebeat is logging hostname, but i need to log host ip. So is there any way through which i can view the ip address from which filebeat pushing logs to logstash?.

---

<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:** [June 9, 2016, 12:07am UTC](https://discuss.elastic.co/t/how-to-get-client-ip-address/52111/2 "2016-06-09T00:07:05Z")

</div>

You can try [https://www.elastic.co/guide/en/logstash/current/plugins-filters-dns.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-dns.html)

---

<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, 4:54am UTC](https://discuss.elastic.co/t/how-to-get-client-ip-address/52111/3 "2017-07-06T04:54:01Z")

</div>


