Category: Open Source

Cisco Periodic Reboot Using Perl

A request to reboot a Cisco ASA every week came in today. Under Cisco IOS there is a kroon which would accommodate us here, however there appears to be no such thing under the ASA OS (is it still called FOS?). The next best thing is to run a Perl script which utilises the Net::SSH::Expect module to negotiate the SSH login.

As we are using an ASA without any kind of AAA usernames we also need to get past uplifting our privileges using en.

I’m on a FreeBSD server so I need to install the correct Perl module via the ports first:

# cd /usr/ports/net/p5-Net-SSH-Expect/

# make install

Now we can write and test the script:

#! /usr/bin/perl -w

 

use strict;

use Net::SSH::Expect;

 

my $host_ip = “1.1.1.1”;

my $login_name = “xxxx”;

my $login_password = “yyyy”;

my $en_password = “zzzz”;

 

my $ssh = Net::SSH::Expect->new (

host => $host_ip,

password=> $login_password,

user => $login_name,

raw_pty => 1

);

 

my $login_output = $ssh->login();

if ($login_output !~ /Type help/) {

die “Login has failed. Login output was $login_output”;

}

 

$ssh->send(“en”);

$ssh->waitfor(‘Password:’, 1) or die “prompt ‘Password:’ not found after 1 second”;

$ssh->send($en_password);

$ssh->exec(“reload noconfirm”);

Add the script to the crontab and we’re away!

Managed Services Update

cisco_managed_banner_small

Citrix_consultancy_banner_small

linux_banner_small

We’re starting on our new marketing campaign this week and the subject matter is our 3 core managed service offerings:

Its all go with website updates, new printed literature and technical specs and PDF data sheets brought up to date. The products themselves are not something new for Gconnect but its nice to have it formalised. Our management services utilise our many years of industry experience, ITIL compliant support system, vendor accreditations and certified engineers to provide a reliable, polished experience. So if you need some help with managing those non-mainstream applications and operating systems, let us know!

MySQL Replication with ZFS

After a meeting with a customer this week, we were posed with the question of how to backup  a MySQL database, off site with the ability to recover records that have been deleted in error. To make the job more interesting, there are some ‘caveats’ which include, not buying Terrabytes of storage, not requiring enormous amounts of bandwidth and not using a massive overhead on te production server. Currently the end user is using a well know replication product which rhymes with ‘Trouble Bake’ but this is using 1GB of RAM on the 32Bit OS so is causing some issues. MySQL is running on Windows for that extra RAM overhead and can only have 4GB RAM (see 32Bit).

As fairly long time users of ZFS with FreeBSD, we are now testing a box which is replicating MySQL using the built in replication feature (in real time) and the snapshots the data every hour. Our Lab is using a ‘production database which is quite small and the data does not change much. The results are very good, so good in fact we are now using it to take backups of web servers in parallel to the normal backups. With great features like de-duplication, on the fly compression and quotas the ZFS system is really worth looking at. The new version of FreeBSD has the system installed out of the box as of course does Solaris and Linux even has a package called ZFS on Linux.

If you are motivated to have a look, here are some links:

FreeBSD Project
Solaris
ZFS on Linux
Or if you would like some help from Gconnect click here

Connecting to Gconnect Hosted Exchange from a Linux Desktop

If you are looking to connect to the Gconnect Hosted Exchange platform from an open source desktop such as Ubuntu, Mint or CentOS then try Exquilla with Mozilla Thunderbird. From the Mozilla Thunderbird ‘Tools’ menu, Exquilla can be installed as an add-on. After that a menu item called ‘ExQuilla for Microsoft Exchange’ appears in the ‘Tools’ menu, from which you can configure the account. In addition to the email, ExQuilla also synchronises the address book, making the solution even better! Open-source is great, but sometimes we need to combine it with enterprise applications that businesses use, and at Gconnect we are always looking to offer the most appropriate solutions.

The ExQuilla project 
Gconnect Hosted Exchange details
Ubuntu Desktop  :  CentOS  :  Linux Mint