ASA Snippets and Sublime Text 2

A recent post by Greg Ferro over at Etherealmind exposed me to Sublime Text 2. This multiple format text manipulation software has seen some some great plugins. As pointed out by Greg, there is a Github hosted plugin for Cisco ASA snippets and Cisco syntax highlighting.

After getting excited over Gregs post I went and investigated. I spend a lot of time inside the ASA world and use the 5585x platform in my day job. GNS3 also provides me with a lot of CLI time now I can run it on Linux, Windows, or OSX. Something that allowed me to speed up my configuration with dynamic templates is great.

My old templates consisted of copy, paste, replace. Now, it is a keyword tabbed out then the relevant sections are populated. Take the example below.

Screen Shot 2013-08-14 at 9.45.05 AM
This example I enter the keyword static and tabbed it out. I am provided with a default INSIDE to OUTSIDE NAT mapping.

object network OBJ-REAL_IP
host REAL_IP
object network OBJ-MAPPED_IP

If I tab again, I am updated all instances of the REAL_IP – the address. Tabbing again updates the MAPPED_IP – the address. This includes the object names. In 4 tabs and some simple IP address inputs I have made a static NAT configuration.

There are also snippets for /24 subnet, objects, access-lists and routes.

 Screen Shot 2013-08-14 at 10.23.33 AM

Thanks to Richee for making these and to Greg for pointing them out. My ability to create objects and NAT rules this fast has aided my productivity. I plan to attempt to create FQDN objects and others I use from the base code.

Download the snippets here.

Leave a Reply

Your email address will not be published. Required fields are marked *