Hi @wernerrall
Could you advise the query you would need to check for all non rfc1918 addresses.
0.0.0.0 - 9.255.255.255
11.0.0.0 - 171.255.255.255
172.33.0.0 - 192.167.255.255
192.169.0.0 - 255.255.255.255
I have tried this...
| where properties matches regex @'\b(?!10\.|192\.168\.|172\.(?:1[6-9]|2[0-9]|3[01])\.)(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}\b'
| where type !~ 'microsoft.network/networksecuritygroups'
|project name, type, location, resourceGroup, subscriptionId, properties
The regex comes from https://stackoverflow.com/questions/51035444/how-to-match-ipv4-regex-pattern-by-excluding-rfc1918-private-addresses-in-python
It's works in testing https://regex101.com/r/vD8hkn/1
But Azure Graph states its an ill-formed regex
Thanks in advance