New links, new version and additions
Alright, so it seems inetpro.org is down atm and i'm not even sure they still have my scripts hosted so here are new links, new version and additions to my python network management scripts. I'm now using the excellent pexpect in most of them which you can grab from here:
rix.is ip filter:
Edit the list from rix.is for an ASA object-group
http://dl.getdropbox.com/u/66544/scripts/edit-rix-ipv4-is.py
Send the edited list to the ASA
http://dl.getdropbox.com/u/66544/scripts/update-ASA.py
Icelandic whitelisting, much fun ;) the script that started the blog, still brilliant :D
Configuration Downloader:
http://dl.getdropbox.com/u/66544/scripts/dl-config.py
In addition to the dl-config.py script you will need a settings file declaring the tftp host (ASA/PIX don't support scp afaik) and some other variables mentioned in the dl-config.py file itself.
You will need a new-line delimited device list flat file (hostnames/ip addresses, passed as arguments to ssh) and optionally a telnet device list.
You should use the following lines in your/etc/ssh/ssh_config file if you often add devices and don't want to manually accept the host_keys for each one before running the script:
Host *
StrictHostKeyChecking no
I use this instead of alternatives such as rancid (i'm the only networking guy at my IT firm anyway so i use this for backups and with dropbox running on the *nix boxes receiving the configurations i get archives and availability.
http://wiki.getdropbox.com/TipsAndTricks/TextBasedLinuxInstall <- Highly recommmended
Device Commander:
http://dl.getdropbox.com/u/66544/scripts/device-commander.py
Requirements are mostly the same as for dl-config.py (settings file, device-list and preferably edit your /etc/ssh/ssh_config file)
This guys awesome, I use it at one site like a poor mans WLAN-Controller :D
just make sure to test the command list out on one device first before you run it against a batch.. and remember "reload in" is your friend! with the inbuilt expect feature of the command sender you can answer questions from commands such as reload in and copy.
Named master/slave scripted domain additions:
http://dl.getdropbox.com/u/66544/scripts/domain%20additions%20-%20removals.7z
This ones the oldest of my scripts and it shows, it's still using TCL expect and i hardly believe it works.. :)
I just tweaked my expect script to be fully secure (using SSH and SCP) and it runs on most Unix/Linux hosts. Feel free to give it a try. Note that I have only confirmed it on an ASA and FWSM, but it could be tweaked to run on a PIX.
ReplyDeletehttp://paklids.blogspot.com/2012/01/securely-backup-cisco-firewall-asa-fwsm.html
--paklids
Further, the machines can function for long hours with none breaks with no compromise on the standard of the roles produced. With codes and software program applications governing the end-to-end course of, the machines can deliver higher accuracy with none flaws. From aircraft engines and submarines to buttons and baked goods, Direct CNC manufacturing in Connecticut is prospering and you can be half of|part of} it! Goodwin University’s manufacturing training applications prepare you for an trade driven by expertise, innovation, and creativity.
ReplyDeleteI enjoyed readiing your post
ReplyDelete