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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...