openswan [Lnk: OSW] [Lnk: NCa]

Racoon has some problems, but there are some reasons why you might want to stick with it:

Otherwise Openswan is the ISAKMP daemon I chose. Several reasons led to this decision:

Openswan does nothing differently compared to racoon, it is an ISAKMP daemon. The wonderful thing about openswan and Linux 2.6 is, that you don't need to patch your kernel to work with openswan. Openswan is fully compatible to the 2.6sec implementation. All you need to get openswan working, is the user-land daemon itself. If you want to use kernel 2.4 and openswan, you have to patch the kernel with the openswan kernel patches.

The creation of the config-file requires some tweaking and patience, and some help from the Internet [Lnk: JDL].

My sample configuration file for support for various road warriors looks like this (/etc/ipsec.conf):

version 2.0config setup

       interfaces=%defaultroute

       forwardcontrol=yes

       nat_traversal=yes

       virtual_private=%v4:10.0.0.0/8,\

            %v4:172.16.0.0/12,%v4:192.168.0.0/16

conn %default

       keyingtries=1

       compress=yes

       disablearrivalcheck=no

       authby=rsasig

       leftrsasigkey=%cert

       rightrsasigkey=%cert

       pfs=no

conn roadwarrior-l2tp-updatedwin

       pfs=no

       leftprotoport=17/1701

       rightprotoport=17/1701

       also=roadwarrior

conn roadwarrior-l2tp

      pfs=no

      leftprotoport=17/0

      rightprotoport=17/1701

      also=roadwarriorconn 

macintosh-l2tp

       pfs=no

       leftprotoport=17/1701

       rightprotoport=17/%any

       also=roadwarriorconn 

roadwarrior

       left=%defaultroute

       leftcert=vpn1.company.net.pem

       right=%any

       auto=add

       type=transport

Very Important: Indentations matter. Therefore do a tab-indentation for the indented lines, if you would copy my sample config-file.

Certificate files have to be copied to /etc/ipsec.d/ into the appropriate directories. Openswan also supports a password-protected private key file, but you have to type that secret password in a file (/etc/ipsec.secret) in clear-text anyway.

Openswan requires the ipsec-tools. It is poorly documented, but one has to flush the SA entries in the kernel after starting openswan. To start openswan, one might enter the following command in order to maintain connectivity to the openswan box:

/etc/init.d/ipsec start; sleep 5; setkey -FP
Of course this has to be tweaked in the startup-scripts, too. Important: Openswan logs to /var/log/secure, not /var/log/daemon or similar files.

Wolfgang Hennerbichler 2004-12-21