Splunk Search

IP Range Lookup

splunkrocks2014
Communicator

I have IP lookup table (ips.csv) mixed with different types of formats such as

ip
-----------------------
192.168.1.0/24
192.168.2.0-192.168.2.36
192.168.3.3

From transforms.conf, I defined a ip_lookup object as the following:

 [ip_lookup]
 filename = ips.csv
 match_type = CIDR(ip)

Does my lookup work with single IP or a IP range like this, 192.168.2.0-192.168.2.36?

Thanks.

Tags (1)
1 Solution

starcher
SplunkTrust
SplunkTrust

cidr lookups have to be in /mask format. if the line is a single IP it should be 192.168.3.3/32

View solution in original post

adonio
Ultra Champion

can you elaborate? what is the problem you are trying to solve?

0 Karma

splunkrocks2014
Communicator

I got the answer from starcher. Thank you for asking.

0 Karma

starcher
SplunkTrust
SplunkTrust

cidr lookups have to be in /mask format. if the line is a single IP it should be 192.168.3.3/32

splunkrocks2014
Communicator

Thank you starcher. This is what I am looking for.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...