# Cidr filter for over 1000 subnets

**URL:** <https://discuss.elastic.co/t/cidr-filter-for-over-1000-subnets/247110>\
**Category:** Logstash\
**Created:** [September 1, 2020, 3:04pm UTC](https://discuss.elastic.co/t/cidr-filter-for-over-1000-subnets/247110 "2020-09-01T15:04:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksremo](https://avatars.discourse-cdn.com/v4/letter/k/5fc32e/32.png) [@ksremo](https://discuss.elastic.co/u/ksremo)\
**Post date:** [September 1, 2020, 3:04pm UTC](https://discuss.elastic.co/t/cidr-filter-for-over-1000-subnets/247110/1 "2020-09-01T15:04:54Z")

</div>

I have round about 1500 subnets, with masks from /18 to /29, but mainly /24 networks.  
I tried to use the cidr logstash filter plugin but the pipeline then come not up. i think because the pipeline is too big and there are too many checks.

How to archive the target?  
I want to add a field with cidr notation from a source.ip field.

Example:  
I know there is an 10.0.0.0/24 network. If a see Traffic from 10.0.0.221 a field source.network should be added with content "10.0.0.0/24".

Anyone have a solution for this?

---

<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:** [September 29, 2020, 3:04pm UTC](https://discuss.elastic.co/t/cidr-filter-for-over-1000-subnets/247110/2 "2020-09-29T15:04:54Z")

</div>

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