# Filter specific IP-Addresses

**URL:** https://discuss.elastic.co/t/filter-specific-ip-addresses/132689
**Category:** Logstash
**Created:** [May 21, 2018, 5:57pm UTC](https://discuss.elastic.co/t/filter-specific-ip-addresses/132689 "2018-05-21T17:57:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nin77](https://avatars.discourse-cdn.com/v4/letter/n/a8b319/32.png) [@nin77](https://discuss.elastic.co/u/nin77)
#### Post date: [May 21, 2018, 5:57pm UTC](https://discuss.elastic.co/t/filter-specific-ip-addresses/132689/1 "2018-05-21T17:57:13Z")

</div>

Hey!

I got a Web-Interface where the User can add several IP-Addresses which are interested for him, the rest of the lines without that IP-Address should be removed from the log-file. I looked into grok and cidr filter but I am not sure if that is possible with them? Any ideas how to do that?

Thanks!

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [May 21, 2018, 7:25pm UTC](https://discuss.elastic.co/t/filter-specific-ip-addresses/132689/2 "2018-05-21T19:25:03Z")

</div>

Please explain the use case in greater detail. Are you starting Logstash based on actions taken in a web interface? Reading one input file and writing the filtered log entries to another file?

---

<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 18, 2018, 7:25pm UTC](https://discuss.elastic.co/t/filter-specific-ip-addresses/132689/3 "2018-06-18T19:25:06Z")

</div>

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