# Get ip source TCP plugin

**URL:** <https://discuss.elastic.co/t/get-ip-source-tcp-plugin/239743>\
**Category:** Logstash\
**Created:** [July 3, 2020, 7:35am UTC](https://discuss.elastic.co/t/get-ip-source-tcp-plugin/239743 "2020-07-03T07:35:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas74](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Thomas74](https://discuss.elastic.co/u/Thomas74)\
**Post date:** [July 3, 2020, 7:35am UTC](https://discuss.elastic.co/t/get-ip-source-tcp-plugin/239743/1 "2020-07-03T07:35:13Z")

</div>

Hi,

I wonder if it's possible to get the ip source of a sender when using tcp input in logstash.

Is there a way to get this ip even if I don't use http requests ?

Best regards,

Thomas R.

---

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [July 3, 2020, 8:05am UTC](https://discuss.elastic.co/t/get-ip-source-tcp-plugin/239743/2 "2020-07-03T08:05:39Z")

</div>

Hello Thomas,

Have a look [here](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-tcp.html#plugins-inputs-tcp-dns_reverse_lookup_enabled). By default, the tcp input tries to resolve IPs to hostnames but this can be disabled by setting `dns_reverse_lookup_enabled`to `false`. This way you can access the IP using [`@metadata`](https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#metadata).

Best regards  
Wolfram

---

<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 31, 2020, 8:06am UTC](https://discuss.elastic.co/t/get-ip-source-tcp-plugin/239743/3 "2020-07-31T08:06:03Z")

</div>

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