04-26-2006 06:13 AM - edited 02-21-2020 12:51 AM
We're trying to remove all the ACL's that have hitcnt=0 from at least 3 Pix firewalls.
There are hundreds of lines and it's a waste of time to go through each one of them.
If I weren't so rusty at programming, I could've written a program to do this but it's been many years since the last time I compiled any code in any language...
Does anyone know of a good & efficient way of doing this?
Thanks.
04-26-2006 08:39 AM
Try this easy trick:
(assume you want clean ACL 101)
with command
show access-list 101 | i hitcnt=0
you get all access list with hitcnt=0
Copy this output to clipboard
Past this output to Excel (or to other table proccessor) to B column than write NO to A column a copy to all rows that paste all and copy back in firewall config mode
M.
Hope that helps, rate if it does
04-27-2006 08:52 AM
This is brilliant!
Thanks.
*I used UltraEdit, which has pretty cool regular expression functionality that does the job too.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide