daemon establishes security associations for encrypted
and/or authenticated network traffic.
At this moment, and probably forever, this means
goes about its work is by maintaining an internal configuration
as well as a policy database which describes what kinds of SAs to negotiate,
and by listening for different events that trigger these negotiations.
The events that control
consist of negotiation initiations from a remote party, user input via
a FIFO or by signals, upcalls from the kernel via a
socket, and lastly by scheduled events triggered by timers running out.
Most uses of
will be to implement so called "virtual private
networks" or VPNs for short.
manual page describes how to set up
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.
forks into two processes for privilege separation.
The unprivileged child jails itself with
The privileged process communicates with the child, reads configuration files
and PKI information and binds to privileged ports on its behalf.
The options are as follows:
-4 | -6
These options control what address family
The default is to use both IPv4 and IPv6.
does not set up flows automatically.
This is useful when flows are configured with
or by other programs like
only takes care of the SA establishment.
If given, the
option specifies an alternate configuration file instead of
As this file may contain sensitive information, it must be readable
only by the user running the daemon.
will reread the configuration file when sent a
option is used to make the daemon run in the foreground, logging to stderr.
-Dclass = level
It's possible to specify this argument many times.
It takes a parameter of the form
class = level
denotes a debugging class, and
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).
is set to
then all debugging classes are set to the specified level.
Valid values for
are as follows:
FIFO user interface
Currently used values for
are 0 to 99.
option specifies the
(a.k.a. named pipe) where the daemon listens for
If the path given is a dash
will listen to stdin instead.
By default the PID of the daemon process will be written to
This path can be overridden by specifying another one as the argument to the
option is 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.
option specifies the listen port the daemon will bind to.
On the other hand, the port specified to capital
will be what the daemon binds its local end to when acting as
When this option is given,
does not read the policy configuration file and no
policy check is accomplished.
This option can be used when policies for flows and SA establishment are
arranged by other programs like
Enable IKE packet capture.
When this option is given,
will capture to file an unencrypted copy of the negotiation packets it
is sending and receiving.
This file can later be read by
and other utilities using
above, but capture to a specified file.
If given, a deterministic random number sequence will be used internally.
This is useful for setting up regression tests.
When you signal
it will report its internal state to a report file, normally
but this can be changed by feeding
the file name as an argument to the
Enables verbose logging.
is silent and outputs only messages when a warning or an error occurs.
With verbose logging
reports successful completion of phase 1 (Main and Aggressive) and phase 2
(Quick) exchanges (Information and Transaction exchanges do not generate any
additional status information).
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 is an already existing PKI
should take part in, or there will be a need to set one up.
In the former case, what is needed to be done varies depending on the
actual Certificate Authority used, and is therefore not covered here,
other than mentioning that
needs to be used to create a certificate signing request that the
The latter case, however, is described here:
You are then asked to enter information that will be incorporated
into your certificate request.
What you are 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.
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.
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
There are two possible ways to add the extensions to the certificate.
Either you have to run
or you have to make use of an OpenSSL configuration file, for example
Replace 10.0.0.1 with the IP-address which
will use as the certificate identity.
starts, it creates a FIFO (named pipe) where it listens for user
All commands start with a single letter, followed by command-specific options.
Available commands are:
Start the named connection, if stopped or inactive.
C set [section]:tag=value
C set [section]:tag=value force
C add [section]:tag=value
C rm [section]:tag
C rms [section]
Update the running
sets a configuration value consisting of a section, tag and value triplet.
will fail if the configuration already contains a section with the named tag;
option to change this behaviour.
appends a configuration value to the named configuration list tag.
removes a tag in a section.
removes an entire section.
NOTE: Sending isakmpd a SIGHUP or an "R" through the FIFO will
void any updates done to the configuration.
C get [section]:tag
Get the configuration value of the specified section and tag.
The result is stored in
d <cookies> <msgid>
Delete the specified SA from the system.
Specify <msgid> as "-" to match a Phase 1 SA.
D <class> <level>
D A <level>
Set debug class <class> to level <level>.
If <class> is specified as "A", the level applies to all debug classes.
"D T" toggles all debug classes to level zero.
Another "D T" command will toggle them back to the earlier levels.
Enable or disable cleartext IKE packet capture.
When enabling, optionally specify which file
should capture the packets to.
Cleanly shutdown the daemon, as when sent a
internal state to a file.
Same as when sent a
as when sent a
Report information on all known SAs to the
Tear down the named connection, if active.
Tear down all active connections.
The directory where CA certificates can be found.
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.
The directory where CRLs can be found.
The configuration file.
As this file can contain sensitive information
it must not be readable by anyone but the user running
The keynote policy configuration file.
The same mode requirements as
A local private key for certificate based authentication.
There has to be a certificate for this key in the certificate directory
The same mode requirements as
Directory in which trusted public keys can be kept.
The keys must be named in the fashion described above.
The PID of the current daemon.
The FIFO used to manually control
The default IKE packet capture file.
The report file written when
The report file written when the
command is issued in the command FIFO.
A directory containing some sample
and keynote policy configuration files.
The ISAKMP/Oakley key management protocol is described in the RFCs
RFC 2407 ,RFC 2408
RFC 2409 .
This implementation was done 1998 by Niklas Hallqvist and Niels Provos,
sponsored by Ericsson Radio Systems.
When storing a trusted public key for an IPv6 identity, the
form of address representation, i.e "::" instead of ":0:0:0:",
must be used or the matching will fail.
uses the output from
for the address-to-name translation.
The privileged process only allows binding to the default port 500 or
unprivileged ports (>1024).
It is not possible to change the interfaces
listens on without a restart.
flag does not do what we document, rather it does nothing.