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
Influencer

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
Influencer

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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...