How to filter CIDR in XQL search

Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to filter CIDR in XQL search

L1 Bithead

Hi, I'm trying to build XQL queries that target internal vs external IP ranges.

This is easy in the normal query builder with|| but I'm not able to re-create this in XQL. 


dataset = xdr_data 
| filter event_type = NETWORK 
| filter action_remote_ip not in ("", "", "") 


I tried this to look for external connections but I still get results in those ranges so I think it's string matching instead of using the CIDR. I could do this by string matching but this doesn't scale well for some IP ranges. 

I also looked at the 2 CIDR functions incidr and incidrlist however these have a different use case. 

Does anyone know if this is possible? If so can you show me the syntax? 




L2 Linker

I think your search can be accomplished by using this filter setup:


dataset = xdr_data 
| filter event_type = NETWORK 
| alter remote_10 = incidr(action_remote_ip,"") 
| alter remote_172 = incidr(action_remote_ip,"")
| alter remote_192 = incidr(action_remote_ip,"") 
| filter remote_10 = false and remote_172 = false and remote_192 = false


  • 1 replies
  • 78 Subscriptions
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!