Splunk Search

How to exclude the private ip range

nareerat_pr
Explorer

I try to exclude the private ip range with command | search NOT ( src=10.0.0.0/8 OR src=192.168.0.0/16 OR src=172.16.0.0/12)

but I still found the private ips in my search result

 

Labels (1)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

search command is doing simple string searching, so what you want is

| where !(cidrmatch("10.0.0.0/8", src) OR cidrmatch("192.168.0.0/16", src) OR cidrmatch("172.16.0.0/12", src))

 

View solution in original post

bowesmana
SplunkTrust
SplunkTrust

search command is doing simple string searching, so what you want is

| where !(cidrmatch("10.0.0.0/8", src) OR cidrmatch("192.168.0.0/16", src) OR cidrmatch("172.16.0.0/12", src))

 

nareerat_pr
Explorer

It works, thanks

0 Karma
Get Updates on the Splunk Community!

The Splunk Success Framework: Your Guide to Successful Splunk Implementations

Splunk Lantern is a customer success center that provides advice from Splunk experts on valuable data ...

Splunk Training for All: Meet Aspiring Cybersecurity Analyst, Marc Alicea

Splunk Education believes in the value of training and certification in today’s rapidly-changing data-driven ...

Investigate Security and Threat Detection with VirusTotal and Splunk Integration

As security threats and their complexities surge, security analysts deal with increased challenges and ...