ISAKMPD(8) OpenBSD System Manager's Manual ISAKMPD(8) NAME isakmpd - ISAKMP/Oakley a.k.a. IKE key management daemon SYNOPSIS isakmpd [-c config-file] [-d] [-D class=level] [-f fifo] [-i pid-file] [-n] [-p listen-port] [-P local-port] [-L] [-l packetlog-file] [-r seed] [-R report-file] DESCRIPTION The isakmpd daemon establishes security associations for encrypted and/or authenticated network traffic. At this moment, and probably forever, this means ipsec(4) traffic. The way isakmpd goes about its work is by maintaining an internal config- uration as well as a policy database which describes what kinds of SAs to negotiate, and by listening for different events that triggers these ne- gotiations. The events that control isakmpd consists of negotiation ini- tiations from a remote party, user input via a FIFO or by signals, up- calls from the kernel via a PF_KEY socket, and lastly by scheduled events triggered by timers running out. Most uses of isakmpd will be to implement so called "virtual private net- works" or VPNs for short. The vpn(8) manual page describes how to setup isakmpd for a simple VPN. For other uses, some more knowledge of IKE as a protocol is required. One source of information are the RFCs mentioned below. The options are as follows: -c config-file If given, the -c option specifies an alternate configuration file instead of /etc/isakmpd/isakmpd.conf. As this file may contain sensitive information, it must be readable only by the user run- ning the daemon. -d The -d option is used to make the daemon run in the foreground, logging to stderr. -D class=level Debugging class. This argument is possible to specify many times. It takes a parameter of the form class=level where both class and level are numbers. class denotes a debugging class, and level the level you want that debugging class to limit debug printouts at (i.e., all debug printouts above the level specified will not output anything). If class is set to 'A', then all de- bugging classes are set to the specified level. Valid values for class are as follows: 0 Misc 1 Transport 2 Message 3 Crypto 4 Timer 5 Sysdep 6 SA 7 Exchange 8 Negotiation 9 Policy A All -f fifo The -f option specifies the FIFO (a.k.a. named pipe) where the daemon listens for user requests. If the path given is a dash (`-'), isakmpd will listen to stdin instead. -i pid-file By default the PID of the daemon process will be written to /var/run/isakmpd.pid. This path can be overridden by specifying another one as the argument to the -i option. -n When the -n option is given, the kernel will not take part in the negotiations. This is a non-destructive mode so to say, in that it won't alter any SAs in the IPSEC stack. -p listen-port The -p option specifies the listen port the daemon will bind to. -P local-port On the other hand, the port specified to capital -P will be what the daemon binds its local end to when acting as initiator. -L Enable IKE packet capture. When this option is given, isakmpd will capture to file an unencrypted copy of the negotiation pack- ets it is sending and receiveing. This file can later be read by tcpdump(8) and other utilities using pcap(3). -l packetlog-file As option -L above, but capture to a specified file. -r seed If given a deterministic random number sequence will be used in- ternally. This is useful for setting up regression tests. -R report-file When you signal isakmpd a SIGUSR1 it will report its internal state to a report file, normally /var/run/isakmpd.report, but this can be changed by feeding the file name as an argument to the -R flag. Setting up an IKE public key infrastructure (a.k.a. PKI) In order to use public key based authentication, there has to be an in- frastructure managing the key signing. Either there is an already exist- ing PKI isakmpd should take part in, or there will be a need to setup one. In the former case, what is needed to be done varies depending on the actual Certificate Authority used, and is therefore not covered here, more than mentioning that openssl(8) needs to be used to create a cer- tificate signing request that the CA understands. The latter case howev- er is described here: 1. An RSA-enabled libcrypto (see crypto(3)) needs to be installed. This is described in ssl(8). 2. Create your own CA as root. # openssl genrsa -out /etc/ssl/private/ca.key 1024 # openssl req -new -key /etc/ssl/private/ca.key \ -out /etc/ssl/private/ca.csr You are now being asked to enter information that will be incorpo- rated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank. For some fields there will be a default value, if you enter '.', the field will be left blank. # openssl x509 -req -days 365 -in /etc/ssl/private/ca.csr \ -signkey /etc/ssl/private/ca.key \ -out /etc/ssl/ca.crt 3. Create keys and certificates for your IKE peers. This step as well as the next one, needs to be done for every peer. Furthermore the last step will need to be done once for each ID you want the peer to have. The 10.0.0.1 below symbolizes that ID, and should be changed for each invocation. You will be asked for a DN for each run too. See to encode the ID in the common name too, so it gets unique. # openssl genrsa -out /etc/isakmpd/private/local.key 1024 # openssl req -new -key /etc/isakmpd/private/local.key \ -out /etc/isakmpd/private/10.0.0.1.csr Now take these certificate signing requests to your CA and process them like below. You have to add some extensions to the certificate in order to make it usable for isakmpd, which is why you will need to run certpatch(8). Replace 10.0.0.1 with the IP-address which isakmpd will be using for identity. # openssl x509 -req -days 365 -in 10.0.0.1.csr -CA /etc/ssl/ca.crt \ -CAkey /etc/ssl/private/ca.key -CAcreateserial \ -out 10.0.0.1.crt # certpatch -i 10.0.0.1 -k /etc/ssl/private/ca.key \ 10.0.0.1.crt 10.0.0.1.crt Put the certificate (the file ending in .crt) in /etc/isakmpd/certs/ on your local system. Also carry over the CA cert /etc/ssl/ca.crt and put it in /etc/isakmpd/ca/. BUGS The -P flag does not do what we document, rather it does nothing. FILES /etc/isakmpd/ca/ The directory where CA certificates can be found. /etc/isakmpd/certs/ The directory where IKE certificates can be found, both the local certificate(s) and those of the peers, if a choice to have them kept per- manently has been made. /etc/isakmpd/isakmpd.conf The configuration file. As this file can contain sensitive information it must not be readable by anyone but the user running isakmpd. /etc/isakmpd/isakmpd.policy The keynote policy configuration file. Same mode requirements as for isakmpd.conf. /etc/isakmpd/private/local.key A local private key for certificate based au- thentication. There has to be a certificate for this key in the certificate directory mentioned above. Same mode requirements as isakmpd.conf. /var/run/isakmpd.fifo The FIFO used to manually control isakmpd. /var/run/isakmpd.pcap The default IKE packet capture file. /var/run/isakmpd.report The report file written when SIGUSR1 is re- ceived. SEE ALSO ipsec(4), isakmpd.conf(5), isakmpd.policy(5), openssl(8), pcap(3), photurisd(8), ssl(8), tcpdump(8), vpn(8) HISTORY The ISAKMP/Oakley key management protocol is described in the RFCs RFC 2407, RFC 2408 and RFC 2409. This implementation was done 1998 by Niklas Hallqvist and Niels Provos, sponsored by Ericsson Radio Systems. OpenBSD 2.9 July 31, 1998 4