Skip to content

Searching IP CIDR Watchlist for an IP Address #17

Answered by SQLtattoo
cybermohr asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, is there a specific reason why you use the make_list() ?

I mean, you could rewrite the query like this:

let NetworkWatchlist = (_GetWatchlist('NetworkAddress')
| project rangeList = SearchKey //rename it to rangeList
| distinct rangeList); //instead of summarize to get the unique values I suppose
let MyIPAddress = '192.168.100.4';
NetworkWatchlist
| project MyIPAddress, tostring(rangeList)
| where (ipv4_is_in_range(MyIPAddress, rangeList))

I checked the above on my Sentinel environment and it worked like a charm.

HTH
Vassilis

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cybermohr
Comment options

Answer selected by rod-trent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants