Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

How to remove bulk ACLs from Pix?

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.

2 REPLIES
Gold

Re: How to remove bulk ACLs from Pix?

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

New Member

Re: How to remove bulk ACLs from Pix?

This is brilliant!

Thanks.

*I used UltraEdit, which has pretty cool regular expression functionality that does the job too.

235
Views
10
Helpful
2
Replies
CreatePlease to create content