May 06 2008

Debian Lenny on HP Compaq 8510p

Wireless: Intel 4965
Drivers: iwl4965

The driver is installed automatically on Lenny, but you need the microcode image from http://www.intellinuxwireless.org/?n=Downloads. Download the tar archive iwlwifi-4965-ucode-4.44.1.20.tgz, unpack it and copy iwlwifi-4965-1.ucode to /lib/firmware directory.

Now you can reload the iwl4965 module:

rmmod iwl4965
insmod iwl4965

Sound works using ALSA with the snd_hda_intel module.

Apr 16 2008

Monitoring Exim's Mail Queue with Nagios

There is a plugin at Nagios Exchange to monitor Exim's Mail Queue:

check_eximailqueue.

Put this script into your Nagios plugin directory. Adjust the paths to utils.sh and the exim binary if necessary.

On Debian you need to install nagios-plugins-basic first and use the following
paths:


. /usr/lib/nagios/plugins/utils.sh

EXIM=/usr/sbin/exim4

Install sudo if necessary.

Mar 25 2008

Generate Fingerprint for SSH Server RSA Key


ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub

Mar 16 2008

SaneSecurity Unofficial Phishing and Scam Signatures for ClamAV

SaneSecurity offers unofficial phishing and scam signatures for ClamAV. The usage page lists a variety of download scripts. I opted for the "download script 1". This script requires the ClamAV command line interface and Curl for operation. The clamav and curl packages fulfil these requirements on Debian.


/usr/local/sbin# wget -O update_sanesecurity http://www.sanesecurity.com/clamav/update_sanesecurity.txt
/usr/local/sbin# chmod +x update_sanesecurity

Mar 16 2008

ClamAV Settings

Logging of found viruses can be enabled with the LogVerbose setting:

LogVerbose true

Mar 16 2008

Courier POP/IMAP and Essential SSL Certificates

  1. Concatenate your private key and the certificate issued into a PEM file:

    cat mail_linuxia_de.key mail_linuxia_de.crt > /etc/courier/imapd.pem
  2. Copy the bundle file with the intermediate certifcates into the configuration directory for Courier:

    cp mail_linuxia_de.ca-bundle /etc/courier
  3. Add the location of these files to the IMAP SSL configuration file, e.g. /etc/courier/imapd-ssl:

    TLS_CERTFILE=/etc/courier/imapd.pem
    TLS_TRUSTCERTS=/etc/courier/mail_linuxia_de.ca-bundle
Mar 16 2008

Iptables: DMZ, NAT; Portforwarding

Portforwarding of a public IP to DMZ and allow access from WAN to it.

iptables -t nat -A PREROUTING -p tcp -d $out_ip --dport $port -j DNAT --to-destination $dmz_ip
iptables -A dmz -m state --state NEW -o $IF_DMZ -p tcp --dport $port --dst $dmz_ip -j ACCEPT

Feb 21 2008

X11 Configuration for Captiva E1903W monitor on Ubuntu

One of the employees of materialboerse.de GmbH got a new LCD monitor yesterday. Graphical interface (X11) stopped working. I tried to reconfigure the xserver with dpkg-reconfigure xserver-xorg, but that didn't help. Finally I edited the frequencies and modes manually in /etc/X11/xorg.conf with the values from the monitor's manual and now everything works fine.

Feb 18 2008

Perl Coding Conventions

  • Avoid cuddled else: (} else {)
  • Separate keywords with blanks
  • Don't seperate functions/variables with blanks

Instead of

if($foo)
{
myfunction ($bar)
} else {
$counter [$i]++;
}

use:


if ($foo) {
myfunction($bar);
}
else {
$counter[$i]++;
}

Feb 07 2008

Create Favicon Icon for Website on Debian

First you need to convert the image to PNG format, e.g. with ImageMagick's convert (Debian package imagemagick):

convert logo.jpg -resize 32x32 favicon.png

In the second step you convert it to a Favicon with icotool (Debian package icoutils):

icotool -c -o favicon.ico favicon.png