Splunk Search

How to reference Splunk lookup question for cidrmatch?

cybersecnutant
Explorer

I have a lookup file called prefixes.csv, and it has about 5 headers:

prefix,location,description,owner
"1.0.0.0/8",usa,"corporate things", "joe schmoe"

I want to be able to reference this file so that, for example, if I am looking at firewall logs, I can ignore or , alternatively, specifically look for events where their src_ip falls into these ranges.

So for example, something like:

index=firewall src_ip=* | search NOT [ |inputlookup | field + prefix | rename prefix as src_ip]

I know that I can do something like this if I had every range expanded for single entries per IP, but is there a way to do this with cidr? I have tried doing the lookup definition route but I think I am missing something or misunderstanding something there.

Thanks in advance

__PRESENT

Labels (1)
Tags (1)
0 Karma
1 Solution

yuanliu
SplunkTrust
SplunkTrust

1.0.0.0/8 is a CIDR notation.  Splunk lookup fully supports it.  See Create a CSV lookup definition about how to setup "prefix" field as type CIDR.

View solution in original post

0 Karma

yuanliu
SplunkTrust
SplunkTrust

1.0.0.0/8 is a CIDR notation.  Splunk lookup fully supports it.  See Create a CSV lookup definition about how to setup "prefix" field as type CIDR.

0 Karma

cybersecnutant
Explorer

Looks like I just needed to set up the definition for 1 particular file that was I using for testing versus the others which already were set up. Thank you

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Rounding off the Splunk Dashboard Contest

What does a contest-winning Splunk dashboard look like? In this case, it isn't in a browser tab at all. It ...