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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...