ISAKMPD.CONF(5) | File Formats Manual | ISAKMPD.CONF(5) |
isakmpd.conf
—
configuration file for isakmpd
isakmpd.conf
is the configuration file for
the isakmpd(8) daemon,
managing security association and key management for the IPsec layer of the
kernel's networking stack.
The file is of a well-known type of format called .INI style, named after the suffix used by an overrated windowing environment for its configuration files. This format consists of sections, each beginning with a line looking like:
Between the brackets is the name of the section following this section header. Inside a section many tag/value pairs can be stored, each one looking like:Tag=Value
Often the right-hand side values consist of other section names. This results in a tree structure. Some values are treated as a list of several scalar values. Such lists always use a comma character as the separator. Some values are formatted like this: X,Y:Z, which is an offer/accept syntax, where X is a value we offer and Y:Z is a range of accepted values, inclusive.
To activate changes to isakmpd.conf
without restarting
isakmpd(8), send a
SIGHUP
signal to the daemon process.
Some predefined section names are recognized by the daemon, avoiding the need to fully specify the Main Mode transforms and Quick Mode suites, protocols, and transforms.
For Main Mode:
where:
For Quick Mode:
where:
For example, AES-SHA2-256 means: AES encryption, SHA2-256 hash, and authorization by pre-shared keys. Adding "-RSA_SIG" will enable public key authentication, e.g. AES-SHA2-256-RSA_SIG. Similarly, QM-ESP-3DES-SHA-PFS-SUITE means: ESP protocol, 3DES encryption, SHA hash, and use Perfect Forward Secrecy.
Unless explicitly stated with -GRP1, 2, 5, 14 or 15, transforms and PFS suites use DH group 2. There are currently no predefined ESP+AH Quick Mode suites.
The predefinitions include some default values for the special sections "General", "Keynote", "X509-certificates", and "Default-phase-1-configuration". These default values are presented in the example below.
All autogenerated values can be overridden by manual entries by using the same section and tag names in the configuration file. In particular, the default phase 1 (Main or Aggressive Mode) and phase 2 (Quick Mode) lifetimes can be overridden by these tags under the "General" section:
[General] Default-phase-1-lifetime= 3600,60:86400 Default-phase-2-lifetime= 1200,60:86400
The Main Mode lifetime currently defaults to one hour (minimum 60 seconds, maximum 1 day). The Quick Mode lifetime defaults to 20 minutes (minimum 60 seconds, maximum 1 day).
Also, the default phase 1 ID can be set by creating a ⟨Phase1-ID⟩ section, as shown below, and adding this tag under the "General" section:
[General] Default-phase-1-ID= Phase1-ID-name [Phase1-ID-name] ID-type= USER_FQDN Name= foo@bar.com
-D
command
line switch of
isakmpd(8).-v
command
line switch of
isakmpd(8).isakmpd.conf
looks for
explicitly trusted public keys. The default is
/etc/isakmpd/pubkeys. Read
isakmpd(8) for the
required naming convention of the files in here.SIGHUP
signal, or an ‘R’ is sent
to the FIFO interface (see
isakmpd(8)).isakmpd.conf
are changed so that multiple
instances can run on top of one SADB and set up SAs with each other.
Specifically this means replay protection will not be asked for, and
errors that can occur when updating an SA with its parameters a 2nd
time will be ignored.The credentials file contains keynote(4) credentials that are sent to a remote IKE daemon when we use the associated ID, or credentials that we may want to consider when doing an exchange with a remote IKE daemon that uses that ID. Note that, in the former case, the last credential in the file MUST contain our public key in its Licensees field. More than one credentials may exist in the file. They are separated by whitelines (the format is essentially the same as that of the policy file). The credentials are of the same format as the policies described in isakmpd.policy(5). The only difference is that the Authorizer field contains a public key, and the assertion is signed. Signed assertions can be generated using the keynote(1) utility.
The private_key file contains the private RSA key we use for authentication. If the directory (and the files) exist, they take precedence over X509-based authentication.
IPV4_ADDR
or
IPV6_ADDR
, this tag should exist and be an IP
address.IPV4_ADDR
,
IPV4_ADDR_SUBNET
,
IPV6_ADDR
,
IPV6_ADDR_SUBNET
,
FQDN
, USER_FQDN
, or
KEY_ID
.FQDN
,
USER_FQDN
, or KEY_ID
,
this tag should exist and contain a domain name, user@domain, or other
identifying string respectively.
In the case of KEY_ID
, note that
the IKE protocol allows any octet sequence to be sent or received
under this payload, potentially including non-printable ones.
isakmpd(8) can only
transmit printable KEY_ID
payloads, but can
receive and process arbitrary KEY_ID
payloads. This effectively means that non-printable
KEY_ID
remote identities cannot be verified
through this means, although it is still possible to do so through
isakmpd.policy(5).
IPV4_ADDR_SUBNET
or
IPV6_ADDR_SUBNET
, this tag should exist and be
a network subnet mask.IPV4_ADDR_SUBNET
or
IPV6_ADDR_SUBNET
, this tag should exist and be
a network address.IPSEC
. If unspecified, defaults to
IPSEC
.ID_PROT
and for aggressive mode it is
AGGRESSIVE
.MODP_768
,
MODP_1024
, EC_155
, and
EC_185
.SECONDS
or KILOBYTES
depending on the type of the
duration. Notice that this field may NOT be set to ANY.The following variables can be used in tags to include information from the remote peer on runtime:
For example, if the ID is fqdn/foo.bar.org or ufqdn/user@bar.org, “PF-Tag=ipsec-$domain” expands to “ipsec-bar.org”. The variable expansion for the PF-Tag directive occurs only at runtime, not during configuration file parse time.
IPSEC
. If unspecified, defaults to
IPSEC
.QUICK_MODE
.IPSEC_AH
and
IPSEC_ESP
.IPV4_ADDR
or
IPV6_ADDR
, this tag should exist and be an IP
address, an interface name, or the default keyword.
If an interface is used, the first address of the appropriate family
will be used. The default keyword uses the interface
associated with the default route. In the case of IPv6, link-local
addresses will be skipped if addresses which are not link-local exist.
If the address on the interface changes
isakmpd(8) will not
track the change. The configuration must be reloaded to learn the new
address.IPV4_ADDR
, IPV6_ADDR
,
IPV4_ADDR_SUBNET
, or
IPV6_ADDR_SUBNET
.IPV4_ADDR_SUBNET
or
IPV6_ADDR_SUBNET
, this tag should exist and be
a network subnet mask or an interface. When an interface is specified,
the netmask is the mask associated with the Network.
The default keyword uses the interface associated
with the default route.IPV4_ADDR_SUBNET
or
IPV6_ADDR_SUBNET
, this tag should exist and be
a network address, an interface, or the default
keyword. When an interface is specified, the network is selected as
with the Address tag.IPV4_ADDR
,
IPV4_ADDR_SUBNET
,
IPV6_ADDR
, or
IPV6_ADDR_SUBNET
, this tag indicates what
source or destination port is allowed to be transported over the SA
(depending on whether this is a local or remote ID). If left
unspecified, all ports of the given transport protocol will be
transmitted (or permitted) over the SA. The Protocol
tag must be specified in conjunction with this tag.IPV4_ADDR
,
IPV4_ADDR_SUBNET
,
IPV6_ADDR
, or
IPV6_ADDR_SUBNET
, this tag indicates what
transport protocol should be transmitted over the SA. If left
unspecified, all transport protocols between the two address (ranges)
will be sent (or permitted) over that SA.An IKECFG-ID is written as [<ID-type>/<name>]. The following ID types are supported:
Each section specifies what configuration values to return to the peer requesting IKE mode-config. Currently supported values are:
During phase 1 negotiation isakmpd(8) looks for a pre-shared key in the ⟨ISAKMP-peer⟩ section. If no Authentication data is specified in that section, and isakmpd(8) is not the initiator, it looks for Authentication data in a section named after the initiator's phase 1 ID. This allows mobile users with dynamic IP addresses to have different shared secrets.
This only works for aggressive mode because in main mode the remote initiator ID would not yet be known. Note, however, that use of aggressive mode is discouraged. See CAVEATS, below.
The name of the ⟨Initiator-ID⟩ section depends on the ID type sent by the initiator. Currently this can be:
An example of a configuration file:
# A configuration sample for the isakmpd ISAKMP/Oakley (aka IKEv1) daemon. [General] Listen-on= 10.1.0.2 # Incoming phase 1 negotiations are multiplexed on the source IP address [Phase 1] 10.1.0.1= ISAKMP-peer-west # These connections are walked over after config file parsing and told # to the application layer so that it will inform us when traffic wants to # pass over them. This means we can do on-demand keying. [Phase 2] Connections= IPsec-east-west # Default values are commented out. [ISAKMP-peer-west] Phase= 1 #Transport= udp Local-address= 10.1.0.2 Address= 10.1.0.1 #Port= isakmp #Port= 500 #Configuration= Default-phase-1-configuration Authentication= mekmitasdigoat #Flags= [IPsec-east-west] Phase= 2 ISAKMP-peer= ISAKMP-peer-west Configuration= Default-quick-mode Local-ID= Net-east Remote-ID= Net-west #Flags= [Net-west] ID-type= IPV4_ADDR_SUBNET Network= 192.168.1.0 Netmask= 255.255.255.0 [Net-east] ID-type= IPV4_ADDR_SUBNET Network= 192.168.2.0 Netmask= 255.255.255.0 # Quick mode descriptions [Default-quick-mode] EXCHANGE_TYPE= QUICK_MODE Suites= QM-ESP-3DES-SHA-PFS-SUITE,QM-ESP-AES-SHA-PFS-SUITE # Data for an IKE mode-config peer [asn1_dn//C=SE/L=SomeCity/O=SomeCompany/CN=SomePeer.company.com] Address= 192.168.1.123 Netmask= 255.255.255.0 Nameserver= 192.168.1.10 WINS-server= 192.168.1.11 # pre-shared key based on initiator's phase 1 ID [foo.bar.org] Authentication= mekmitasdigoat # # ##################################################################### # All configuration data below this point is not required as the example # uses the predefined Main Mode transform and Quick Mode suite names. # It is included here for completeness. Note the default values for the # [General] and [X509-certificates] sections just below. # ##################################################################### # [General] Policy-file= /etc/isakmpd/isakmpd.policy Retransmits= 3 Exchange-max-time= 120 # KeyNote credential storage [KeyNote] Credential-directory= /etc/isakmpd/keynote/ # Certificates stored in PEM format [X509-certificates] CA-directory= /etc/isakmpd/ca/ Cert-directory= /etc/isakmpd/certs/ CRL-directory= /etc/isakmpd/crls/ Private-key= /etc/isakmpd/private/local.key # Default phase 1 description (Main Mode) [Default-phase-1-configuration] EXCHANGE_TYPE= ID_PROT Transforms= 3DES-SHA # Main mode transforms ###################### # 3DES [3DES-SHA] ENCRYPTION_ALGORITHM= 3DES_CBC HASH_ALGORITHM= SHA AUTHENTICATION_METHOD= PRE_SHARED GROUP_DESCRIPTION= MODP_1024 Life= LIFE_MAIN_MODE # AES [AES-SHA] ENCRYPTION_ALGORITHM= AES_CBC KEY_LENGTH= 128,128:256 HASH_ALGORITHM= SHA AUTHENTICATION_METHOD= PRE_SHARED GROUP_DESCRIPTION= MODP_1024 Life= LIFE_MAIN_MODE # AES-128 [AES-128-SHA] ENCRYPTION_ALGORITHM= AES_CBC KEY_LENGTH= 128,128:128 HASH_ALGORITHM= SHA AUTHENTICATION_METHOD= PRE_SHARED GROUP_DESCRIPTION= MODP_1024 Life= LIFE_MAIN_MODE # AES-192 [AES-192-SHA] ENCRYPTION_ALGORITHM= AES_CBC KEY_LENGTH= 192,192:192 HASH_ALGORITHM= SHA AUTHENTICATION_METHOD= PRE_SHARED GROUP_DESCRIPTION= MODP_1024 Life= LIFE_MAIN_MODE # AES-256 [AES-256-SHA] ENCRYPTION_ALGORITHM= AES_CBC KEY_LENGTH= 256,256:256 HASH_ALGORITHM= SHA AUTHENTICATION_METHOD= PRE_SHARED GROUP_DESCRIPTION= MODP_1024 Life= LIFE_MAIN_MODE # Blowfish [BLF-SHA] ENCRYPTION_ALGORITHM= BLOWFISH_CBC KEY_LENGTH= 128,96:192 HASH_ALGORITHM= SHA AUTHENTICATION_METHOD= PRE_SHARED GROUP_DESCRIPTION= MODP_1024 Life= LIFE_MAIN_MODE # Blowfish, using DH group 4 (non-default) [BLF-SHA-EC185] ENCRYPTION_ALGORITHM= BLOWFISH_CBC KEY_LENGTH= 128,96:192 HASH_ALGORITHM= SHA AUTHENTICATION_METHOD= PRE_SHARED GROUP_DESCRIPTION= EC2N_185 Life= LIFE_MAIN_MODE # Quick mode protection suites ############################## # 3DES [QM-ESP-3DES-SHA-SUITE] Protocols= QM-ESP-3DES-SHA [QM-ESP-3DES-SHA-PFS-SUITE] Protocols= QM-ESP-3DES-SHA-PFS # AES [QM-ESP-AES-SHA-SUITE] Protocols= QM-ESP-AES-SHA [QM-ESP-AES-SHA-PFS-SUITE] Protocols= QM-ESP-AES-SHA-PFS # AES-128 [QM-ESP-AES-128-SHA-SUITE] Protocols= QM-ESP-AES-128-SHA [QM-ESP-AES-128-SHA-PFS-SUITE] Protocols= QM-ESP-AES-128-SHA-PFS # AES-192 [QM-ESP-AES-192-SHA-SUITE] Protocols= QM-ESP-AES-192-SHA [QM-ESP-AES-192-SHA-PFS-SUITE] Protocols= QM-ESP-AES-192-SHA-PFS # AES-256 [QM-ESP-AES-256-SHA-SUITE] Protocols= QM-ESP-AES-256-SHA [QM-ESP-AES-256-SHA-PFS-SUITE] Protocols= QM-ESP-AES-256-SHA-PFS # AH [QM-AH-MD5-SUITE] Protocols= QM-AH-MD5 [QM-AH-MD5-PFS-SUITE] Protocols= QM-AH-MD5-PFS # AH + ESP (non-default) [QM-AH-MD5-ESP-3DES-SHA-SUITE] Protocols= QM-AH-MD5,QM-ESP-3DES-SHA [QM-ESP-3DES-SHA-AH-MD5-SUITE] Protocols= QM-ESP-3DES-SHA,QM-AH-MD5 # Quick mode protocols # 3DES [QM-ESP-3DES-SHA] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-3DES-SHA-XF [QM-ESP-3DES-SHA-PFS] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-3DES-SHA-PFS-XF [QM-ESP-3DES-SHA-TRP] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-3DES-SHA-TRP-XF # AES [QM-ESP-AES-SHA] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-SHA-XF [QM-ESP-AES-SHA-PFS] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-SHA-PFS-XF [QM-ESP-AES-SHA-TRP] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-SHA-TRP-XF # AES-128 [QM-ESP-AES-128-SHA] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-128-SHA-XF [QM-ESP-AES-128-SHA-PFS] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-128-SHA-PFS-XF [QM-ESP-AES-128-SHA-TRP] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-128-SHA-TRP-XF # AES-192 [QM-ESP-AES-192-SHA] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-192-SHA-XF [QM-ESP-AES-192-SHA-PFS] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-192-SHA-PFS-XF [QM-ESP-AES-192-SHA-TRP] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-192-SHA-TRP-XF # AES-256 [QM-ESP-AES-256-SHA] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-256-SHA-XF [QM-ESP-AES-256-SHA-PFS] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-256-SHA-PFS-XF [QM-ESP-AES-256-SHA-TRP] PROTOCOL_ID= IPSEC_ESP Transforms= QM-ESP-AES-256-SHA-TRP-XF # AH MD5 [QM-AH-MD5] PROTOCOL_ID= IPSEC_AH Transforms= QM-AH-MD5-XF [QM-AH-MD5-PFS] PROTOCOL_ID= IPSEC_AH Transforms= QM-AH-MD5-PFS-XF # Quick mode transforms # 3DES [QM-ESP-3DES-SHA-XF] TRANSFORM_ID= 3DES ENCAPSULATION_MODE= TUNNEL AUTHENTICATION_ALGORITHM= HMAC_SHA Life= LIFE_QUICK_MODE [QM-ESP-3DES-SHA-PFS-XF] TRANSFORM_ID= 3DES ENCAPSULATION_MODE= TUNNEL AUTHENTICATION_ALGORITHM= HMAC_SHA GROUP_DESCRIPTION= MODP_1024 Life= LIFE_QUICK_MODE [QM-ESP-3DES-SHA-TRP-XF] TRANSFORM_ID= 3DES ENCAPSULATION_MODE= TRANSPORT AUTHENTICATION_ALGORITHM= HMAC_SHA Life= LIFE_QUICK_MODE # AES [QM-ESP-AES-SHA-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TUNNEL AUTHENTICATION_ALGORITHM= HMAC_SHA KEY_LENGTH= 128 Life= LIFE_QUICK_MODE [QM-ESP-AES-SHA-PFS-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TUNNEL AUTHENTICATION_ALGORITHM= HMAC_SHA GROUP_DESCRIPTION= MODP_1024 KEY_LENGTH= 128 Life= LIFE_QUICK_MODE [QM-ESP-AES-SHA-TRP-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TRANSPORT AUTHENTICATION_ALGORITHM= HMAC_SHA KEY_LENGTH= 128 Life= LIFE_QUICK_MODE # AES-128 [QM-ESP-AES-128-SHA-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TUNNEL AUTHENTICATION_ALGORITHM= HMAC_SHA KEY_LENGTH= 128 Life= LIFE_QUICK_MODE [QM-ESP-AES-128-SHA-PFS-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TUNNEL AUTHENTICATION_ALGORITHM= HMAC_SHA GROUP_DESCRIPTION= MODP_1024 KEY_LENGTH= 128 Life= LIFE_QUICK_MODE [QM-ESP-AES-128-SHA-TRP-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TRANSPORT AUTHENTICATION_ALGORITHM= HMAC_SHA KEY_LENGTH= 128 Life= LIFE_QUICK_MODE # AES-192 [QM-ESP-AES-192-SHA-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TUNNEL AUTHENTICATION_ALGORITHM= HMAC_SHA KEY_LENGTH= 192 Life= LIFE_QUICK_MODE [QM-ESP-AES-192-SHA-PFS-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TUNNEL AUTHENTICATION_ALGORITHM= HMAC_SHA GROUP_DESCRIPTION= MODP_1024 KEY_LENGTH= 192 Life= LIFE_QUICK_MODE [QM-ESP-AES-192-SHA-TRP-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TRANSPORT AUTHENTICATION_ALGORITHM= HMAC_SHA KEY_LENGTH= 192 Life= LIFE_QUICK_MODE # AES-256 [QM-ESP-AES-256-SHA-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TUNNEL AUTHENTICATION_ALGORITHM= HMAC_SHA KEY_LENGTH= 256 Life= LIFE_QUICK_MODE [QM-ESP-AES-256-SHA-PFS-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TUNNEL AUTHENTICATION_ALGORITHM= HMAC_SHA GROUP_DESCRIPTION= MODP_1024 KEY_LENGTH= 256 Life= LIFE_QUICK_MODE [QM-ESP-AES-256-SHA-TRP-XF] TRANSFORM_ID= AES ENCAPSULATION_MODE= TRANSPORT AUTHENTICATION_ALGORITHM= HMAC_SHA KEY_LENGTH= 256 Life= LIFE_QUICK_MODE # AH [QM-AH-MD5-XF] TRANSFORM_ID= MD5 ENCAPSULATION_MODE= TUNNEL AUTHENTICATION_ALGORITHM= HMAC_MD5 Life= LIFE_QUICK_MODE [QM-AH-MD5-PFS-XF] TRANSFORM_ID= MD5 ENCAPSULATION_MODE= TUNNEL GROUP_DESCRIPTION= MODP_1024 Life= LIFE_QUICK_MODE [Sample-Life-Time] LIFE_TYPE= SECONDS LIFE_DURATION= 3600,1800:7200 [Sample-Life-Volume] LIFE_TYPE= KILOBYTES LIFE_DURATION= 1000,768:1536
keynote(1), openssl(1), ipsec(4), keynote(4), isakmpd.policy(5), isakmpd(8)
Using aggressive mode is discouraged due to various design problems. If your peer only supports aggressive mode, please consider replacing that peer with a sane ISAKMP/IKE implementation. For details see http://www.usenix.org/publications/login/1999-12/features/harmful.html.
The RFCs do not permit differing DH groups in the same proposal for aggressive and quick mode exchanges. Mixing both PFS and non-PFS suites in a quick mode proposal is not possible, as PFS implies using a DH group.
January 1, 2017 | OpenBSD-6.1 |