Various nuggets of useful technical information.

Friday, June 27, 2008

Installing Openswan on Redhat 9.0

Openswan 2.x is not compatible with RedHat 9.0 for which OpenSwan 1.0.3 must be used.

INSTALL OPENSWAN FOR REDHAT 9.0:

Check if OpenSwan is installed:

ipsec --version

GBS uses the latest OpenSwan available for RedHat 9.0. At the time of writing that was OpenSwan 1.0.3.
Openswan 1.0.3 installs on Redhat 9.0 and is compatible with any OpenSwan installation. However it needs a special kernel patch that must be installed separately. Either download the Openswan 1.0.3.rpm from www.openswan.org or use:
yum install openswan

If downloading manually, install as follows:
rpm -ivh openswan-1.0.3-3.i386.rpm

Either obtain the kernel patches locally or download them from www.openswan.org:

wget http://www.openswan.org/download/binaries/redhat/9/i386/RPMS/i386/kernel-source-
2.4.20-30.9.openswan_1.0.3_1.i386.rpm
wget http://www.openswan.org/download/binaries/redhat/9/i386/RPMS/i386/kernel-doc-
2.4.20-30.9.openswan_1.0.3_1.i386.rpm
wget http://www.openswan.org/download/binaries/redhat/9/i386/RPMS/i386/kernel-2.4.20-
30.9.openswan_1.0.3_1.i386.rpm

Install as follows:

rpm -ivh --nodeps --force kernel-2.4.20-30.9.openswan_1.0.3_1.i386.rpm
rpm -ivh --nodeps --force kernel-source-2.4.20-30.9.openswan_1.0.3_1.i386.rpm
rpm -ivh --nodeps --force kernel-doc-2.4.20-30.9.openswan_1.0.3_1.i386.rpm

Reboot the server:

reboot

Since a new kernel has been installed, you must change the boot kernel in /etc/grub.conf. Edit
/etc/grub.conf so that the default= for new kernel. In the example below, the new openswan patched kernel is the first one, so default=0, if it was the second one, default=1 and so on.

default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-30.9.openswan_1.0.3_1)
root (hd0,1)
kernel /vmlinuz-2.4.20-30.9.openswan_1.0.3_1 ro root=/dev/md1
initrd /initrd-2.4.20-30.9.openswan_1.0.3_1.img
title Red Hat Linux (2.4.20-31.9smp)
root (hd0,1)
kernel /vmlinuz-2.4.20-31.9smp ro root=/dev/md1
initrd /initrd-2.4.20-31.9smp.img
title Red Hat Linux (2.4.20-31.9)
root (hd0,1)
kernel /vmlinuz-2.4.20-31.9 ro root=/dev/md1
initrd /initrd-2.4.20-31.9.img




No comments: