OpenSSL: Retrieve remote SSL certificate

security No Comments »

The following small script has been copied over from madboa.com:

#!/bin/sh
#
# usage: retrieve-cert.sh remote.host.name [port]
#
REMHOST=$1
REMPORT=${2:-443}

echo |\
openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |\
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'

Virtualization: Virtualbox rules them all (was: KVM+Qemu=Dump VMware Server)

virtual No Comments »

Initially I wanted to write about my positive experience with kvm+qemu but after several weeks of testing the following downsides became apparent:

  • currently no support for AltGr
  • no copy-and-paste support to/from host

As those issues actually prevented me from productively using guest images with kvm a colleague had the right hint at hand: Virtualbox.

I went ahead and installed the packages virtualbox-ose and virtualbox-ose-modules-2.6.24-16-generic and started testing it by creating various guest images using the simple to use gui. I even converted an existing kvm/qemu image to the virtualbox format using the following commands:

# vboxmanage convertdd image.img image.vdi
# vboxmanage modifyvdi image.vdi compact

Finally copy-and-paste is actually working, something even VMware never accomplished (at least under a Linux host). The CPU Hardware Virtualization support (see this post to check if your CPU has support for it) in combination with the Virtualbox Guest Extensions make the guests subjectively run even faster than on kvm/qemu (I did not clock this, though).

As you might have guessed from my fanboy rave positive posting I currently favor Virtualbox over all other solutions as it seems the right tool for my exact needs. As always your mileage may vary.

btw: AltGr works too…

Ubuntu 8.04 Hardy Heron 32bit
Intel Core 2 Duo T2400 1.83GHz
2GB Ram

Debian: Issues with poller.php in latest Cacti (0.8.7a)

monitoring 2 Comments »

Prehistory: Upgraded cacti to 0.8.7a a couple of weeks ago during a regular “apt-get dist-upgrade” run.
Today I checked my Cacti installation to gather some intel on a performance/latency issue that we are currently encountering on a network link. As all graphs are blank since mid of October (hey, I am only checking in to Cacti when there are issues to take care of) I went ahead and tried to manually run the poller:

root@host: [~] /usr/share/cacti/site/poller.php
/usr/share/cacti/site/poller.php: line 1: ?php: No such file or directory
/usr/share/cacti/site/poller.php: line 2: /bin: is a directory
/usr/share/cacti/site/poller.php: line 3: +-------------------------------------------------------------------------+: command not found
/usr/share/cacti/site/poller.php: line 4: syntax error near unexpected token `|'
/usr/share/cacti/site/poller.php: line 4: ` | Copyright (C) 2004-2007 The Cacti Group |'

Looking at the source of poller.php did not really reveal anything obvious which made me start searching the Cacti forum, Google and Debian Bugs. Looks like I am pretty much alone with the problem so far…

Probably that’s the price you pay for running cutting edge (*zang*) Debian unstable.

fsck.

SNMPD: Remotely query return code of scripts

monitoring, systems No Comments »

To remotely check the return code of a script via snmpd add the following to snmpd.conf:
exec myname /path/to/script
After recycling the snmpd daemon the return code could be obtained via the following OID:
1.3.6.1.4.1.2021.8.1.100.1
If you have more than one exec line the last digit is incremented by one for each script.

CPU Hardware Virtualization support

systems, virtual 1 Comment »

Run the following command to find out if your cpu supports hardware virtualization:

egrep '^flags.*(vmx|svm)' /proc/cpuinfo

AMD processors would have the svm flag set and Intel processor the vmx flag.

Please note that hardware virtualization also needs to be enabled in the bios before being usable.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in