# Range filter doesn't work with IP-adresses

**URL:** <https://discuss.elastic.co/t/range-filter-doesnt-work-with-ip-adresses/214599>\
**Category:** Kibana\
**Created:** [January 10, 2020, 12:30pm UTC](https://discuss.elastic.co/t/range-filter-doesnt-work-with-ip-adresses/214599 "2020-01-10T12:30:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![victor.nilsson](https://avatars.discourse-cdn.com/v4/letter/v/eb8c5e/32.png) [@victor.nilsson](https://discuss.elastic.co/u/victor.nilsson)\
**Post date:** [January 10, 2020, 12:30pm UTC](https://discuss.elastic.co/t/range-filter-doesnt-work-with-ip-adresses/214599/1 "2020-01-10T12:30:12Z")

</div>

Hi,

I have the following message:

> \<38\>sshd[31656]: Accepted password for root from 192.168.2.180 port 51942 ssh2

I want to create a filter that limits the results to only the 192.168.2.0/24 adress span and so i've tried the following:

message: "Accepted password for" AND NOT src\_ip: 192.168.2.0/24\<- i still get a hit  
message: "Accepted password for" AND NOT src\_ip: [192.168.2.0 TO 192.168.2.255] \<- still get a hit

I don't understand what i am doing wrong. Could someone point me in the right direction?

---

<div class="post-metadata">

**Author:** ![anjilinga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anjilinga/32/86010_2.png) [@anjilinga](https://discuss.elastic.co/u/anjilinga)\
**Post date:** [January 10, 2020, 3:58pm UTC](https://discuss.elastic.co/t/range-filter-doesnt-work-with-ip-adresses/214599/2 "2020-01-10T15:58:24Z")

</div>

Range filter works for numbers only i believe.

---

<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:** [February 7, 2020, 3:58pm UTC](https://discuss.elastic.co/t/range-filter-doesnt-work-with-ip-adresses/214599/3 "2020-02-07T15:58:25Z")

</div>

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