[python] asa library

I created an asa library which contains functions require to perform some asa operations, this is not a complete set, there are some sets which I have not tested yet, the below functions are all tested and working.

[python]Configuring cisco asa

Introduction I am testing some functions for sending configuration over to cisco asa with netmiko. Netmiko support sending commands and sending commands as a set. In order to deliver the command as a set Jinja2 template engine is used to fill up the variables of the template. The purpose of this post is to record … Continue reading [python]Configuring cisco asa

[python]Comparing executed time between with and without threading

To compare between with and without threading, there are three routers from R1 to R3, the task is to save the show version on each router to all.txt. Do the tasks without threading The script runs sequentially on each device, and the total time is 15seconds. Do the tasks with threading The time taken to … Continue reading [python]Comparing executed time between with and without threading

[python]Multiprocessing with Netmiko

Network diagram What I want to achieve There are three vIOS routers which I need to configure with some portion of harden configuration derived from Cisco's hardening guide. The configuration portion I chose is static, hence no dynamic information like the post I did last time. The purpose is to record how multiprocessing can be … Continue reading [python]Multiprocessing with Netmiko

[python]Match most of the Cisco ASA access list patterns with regular expression

Regular expression reference Purchase the course by Sujith George The Complete Regular Expressions Course:Beginner to Advanced from Udemy Study this code from git hub, this code gives a good idea on how you should match access-list, from this course I realize the regex module can convert the matched data to dictionary. Read this documentation about … Continue reading [python]Match most of the Cisco ASA access list patterns with regular expression

[python]Detect changes in configuration of ASA

Three python scripts were written for doing specific tasks. conn_asa.py - this script is responsible for generating two outputs hostname and md_now (md is short for message digest) statechange.py - this script writes the hash generated from conn_asa.py into database. compare_change.py - this script compares the hash stored in db with the current hash generated … Continue reading [python]Detect changes in configuration of ASA

[python]Automating OSPF configuration of two routers

Network diagram There are two vIOS which are R1 and R2, they have their gi0/2 and gi0/3 connected to the R5 switch, the configuration is pushed from the cloud through their gi0/2 and gi0/3 to configure their gi0/0 to become OSPF neighbours. Objective To configure the two routers to become ospf neighbors, the OSPF configuration … Continue reading [python]Automating OSPF configuration of two routers