ISAKMPD(8)
π ISAKMPD(8) π
okay bestie, sit down, hydrate, because today we are reading the manual page for isakmpd β the ISAKMP/Oakley a.k.a. IKE key management daemon β¨ yes that is a lot of acronyms and yes it ate. the formal header calls it ISAKMPD(8) from the System Manager's Manual, but we're on a first-name basis here π
πΈ NAME πΈ
isakmpd β ISAKMP/Oakley a.k.a. IKE key management daemon π¦
π SYNOPSIS π
isakmpd [-4] [-6] [-c config-file] [-a] [-d] [-D class=level] [-f fifo]
[-i pid-file] [-n] [-p listen-port] [-P local-port] [-K] [-L]
[-l packetlog-file] [-r seed] [-R report-file] [-v]
β¨ DESCRIPTION β¨
okay so here's the whole vibe: the isakmpd daemon establishes security associations for encrypted and/or authenticated network traffic. and right now, and honestly probably forever, that means ipsec(4) traffic. periodt.
the way isakmpd goes about its work is genuinely so organized of it: it keeps an internal configuration, plus a policy database that describes what kinds of SAs to negotiate, and then it just... listens. for everything. the events that control isakmpd are:
- negotiation initiations coming in from a remote party π«Ά
- user input, either via a FIFO or by signals
- upcalls from the kernel via a
PF_KEYsocket - scheduled events triggered by timers running out β°
most uses of isakmpd are gonna be implementing so-called "virtual private networks", or VPNs if you're in a hurry. the vpn(8) manual page walks you through setting up isakmpd for a simple VPN. for other uses you're gonna need some more knowledge of IKE as a protocol β one source of info is the RFCs mentioned below, iykyk π
on startup, isakmpd forks into two processes for privilege separation. the unprivileged child jails itself with chroot(8) to /var/empty. the privileged process talks to the child, reads configuration files and PKI information, and binds to privileged ports on the child's behalf. see the "CAVEATS" section below, bestie, it's important π
the options are as follows:
π OPTIONS π
-4|-6β these control what address family (AF_INETand/orAF_INET6)isakmpdwill use. the default is to use both IPv4 and IPv6. versatile queen π-aβ if given,isakmpddoes not set up flows automatically. this is useful when flows are configured withipsecadm(4)or by other programs likebgpd(8). soisakmpdonly takes care of the SA establishment. teamwork, no cap π€-cconfig-file β if given, specifies an alternate configuration file instead of/etc/isakmpd/isakmpd.conf. because this file may contain sensitive information, it must be readable only by the user running the daemon.isakmpdwill reread the configuration file when sent aSIGHUPsignal. so dramatic of it π-dβ makes the daemon run in the foreground, logging tostderr.-Dclass=level β debugging class. you can specify this argument 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 is 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 toA, then all debugging classes are set to the specified level.
valid values for class are as follows:
0β Misc1β Transport2β Message3β Crypto4β Timer5β Sysdep6β SA7β Exchange8β Negotiation9β Policy10β FIFO user interfaceAβ All
currently used values for level are 0 to 99. yes, ninety-nine whole levels of debugging π«
-ffifo β specifies the FIFO (a.k.a. named pipe) where the daemon listens for user requests. if the path given is a dash (-),isakmpdwill listen tostdininstead.-ipid-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-ioption.-nβ when given, the kernel will not take part in the negotiations. this is a non-destructive mode, so to speak, in that it won't alter any SAs in the IPsec stack. cute and harmless π§-plisten-port β specifies the listen port the daemon will bind to.-Plocal-port β on the other hand (yes, capital-P, look closely π), the port specified here will be what the daemon binds its local end to when acting as initiator.-Kβ when given,isakmpddoes not read the policy configuration file and nokeynote(4)policy check is accomplished. this option can be used when policies for flows and SA establishment are arranged by other programs likeipsecadm(8)orbgpd(8).-Lβ Enable IKE packet capture π₯. when given,isakmpdwill capture to file an unencrypted copy of the negotiation packets it is sending and receiving. this file can later be read bytcpdump(8)and other utilities usingpcap(3). (unencrypted!! noted π«£)-lpacketlog-file β as option-Labove, but capture to a specified file.-rseed β if given, a deterministic random number sequence will be used internally. this is useful for setting up regression tests.-Rreport-file β when you signalisakmpdaSIGUSR1, 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-Rflag. she loves to gossip π-vβ Enables verbose logging. normallyisakmpdis silent and outputs only messages when a warning or an error occurs. with verbose logging,isakmpdreports successful completion of phase 1 (Main and Aggressive) and phase 2 (Quick) exchanges (Information and Transaction exchanges do not generate any additional status information). so it's the strong silent type until you ask β¨
π Setting up an IKE public key infrastructure (a.k.a. PKI) π
in order to use public key based authentication, there has to be an infrastructure managing the key signing. either there's an already existing PKI that isakmpd should take part in, or you're gonna need to set one up. in the former case, what needs doing varies depending on the actual Certificate Authority used, so it's not covered here β other than mentioning that openssl(1) needs to be used to create a certificate signing request that the CA understands. the latter case, however, is described right here bestie π«Ά
- 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 then asked to enter information that will be incorporated into your certificate request. what you're about to enter is what is called a Distinguished Name (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 \
-extfile /etc/ssl/x509v3.cnf -extensions x509v3_CA \
-out /etc/ssl/ca.crt
- 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 β in this case an IPv4 ID β and should be changed for each invocation. you will be asked for a DN for each run. encoding the ID in the common name is recommended, as it should be 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 a subjectAltName extension field to the certificate in order to make it usable by isakmpd. there are two possible ways to add the extensions to the certificate. either you have to run certpatch(8) or you have to make use of an OpenSSL configuration file, for example /etc/ssl/x509v3.cnf. replace 10.0.0.1 with the IP-address which isakmpd will use as the certificate identity.
to use certpatch(8), do the following
# 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
otherwise do
# setenv CERTIP 10.0.0.1
# openssl x509 -req -days 365 -in 10.0.0.1.csr -CA /etc/ssl/ca.crt \
-CAkey /etc/ssl/private/ca.key -CAcreateserial \
-extfile /etc/ssl/x509v3.cnf -extensions x509v3_IPAddr \
-out 10.0.0.1.crt
for a FQDN certificate, do
# setenv CERTFQDN somehost.somedomain
# openssl x509 -req -days 365 -in somehost.somedomain.csr \
-CA /etc/ssl/ca.crt -CAkey /etc/ssl/private/ca.key \
-CAcreateserial \
-extfile /etc/ssl/x509v3.cnf -extensions x509v3_FQDN \
-out somehost.somedomain.crt
or with certpatch(8)
# certpatch -t fqdn -i somehost.somedomain \
-k /etc/ssl/private/ca.key \
somehost.somedomain.crt somehost.somedomain.crt
(this assumes the previous steps were used to create a request for somehost.somedomain instead of 10.0.0.1)
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/. almost there, bestie π
to revoke certificates, create a Certificate Revocation List (CRL) file and install it in the /etc/isakmpd/crls/ directory. see openssl(1) and the crl subcommand for more info.
it is also possible to store trusted public keys to make them directly usable by isakmpd. the keys should be saved in PEM format (see openssl(1)) and named and stored after this easy formula:
- For IPv4 identities β
/etc/isakmpd/pubkeys/ipv4/A.B.C.D - For IPv6 identities β
/etc/isakmpd/pubkeys/ipv6/abcd:abcd::ab:bc - For FQDN identities β
/etc/isakmpd/pubkeys/fqdn/foo.bar.org - For UFQDN identities β
/etc/isakmpd/pubkeys/ufqdn/user@foo.bar.org
π¦ The FIFO user interface π¦
when isakmpd starts, it creates a FIFO (named pipe) where it listens for user requests. all commands start with a single letter, followed by command-specific options. available commands are:
c<name>β Start the named connection, if stopped or inactive.C set [section]:tag=valueC set [section]:tag=value forceC add [section]:tag=valueC rm [section]:tagC rms [section]
okay so this whole lil squad updates the running isakmpd config atomically β like, no half-done mess, it's giving clean β¨. set sets a configuration value, which is a little triplet of section, tag and value. But heads up bestie: set will fail if the config already has a section with that named tag β and if you want it to just do it anyway, that's what the force option is for π
. add appends a configuration value to the named configuration list tag. rm removes a tag inside a section. rms nukes an entire section. gone, deleted, no trace π«Ά.
β οΈ NOTE: sendingisakmpdaSIGHUPor an"R"through the FIFO will void any updates you did to the configuration. Like, all that work? poof. π
C get [section]:tagβ get the configuration value of the specified section and tag. The result gets stored in/var/run/isakmpd.resultπ.d <cookies> <msgid>β delete the specified SA from the system. And listen: specify<msgid>as"-"to match a Phase 1 SA πD <class> <level>D A <level>D Tβ set debug class<class>to level<level>. If<class>is given as"A", then that level applies to all debug classes, everyone eating together π½οΈ."D T"toggles all debug classes to level zero, and another"D T"command will toggle them right back to the earlier levels. it's giving light switch πp on[=<path>]p offβ enable or disable cleartext IKE packet capture. When you're enabling it, you can optionally say which fileisakmpdshould capture the packets to π¦Qβ cleanly shutdown the daemon, exactly like when it gets sent aSIGTERMsignal. bye bestie, graceful exit πrβ reportisakmpdinternal state to a file. See the-Roption. Same as when sent aSIGUSR1signal.Rβ reinitializeisakmpd, as when sent aSIGHUPsignal.Sβ report information on all known SAs to the/var/run/isakmpd.resultfile πt <name>β tear down the named connection, if it's active.Tβ tear down all active connections. everyone out π₯
β¨ 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 permanently has been made./etc/isakmpd/crls/β the directory where CRLs can be found./etc/isakmpd/isakmpd.confβ the configuration file. And because this file can contain sensitive info, it must not be readable by anyone but the user runningisakmpdπ/etc/isakmpd/isakmpd.policyβ the keynote policy configuration file. Same mode requirements asisakmpd.conf./etc/isakmpd/private/local.keyβ a local private key for certificate based authentication. There has to be a certificate for this key in the certificate directory mentioned above. Same mode requirements asisakmpd.conf./etc/isakmpd/pubkeys/β directory in which trusted public keys can be kept. The keys must be named in the fashion described above./var/run/isakmpd.pidβ the PID of the current daemon./var/run/isakmpd.fifoβ the FIFO used to manually controlisakmpd./var/run/isakmpd.pcapβ the default IKE packet capture file./var/run/isakmpd.reportβ the report file written whenSIGUSR1is received./var/run/isakmpd.resultβ the report file written when theβSβorβC getβcommand is issued in the command FIFO./usr/share/ipsec/isakmpd/β a directory containing some sampleisakmpdand keynote policy configuration files. little starter pack π§
π SEE ALSO π
openssl(1), getnameinfo(3), pcap(3), ipsec(4), isakmpd.conf(5), isakmpd.policy(5), 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. legends fr fr π
π«Ά CAVEATS π«Ά
When you're storing a trusted public key for an IPv6 identity, you must use the most efficient form of address representation, i.e "::" instead of ":0:0:0:", or the matching will fail π. isakmpd uses the output from getnameinfo(3) for the address-to-name translation.
The privileged process only allows binding to the default port 500 or unprivileged ports (>1024).
And no cap: it is not possible to change the interfaces isakmpd listens on without a restart. π
π BUGS π
The -P flag does not do what we document, rather it does nothing. it's giving decorative flag β¨ (not in the fun way)
and that's the whole page bestie, tysm for reading π this one came from the Debian crew, dated August 07, 2002, filed under ISAKMPD(8) β mwah, stay encrypted ππ
π¦ where this page comes from
- ubuntu jammy: isakmpd 20041012-10build1
- Copyright (c) 1998, 1999, 2000, 2001 Niklas Hallqvist
- Copyright (c) 1999 Angelos D. Keromytis. All rights reserved
- Copyright (c) 2001, 2002 HΓ₯kan Olsson. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms