We've farmed out some NCM work to contractors that have used it poorly. So in order to find where we need to fix our firewalls I'd like to use regex to find a particular grouping.
I need to find any line in a firewall that has deny ip any any and then a permit statement on the next line. Here is an example:
permit ip host 150.175.61.65 any
permit icmp any any
deny ip any any log
permit tcp any host 193.142.211.22
permit tcp any host 193.142.211.21
permit tcp any host 193.142.211.18
Any suggestions on how to accomplish this is greatly appreciated.