srue Fri, 08/17/2007 - 05:36
User Badges:
  • Blue, 1500 points or more

i wrote perl scripts for it - if you want it posted, lemmie know.

srue Fri, 08/17/2007 - 06:34
User Badges:
  • Blue, 1500 points or more

I am by no means a Perl expert, this is just something i happened to get working. It opens a file at location /path/to/file/pixhosts.db, to get IP's (which i configured a web interface to add/remove hosts for). the format for that is simply one IP address per line. you must first configure each pix/asa with the tftp-server command, and make sure your tftp server is configured properly. then, run the script as a cron job. the script performs a 'write mem and write net'. i wrote a similar script for IOS.


use Net::Telnet::Cisco;

$passwd = 'telnet_passwd';

$enable_passwd = 'enable_password';

open (HOSTS, "/path/to/file/pixhosts.db");

@hosts = ;

chomp (@hosts);

foreach $pix (@hosts)


my $session = Net::Telnet::Cisco->new(Host => $pix, Timeout => 30);

$session->prompt('/[\$%#>] $/');

$session->login('username', $passwd);


$session->cmd("write mem\nwrite net\n");


close (HOSTS);


This Discussion