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!

Using Machine Learning for Hunting Security Threats

WATCH NOW Seeing the exponential hike in global cyber threat spectrum, organizations are now striving more for ...

Observability Newsletter Highlights | March 2023

 March 2023 | Check out the latest and greatestSplunk APM's New Tag Filter ExperienceSplunk APM has updated ...

Security Newsletter Updates | March 2023

 March 2023 | Check out the latest and greatestUnify Your Security Operations with Splunk Mission Control The ...