06-29-2018 02:04 AM - edited 02-21-2020 07:56 AM
Hi Guys,
Need some help to export ACL from my ASA.
I have a lot of ACLs which uses groups also, I tried to use ASDM to export in CSV but the group name is showing instead of the IP address.
You know any ways how to do it?
Thanks
06-29-2018 02:14 AM
Hi there,
The command sh access-list will expand any host/ service groups you have defined in the ACLs and display the IP addresses / port numbers.
You should be able to copy this output from the terminal and parse it as a CSV.
cheers,
Seb.
06-29-2018 02:21 AM
Hi Seb,
Thanks for the feedback.
If I parse it from text to csv format, does it by column or just in 1 column because I need to be formatted by column? (e.g. source = 1 column, destination = 1 column)
Thanks
06-29-2018 02:52 AM
The position of subnet ID and mask could be potentially be different for each expanded ACE depending on the composition of the rule (ie including source ports?).
I suggest you take the output and delimit by whitespace. You may need to shift some rows left&right to get the whole table aligned correctly.
cheers,
Seb.
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