Splunk Search

Query src + dst subnet and action

tbayer82
New Member

Dear all,

I'm trying to search for denied actions in a subnet, regardless if it is the source or destination.

I tried those without success, maybe you can help me out. Thank you!

index=* AND src="192.168.1.0/24" OR dst="192.168.1.0/24" AND action=deny

index=* action=deny AND src_ip=192.168.1.0/24 OR dst_ip=192.168.1.0/24

Just found it:

index=* dstip="192.168.1.0/24" OR srcip="192.168.1.0/24" action=deny

 

Labels (1)
Tags (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @tbayer82 ,

the order of filters isn't relevant, but if you have OR operators I'd prefer to use parenthesis:

index=* (dstip="192.168.1.0/24" OR srcip="192.168.1.0/24") action=deny

and you don't need to use the AND operator that's the default.

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

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