I have imported two Cisco firewall configurations and I am trying to extract IP addresses for our local machines. Therefore I only want to match on subnets that are within our control. I have put together the following command to match on one of our private ip ranges but it appears to always be defaulting to other:
index=fw
| rex max_match=5 "(?P<IP_add>\s\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})"
| eval network=if(cidrmatch("10.0.0.0/8", IP_add), "Network", "other")
| stats count by IP_add,network
I have also tried to use the | where NOT cidrmatch("10.0.0.0/8",IP_add) notation but that does not seem to select the proper subnets either. Can someone help me understand why the cidrmatch function does not appear to be working for my searches.
Do I have to set up the transforms file to use the cidrmatch function and if so can someone help me with the proper code to get this done based on the above?
... View more