1*a4e61cf2Sjsg.\" $OpenBSD: isakmpd.policy.5,v 1.51 2022/02/06 00:29:02 jsg Exp $ 2b765882cSniklas.\" $EOM: isakmpd.policy.5,v 1.24 2000/11/23 12:55:25 niklas Exp $ 332cbc914Sangelos.\" 4b118cf75Sangelos.\" Copyright (c) 1999-2001, Angelos D. Keromytis. All rights reserved. 532cbc914Sangelos.\" 632cbc914Sangelos.\" Redistribution and use in source and binary forms, with or without 732cbc914Sangelos.\" modification, are permitted provided that the following conditions 832cbc914Sangelos.\" are met: 932cbc914Sangelos.\" 1. Redistributions of source code must retain the above copyright 1032cbc914Sangelos.\" notice, this list of conditions and the following disclaimer. 1132cbc914Sangelos.\" 2. Redistributions in binary form must reproduce the above copyright 1232cbc914Sangelos.\" notice, this list of conditions and the following disclaimer in the 1332cbc914Sangelos.\" documentation and/or other materials provided with the distribution. 1432cbc914Sangelos.\" 1532cbc914Sangelos.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1632cbc914Sangelos.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1732cbc914Sangelos.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1832cbc914Sangelos.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1932cbc914Sangelos.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2032cbc914Sangelos.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2132cbc914Sangelos.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2232cbc914Sangelos.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2332cbc914Sangelos.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2432cbc914Sangelos.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2532cbc914Sangelos.\" 2632cbc914Sangelos.\" 2732cbc914Sangelos.\" Manual page, using -mandoc macros 2832cbc914Sangelos.\" 29*a4e61cf2Sjsg.Dd $Mdocdate: February 6 2022 $ 30f8aa1eeeSaaron.Dt ISAKMPD.POLICY 5 3132cbc914Sangelos.Os 3232cbc914Sangelos.Sh NAME 3332cbc914Sangelos.Nm isakmpd.policy 3432cbc914Sangelos.Nd policy configuration file for isakmpd 3532cbc914Sangelos.Sh DESCRIPTION 3632cbc914Sangelos.Nm 3732cbc914Sangelosis the policy configuration file for the 387a80d3a7Sjmc.Xr isakmpd 8 397a80d3a7Sjmcdaemon, managing security association and key management for the 4032cbc914Sangelos.Xr ipsec 4 4132cbc914Sangeloslayer of the kernel's networking stack. 4232cbc914SangelosThe 431215c700Sjmc.Xr isakmpd 8 44fceee491Sjmcdaemon, 45fceee491Sjmcalso known as the IKEv1 key management daemon, 46fceee491Sjmcimplements the Internet Key Exchange version 1 (IKEv1) protocol. 47fceee491SjmcIt follows then that references to IKE in this document 48fceee491Sjmcpertain to IKEv1 only, 49fceee491Sjmcand not IKEv2. 50fceee491Sjmc.Pp 51fceee491Sjmc.Xr isakmpd 8 52fceee491Sjmcis used when two 5332cbc914Sangelossystems need to automatically set up a pair of Security Associations 547a80d3a7Sjmc(SAs) for secure communication using IPsec. 55fceee491SjmcIKEv1 operates in two stages: 5632cbc914Sangelos.Pp 5732cbc914SangelosIn the first stage (Main or Identity Protection Mode), the two IKE 5832cbc914Sangelosdaemons establish a secure link between themselves, fully 5932cbc914Sangelosauthenticating each other and establishing key material for 604aac73a4Saaronencrypting/authenticating future communications between them. 614aac73a4SaaronThis step is typically only performed once for every pair of IKE daemons. 6232cbc914Sangelos.Pp 638813e63aSderaadtIn the second stage (also called Quick Mode), the two IKE daemons 6432cbc914Sangeloscreate the pair of SAs for the parties that wish to communicate using 654aac73a4SaaronIPsec. 664aac73a4SaaronThese parties may be the hosts the IKE daemons run on, a host 6732cbc914Sangelosand a network behind a firewall, or two networks behind their 684aac73a4Saaronrespective firewalls. 694aac73a4SaaronAt this stage, the exact parameters of the SAs 7032cbc914Sangelos(e.g., algorithms to use, encapsulation mode, lifetime) and the 7132cbc914Sangelosidentities of the communicating parties (hosts, networks, etc.) are 724aac73a4Saaronspecified. 738813e63aSderaadtThe reason for the existence of Quick Mode is to allow for fast 7432cbc914SangelosSA setup, once the more heavy-weight Main Mode has been completed. 7532cbc914SangelosGenerally, Quick Mode uses the key material derived from Main Mode to 764aac73a4Saaronprovide keys to the IPsec transforms to be used. 777a80d3a7Sjmc.Pp 784aac73a4SaaronAlternatively, a new 797a80d3a7SjmcDiffie-Hellman computation may be performed, which significantly slows 807a80d3a7Sjmcdown the exchange, but at the same time provides Perfect Forward 817a80d3a7SjmcSecrecy (PFS). 824aac73a4SaaronBriefly, this means that even should an attacker 8332cbc914Sangelosmanage to break long-term keys used in other sessions (or, 8432cbc914Sangelosspecifically, if an attacker breaks the Diffie-Hellman exchange 8532cbc914Sangelosperformed during Main Mode), they will not be able to decrypt this 864aac73a4Saarontraffic. 874aac73a4SaaronNormally, no PFS is provided (the key material used by the 8832cbc914SangelosIPsec SAs established as a result of this exchange will be derived 8932cbc914Sangelosfrom the key material of the Main Mode exchange), allowing for a 9032cbc914Sangelosfaster Quick Mode exchange (no public key computations). 9132cbc914Sangelos.Pp 9232cbc914SangelosIKE proposals are "suggestions" by the initiator of an exchange to the 9332cbc914Sangelosresponder as to what protocols and attributes should be used on a 944aac73a4Saaronclass of packets. 954aac73a4SaaronFor example, a given exchange may ask for ESP with 9632cbc914Sangelos3DES and MD5 and AH with SHA1 (applied successively on the same 974aac73a4Saaronpacket), or just ESP with Blowfish and RIPEMD-160. 984aac73a4SaaronThe responder 9932cbc914Sangelosexamines the proposals and determines which of them are acceptable, 10032cbc914Sangelosaccording to policy and any credentials. 10132cbc914Sangelos.Pp 10244143af3SderaadtThe following paragraphs assume some knowledge of the contents of the 10332cbc914Sangelos.Xr keynote 4 10432cbc914Sangelosand 10532cbc914Sangelos.Xr keynote 5 10632cbc914Sangelosman pages. 10732cbc914Sangelos.Pp 10832cbc914SangelosIn the KeyNote policy model for IPsec, no distinction is currently 1094aac73a4Saaronmade based on the ordering of AH and ESP in the packet. 1104aac73a4SaaronShould this 11132cbc914Sangeloschange in the future, an appropriate attribute (see below) will be 11232cbc914Sangelosadded. 11332cbc914Sangelos.Pp 11432cbc914SangelosThe goal of security policy for IKE is thus to determine, based on 11532cbc914Sangeloslocal policy (provided in the 1167a80d3a7Sjmc.Nm 11732cbc914Sangelosfile), credentials provided during the IKE exchanges (or obtained 11832cbc914Sangelosthrough other means), the SA attributes proposed during the exchange, 11932cbc914Sangelosand perhaps other (side-channel) information, whether a pair of SAs 12032cbc914Sangelosshould be installed in the system (in fact, whether both the IPsec SAs 1214aac73a4Saaronand the flows should be installed). 1224aac73a4SaaronFor each proposal suggested by or 12332cbc914Sangelosto the remote IKE daemon, the KeyNote system is consulted as to 12432cbc914Sangeloswhether the proposal is acceptable based on local policy (contained in 1257a80d3a7Sjmc.Nm , 12632cbc914Sangelosin the form of policy assertions) and remote credentials (e.g., 12793720372SjmcKeyNote credentials or X.509 certificates provided by the remote IKE 12832cbc914Sangelosdaemon). 12932cbc914Sangelos.Pp 1307a80d3a7Sjmc.Nm 13132cbc914Sangelosis simply a flat 13232cbc914Sangelos.Xr ascii 7 13332cbc914Sangelosfile containing KeyNote policy assertions, separated by blank lines 13432cbc914Sangelos(note that KeyNote assertions may not contain blank lines). 1357a80d3a7Sjmc.Nm 13661dac19aSniklasis read when 13761dac19aSniklas.Xr isakmpd 8 13861dac19aSniklasis first started, and every time it receives a 13961dac19aSniklas.Dv SIGHUP 140ac1aa35bSmpechsignal. 141ac1aa35bSmpechThe new policies read will be used for all new Phase 2 (IPsec) 14261dac19aSniklasSAs established from that point on (even if the associated Phase 1 SA 143ac1aa35bSmpechwas already established when the new policies were loaded). 144ac1aa35bSmpechThe policy change will not affect already established Phase 2 SAs. 14532cbc914Sangelos.Pp 146*a4e61cf2SjsgFor more details on KeyNote assertion format, see 14732cbc914Sangelos.Xr keynote 5 . 14832cbc914SangelosBriefly, KeyNote policy assertions used in IKE have the following 14932cbc914Sangeloscharacteristics: 15021281fb5Sjmc.Bl -bullet 15121281fb5Sjmc.It 15221281fb5SjmcThe Authorizer field is typically "POLICY" (but see the examples 15332cbc914Sangelosbelow, for use of policy delegation). 15421281fb5Sjmc.It 15521281fb5SjmcThe Licensees field can be an expression of passphrases used for 15610f83a8bSniklasauthentication of the Main Mode exchanges, and/or public keys 15793720372Sjmc(typically, X.509 certificates), and/or X.509 distinguished names. 15821281fb5Sjmc.It 15921281fb5SjmcThe Conditions field contains an expression of attributes from the 16032cbc914SangelosIPsec policy action set (see below as well as the keynote syntax man 16132cbc914Sangelospage for more details). 16221281fb5Sjmc.It 16321281fb5SjmcThe ordered return-values set for IPsec policy is "false, true". 16421281fb5Sjmc.El 1653316fe2dSmpech.Pp 16632cbc914SangelosFor an explanation of these fields and their semantics, see 16732cbc914Sangelos.Xr keynote 5 . 1683316fe2dSmpech.Pp 16932cbc914SangelosFor example, the following policy assertion: 17032cbc914Sangelos.Bd -literal 17132cbc914Sangelos Authorizer: "POLICY" 172ab9049dcSangelos Licensees: "passphrase:foobar" || "x509-base64:abcd==" || 173ab9049dcSangelos "passphrase-md5-hex:3858f62230ac3c915f300c664312c63f" || 174ab9049dcSangelos "passphrase-sha1-hex:8843d7f92416211de9ebb963ff4ce28125932878" 17532cbc914Sangelos Conditions: app_domain == "IPsec policy" && esp_present == "yes" 17632cbc914Sangelos && esp_enc_alg != "null" -> "true"; 17732cbc914Sangelos.Ed 1783316fe2dSmpech.Pp 17932cbc914Sangelossays that any proposal from a remote host that authenticates using the 18093720372Sjmcpassphrase "foobar" or the public key contained in the X.509 18132cbc914Sangeloscertificate encoded as "abcd==" will be accepted, as long as it 18232cbc914Sangeloscontains ESP with a non-null algorithm (i.e., the packet will be 18332cbc914Sangelosencrypted). 184ab9049dcSangelosThe last two authorizers are the MD5 and SHA1 hashes respectively of 185ab9049dcSangelosthe passphrase "foobar". 186ab9049dcSangelosThis form may be used instead of the "passphrase:..." one to protect 187ab9049dcSangelosthe passphrase as included in the policy file (or as distributed in a 188ab9049dcSangelossigned credential). 18932cbc914Sangelos.Pp 19010f83a8bSniklasThe following policy assertion: 19110f83a8bSniklas.Bd -literal 19210f83a8bSniklas Authorizer: "POLICY" 19339c69373Sniklas Licensees: "DN:/CN=CA Certificate" 19410f83a8bSniklas Conditions: app_domain == "IPsec policy" && esp_present == "yes" 19510f83a8bSniklas && esp_enc_alg != "null" -> "true"; 19610f83a8bSniklas.Ed 1973316fe2dSmpech.Pp 19810f83a8bSniklasis similar to the previous one, but instead of including a complete 19993720372SjmcX.509 credential in the Licensees field, only the X.509 certificate's 20044143af3SderaadtSubject Canonical Name needs to be specified (note that the "DN:" 20110f83a8bSniklasprefix is necessary). 20210f83a8bSniklas.Pp 20332cbc914SangelosKeyNote credentials have the same format as policy assertions, with 20432cbc914Sangelosone difference: the Authorizer field always contains a public key, and 20532cbc914Sangelosthe assertion is signed (and thus its integrity can be 2064aac73a4Saaroncryptographically verified). 2074aac73a4SaaronCredentials are used to build chains of delegation of authority. 2084aac73a4SaaronThey can be exchanged during an IKE exchange, 20932cbc914Sangelosor can be retrieved through some out-of-band mechanism (no such 21032cbc914Sangelosmechanism is currently supported in this implementation however). 21161dac19aSniklasSee 21261dac19aSniklas.Xr isakmpd.conf 5 21361dac19aSniklason how to specify what credentials to send in an IKE exchange. 21432cbc914Sangelos.Pp 21532cbc914SangelosPassphrases that appear in the Licensees field are encoded as the 21632cbc914Sangelosstring "passphrase:", followed by the passphrase itself 21732cbc914Sangelos(case-sensitive). 2188813e63aSderaadtAlternatively (and preferably), they may be encoded using the 219ab9049dcSangelos"passphrase-md5-hex:" or "passphrase-sha1-hex:" prefixes, followed 220ab9049dcSangelosby the 221ab9049dcSangelos.Xr md5 1 222ab9049dcSangelosor 223ab9049dcSangelos.Xr sha1 1 224ab9049dcSangeloshash of the passphrase itself, encoded as a hexadecimal string (using 225ab9049dcSangeloslower-case letters only). 22632cbc914Sangelos.Pp 22793720372SjmcWhen X.509-based authentication is performed in Main Mode, any X.509 22832cbc914Sangeloscertificates received from the remote IKE daemon are converted to very 2294aac73a4Saaronsimple KeyNote credentials. 2304aac73a4SaaronThe conversion is straightforward: the 23193720372Sjmcissuer of the X.509 certificate becomes the Authorizer of the KeyNote 23232cbc914Sangeloscredential, the subject becomes the only Licensees entry, while the 23332cbc914SangelosConditions field simply asserts that the credential is only valid for 23432cbc914Sangelos"IPsec policy" use (see the app_domain action attribute below). 23532cbc914Sangelos.Pp 23693720372SjmcSimilarly, any X.509 CA certificates present in the directory pointed 23732cbc914Sangelosto by the appropriate 23832cbc914Sangelos.Xr isakmpd.conf 5 2397a80d3a7Sjmcentry are converted to such pseudo-credentials. 2404aac73a4SaaronThis allows one to 24132cbc914Sangeloswrite KeyNote policies that delegate specific authority to CAs (and 24232cbc914Sangelosthe keys those CAs certify, recursively). 24332cbc914Sangelos.Pp 24432cbc914SangelosFor more details on KeyNote assertion format, see 24532cbc914Sangelos.Xr keynote 5 . 24632cbc914Sangelos.Pp 24732cbc914SangelosInformation about the proposals, the identity of the remote IKE 24832cbc914Sangelosdaemon, the packet classes to be protected, etc. are encoded in what 2494aac73a4Saaronis called an action set. 2504aac73a4SaaronThe action set is composed of name-value 25144143af3Sderaadtattributes, similar in some ways to shell environment variables. 2524aac73a4SaaronThese values are initialized by 2537a80d3a7Sjmc.Xr isakmpd 8 25432cbc914Sangelosbefore each query to the KeyNote system, and can be tested against in 2554aac73a4Saaronthe Conditions field of assertions. 2564aac73a4SaaronSee 25732cbc914Sangelos.Xr keynote 4 25832cbc914Sangelosand 25932cbc914Sangelos.Xr keynote 5 26032cbc914Sangelosfor more details on the format and semantics of the Conditions field. 26132cbc914Sangelos.Pp 26244143af3SderaadtNote that assertions and credentials can make references to 26344143af3Sderaadtnon-existent attributes without catastrophic failures (access may be 26432cbc914Sangelosdenied, depending on the overall structure, but will not be 2654aac73a4Saaronaccidentally granted). 2664aac73a4SaaronOne reason for credentials referencing 2678813e63aSderaadtnon-existent attributes is that they were defined within a specific 26832cbc914Sangelosimplementation or network only. 26932cbc914Sangelos.Pp 27032cbc914SangelosIn the following attribute set, IPv4 addresses are encoded as ASCII 2714aac73a4Saaronstrings in the usual dotted-quad format. 2724aac73a4SaaronHowever, all quads are three digits long. 2737a80d3a7SjmcFor example, the IPv4 address 10.128.1.12 would be encoded as 010.128.001.012. 27432cbc914SangelosSimilarly, IPv6 addresses are encoded in the standard x:x:x:x:x:x:x:x 27532cbc914Sangelosformat, where the 'x's are the hexadecimal values of the eight 16-bit 2764aac73a4Saaronpieces of the address. 2774aac73a4SaaronAll 'x's are four digits long. 2787a80d3a7SjmcFor example, the address 1080:0:12:0:8:800:200C:417A 2797a80d3a7Sjmcwould be encoded as 1080:0000:0012:0000:0008:0800:200C:417A. 28032cbc914Sangelos.Pp 28132cbc914SangelosThe following attributes are currently defined: 282b081366aSjmc.Bl -tag -width Ds 28364fae5ebSjmc.It ah_auth_alg 28464fae5ebSjmcOne of 28564fae5ebSjmc.Va hmac-md5 , 28664fae5ebSjmc.Va hmac-sha , 28764fae5ebSjmc.Va des-mac , 28864fae5ebSjmc.Va kpdk , 28964fae5ebSjmc.Va hmac-sha2-256 , 29064fae5ebSjmc.Va hmac-sha2-384 , 29164fae5ebSjmc.Va hmac-sha2-512 , 29264fae5ebSjmcor 29364fae5ebSjmc.Va hmac-ripemd . 29464fae5ebSjmcbased on the authentication method specified in the AH proposal. 29564fae5ebSjmc.It ah_ecn, esp_ecn, comp_ecn 29639c69373SniklasSet to 29739c69373Sniklas.Va yes 29864fae5ebSjmcor 29964fae5ebSjmc.Va no , 30064fae5ebSjmcbased on whether ECN was requested for the IPsec tunnel. 30164fae5ebSjmc.It ah_encapsulation, esp_encapsulation, comp_encapsulation 302dfe2ac47SniklasSet to 30364fae5ebSjmc.Va tunnel 30464fae5ebSjmcor 30564fae5ebSjmc.Va transport , 30664fae5ebSjmcbased on the AH, ESP, and compression proposal. 30764fae5ebSjmc.It ah_group_desc, esp_group_desc, comp_group_desc 30864fae5ebSjmcThe Diffie-Hellman group identifier from the AH, ESP, and compression 30964fae5ebSjmcproposal, used for PFS during Quick Mode (see the pfs attribute 3105c18a548Sjmcbelow). 31164fae5ebSjmcIf more than one of these attributes are set to a value other 31264fae5ebSjmcthan zero, they should have the same value (in valid IKE proposals). 31364fae5ebSjmcValid values are 1 (768-bit MODP), 2 (1024-bit MODP), 3 (155-bit EC), 3141c415274Smikeb4 (185-bit EC), 5 (1536-bit MODP), 14 (2048-bit MODP), 15 (3072-bit MODP), 3151c415274Smikeb16 (4096-bit MODP), 17 (6144-bit MODP), and 18 (8192-bit MODP). 31632cbc914Sangelos.It ah_hash_alg 31732cbc914SangelosOne of 31832cbc914Sangelos.Va md5 , 31932cbc914Sangelos.Va sha , 320fa0d5da1Sniklas.Va ripemd , 32105e67174Smarkus.Va sha2-256 , 3224689c036Smiod.Va sha2-384 , 32305e67174Smarkus.Va sha2-512 , 32432cbc914Sangelosor 32532cbc914Sangelos.Va des , 3264aac73a4Saaronbased on the hash algorithm specified in the AH proposal. 3274aac73a4SaaronThis attribute describes the generic transform to be used in the AH 32832cbc914Sangelosauthentication. 32964fae5ebSjmc.It ah_key_length, esp_key_length 33064fae5ebSjmcThe number of key bits to be used by the authentication and encryption 33164fae5ebSjmcalgorithms respectively (for variable key-size algorithms). 332f6769d33Sjmc.It ah_key_rounds, esp_key_rounds 33364fae5ebSjmcThe number of rounds of the authentication and encryption algorithms 33464fae5ebSjmcrespectively (for variable round algorithms). 33564fae5ebSjmc.It ah_life_kbytes, esp_life_kbytes, comp_life_kbytes 33664fae5ebSjmcSet to the lifetime of the AH, ESP, and compression proposal, in 33764fae5ebSjmckbytes of traffic. 33864fae5ebSjmcIf no lifetime was proposed for the corresponding 33964fae5ebSjmcprotocol (e.g., there was no proposal for AH), the corresponding 34064fae5ebSjmcattribute will be set to zero. 34164fae5ebSjmc.It ah_life_seconds, esp_life_seconds, comp_life_seconds 34264fae5ebSjmcSet to the lifetime of the AH, ESP, and compression proposal, in 34364fae5ebSjmcseconds. 34464fae5ebSjmcIf no lifetime was proposed for the corresponding protocol 34564fae5ebSjmc(e.g., there was no proposal for AH), the corresponding attribute will 34664fae5ebSjmcbe set to zero. 34764fae5ebSjmc.It ah_present, esp_present, comp_present 34864fae5ebSjmcSet to 34964fae5ebSjmc.Va yes 35064fae5ebSjmcif an AH, ESP, or compression proposal was received respectively, 35164fae5ebSjmc.Va no 35264fae5ebSjmcotherwise. 35364fae5ebSjmc.It app_domain 35464fae5ebSjmcAlways set to 35564fae5ebSjmc.Va IPsec policy . 35664fae5ebSjmc.It comp_alg 35764fae5ebSjmcOne of 358977d5ed8Sjmc.Va oui 35964fae5ebSjmcor 3607834797cSbluhm.Va deflate , 36164fae5ebSjmcbased on the compression algorithm specified in the compression 36264fae5ebSjmcproposal. 36364fae5ebSjmc.It comp_dict_size 36464fae5ebSjmcSpecifies the log2 maximum size of the dictionary, according to the 36564fae5ebSjmccompression proposal. 36664fae5ebSjmc.It comp_private_alg 36764fae5ebSjmcSet to an integer specifying the private algorithm in use, according 36864fae5ebSjmcto the compression proposal. 36964fae5ebSjmc.It doi 37064fae5ebSjmcAlways set to 37164fae5ebSjmc.Va ipsec . 37264fae5ebSjmc.It esp_auth_alg 37364fae5ebSjmcOne of 37464fae5ebSjmc.Va hmac-md5 , 37564fae5ebSjmc.Va hmac-sha , 37664fae5ebSjmc.Va des-mac , 37764fae5ebSjmc.Va kpdk , 37864fae5ebSjmc.Va hmac-sha2-256 , 37964fae5ebSjmc.Va hmac-sha2-384 , 38064fae5ebSjmc.Va hmac-sha2-512 , 38164fae5ebSjmcor 38264fae5ebSjmc.Va hmac-ripemd 38364fae5ebSjmcbased on the authentication method specified in the ESP proposal. 38432cbc914Sangelos.It esp_enc_alg 38532cbc914SangelosOne of 38632cbc914Sangelos.Va des , 38732cbc914Sangelos.Va des-iv64 , 38832cbc914Sangelos.Va 3des , 38932cbc914Sangelos.Va rc4 , 39032cbc914Sangelos.Va idea , 39132cbc914Sangelos.Va cast , 39232cbc914Sangelos.Va blowfish , 39332cbc914Sangelos.Va 3idea , 39432cbc914Sangelos.Va des-iv32 , 39532cbc914Sangelos.Va rc4 , 39632cbc914Sangelos.Va null , 397bfc24386Sniklasor 398bfc24386Sniklas.Va aes , 39932cbc914Sangelosbased on the encryption algorithm specified in the ESP proposal. 40064fae5ebSjmc.It GMTTimeOfDay 40164fae5ebSjmcSet to the UTC date/time, in YYYYMMDDHHmmSS format. 40264fae5ebSjmc.It initiator 4039222c8b9SangelosSet to 4049222c8b9Sangelos.Va yes 40564fae5ebSjmcif the local daemon is initiating the Phase 2 SA, 40664fae5ebSjmc.Va no 40764fae5ebSjmcotherwise. 40864fae5ebSjmc.It local_negotiation_address 40964fae5ebSjmcSet to the IPv4 or IPv6 address of the local interface used by the local IKE 41064fae5ebSjmcdaemon for this exchange. 41164fae5ebSjmc.It LocalTimeOfDay 41264fae5ebSjmcSet to the local date/time, in YYYYMMDDHHmmSS format. 41364fae5ebSjmc.It pfs 41464fae5ebSjmcSet to 41564fae5ebSjmc.Va yes 41664fae5ebSjmcif a Diffie-Hellman exchange will be performed during this Quick Mode, 41764fae5ebSjmc.Va no 41864fae5ebSjmcotherwise. 41964fae5ebSjmc.It phase_1 42064fae5ebSjmcSet to 42164fae5ebSjmc.Va aggressive 42264fae5ebSjmcif aggressive mode was used to establish the Phase 1 SA, or 42364fae5ebSjmc.Va main 42464fae5ebSjmcif main mode was used instead. 425a3098c9bSniklas.It phase1_group_desc 426a3098c9bSniklasThe Diffie-Hellman group identifier used in IKE Phase 1. 427a3098c9bSniklasTakes the same values as 428a3098c9bSniklas.Va ah_group_desc . 42964fae5ebSjmc.It remote_filter, local_filter, remote_id 43064fae5ebSjmcWhen the corresponding filter_type specifies an address range or 43164fae5ebSjmcsubnet, these are set to the upper and lower part of the address 43264fae5ebSjmcspace separated by a dash ('-') character (if the type specifies a 43364fae5ebSjmcsingle address, they are set to that address). 43464fae5ebSjmc.Pp 43564fae5ebSjmcFor FQDN and User FQDN types, these are set to the respective string. 43664fae5ebSjmcFor Key ID, these are set to the hexadecimal representation of the 43764fae5ebSjmcassociated byte string (lower-case letters used) if the Key ID payload 43864fae5ebSjmccontains non-printable characters. 43964fae5ebSjmcOtherwise, they are set to the respective string. 44064fae5ebSjmc.Pp 44164fae5ebSjmcFor ASN1 DN, these are set to the text encoding of the Distinguished 44264fae5ebSjmcName in the payload sent or received. 44364fae5ebSjmcThe format is the same as that used in the Licensees field. 44432cbc914Sangelos.It remote_filter_addr_lower, local_filter_addr_lower, remote_id_addr_lower 44532cbc914SangelosWhen the corresponding filter_type is 44632cbc914Sangelos.Va IPv4 address 44732cbc914Sangelosor 44832cbc914Sangelos.Va IPv6 address , 4494aac73a4Saaronthese contain the respective address. 4504aac73a4SaaronFor 45132cbc914Sangelos.Va IPv4 range 45232cbc914Sangelosor 45332cbc914Sangelos.Va IPv6 range , 4544aac73a4Saaronthese contain the lower end of the address range. 4554aac73a4SaaronFor 45632cbc914Sangelos.Va IPv4 subnet 45732cbc914Sangelosor 45832cbc914Sangelos.Va IPv6 subnet , 45932cbc914Sangelosthese contain the lowest address in the specified subnet. 46064fae5ebSjmc.It remote_filter_addr_upper, local_filter_addr_upper, remote_id_addr_upper 46164fae5ebSjmcWhen the corresponding filter_type is 46264fae5ebSjmc.Va IPv4 address 46364fae5ebSjmcor 46464fae5ebSjmc.Va IPv6 address , 46564fae5ebSjmcthese contain the respective address. 46664fae5ebSjmcFor 46764fae5ebSjmc.Va IPv4 range 46864fae5ebSjmcor 46964fae5ebSjmc.Va IPv6 range , 47064fae5ebSjmcthey contain the upper end of the address range. 47164fae5ebSjmcFor 47264fae5ebSjmc.Va IPv4 subnet 47364fae5ebSjmcor 47464fae5ebSjmc.Va IPv6 subnet , 47564fae5ebSjmcthey contain the highest address in the specified subnet. 47632cbc914Sangelos.It remote_filter_port, local_filter_port, remote_id_port 47732cbc914SangelosSet to the transport protocol port. 47832cbc914Sangelos.It remote_filter_proto, local_filter_proto, remote_id_proto 47932cbc914SangelosSet to 480613bb0adSniklas.Va etherip , 48132cbc914Sangelos.Va tcp , 48232cbc914Sangelos.Va udp , 483613bb0adSniklasor the transport protocol number, depending on the transport protocol set 484613bb0adSniklasin the IDci, IDcr, and Main Mode peer ID respectively. 48564fae5ebSjmc.It remote_filter_type, local_filter_type, remote_id_type 48664fae5ebSjmcSet to 48764fae5ebSjmc.Va IPv4 address , 48864fae5ebSjmc.Va IPv4 range , 48964fae5ebSjmc.Va IPv4 subnet , 49064fae5ebSjmc.Va IPv6 address , 49164fae5ebSjmc.Va IPv6 range , 49264fae5ebSjmc.Va IPv6 subnet , 49364fae5ebSjmc.Va FQDN , 49464fae5ebSjmc.Va User FQDN , 49564fae5ebSjmc.Va ASN1 DN , 49664fae5ebSjmc.Va ASN1 GN , 49764fae5ebSjmcor 49864fae5ebSjmc.Va Key ID , 49964fae5ebSjmcbased on the Quick Mode Initiator ID, Quick Mode Responder ID, and 50064fae5ebSjmcMain Mode peer ID respectively. 5013e9923c8Sniklas.It remote_negotiation_address 5028024bc32ShoSet to the IPv4 or IPv6 address of the remote IKE daemon. 50332cbc914Sangelos.El 5042b65e200Sjmc.Sh FILES 5052b65e200Sjmc.Bl -tag -width /etc/isakmpd/isakmpd.policy 5062b65e200Sjmc.It Pa /etc/isakmpd/isakmpd.policy 5072b65e200SjmcThe default 5087a80d3a7Sjmc.Xr isakmpd 8 5092b65e200Sjmcpolicy configuration file. 5102b65e200Sjmc.El 51132cbc914Sangelos.Sh EXAMPLES 51232cbc914Sangelos.Bd -literal 51332cbc914Sangelos Authorizer: "POLICY" 51432cbc914Sangelos Comment: This bare-bones assertion accepts everything 51532cbc914Sangelos 51610f83a8bSniklas 51710f83a8bSniklas 51832cbc914Sangelos Authorizer: "POLICY" 519ab9049dcSangelos Licensees: "passphrase-md5-hex:10838982612aff543e2e62a67c786550" 52032cbc914Sangelos Comment: This policy accepts anyone using shared-secret 5215678a57aShshoexer authentication using the password mekmitasdigoat, 52232cbc914Sangelos and does ESP with some form of encryption (not null). 52332cbc914Sangelos Conditions: app_domain == "IPsec policy" && 52432cbc914Sangelos esp_present == "yes" && 52532cbc914Sangelos esp_enc_alg != "null" -> "true"; 52632cbc914Sangelos 52710f83a8bSniklas 52810f83a8bSniklas 52932cbc914Sangelos Authorizer: "POLICY" 53032cbc914Sangelos Licensees: "subpolicy1" || "subpolicy2" 53132cbc914Sangelos Comment: Delegate to two other sub-policies, so we 53232cbc914Sangelos can manage our policy better. Since these subpolicies 53332cbc914Sangelos are not "owned" by a key (and are thus unsigned), they 53432cbc914Sangelos have to be in isakmpd.policy. 53532cbc914Sangelos Conditions: app_domain == "IPsec policy"; 53632cbc914Sangelos 53710f83a8bSniklas 53810f83a8bSniklas 53932cbc914Sangelos KeyNote-Version: 2 540ab9049dcSangelos Licensees: "passphrase-md5-hex:9c42a1346e333a770904b2a2b37fa7d3" 54132cbc914Sangelos Conditions: esp_present == "yes" -> "true"; 54232cbc914Sangelos Authorizer: "subpolicy1" 54332cbc914Sangelos 54410f83a8bSniklas 54510f83a8bSniklas 54632cbc914Sangelos Conditions: ah_present == "yes" -> 54732cbc914Sangelos { 54832cbc914Sangelos ah_auth_alg == "md5" -> "true"; 54932cbc914Sangelos ah_auth_alg == "sha" && 55032cbc914Sangelos esp_present == "no" -> "true"; 55132cbc914Sangelos }; 552ab9049dcSangelos Licensees: "passphrase:otherpassword" || 553ab9049dcSangelos "passphrase-sha1-hex:f5ed6e4abd30c36a89409b5da7ecb542c9fbf00f" 55432cbc914Sangelos Authorizer: "subpolicy2" 55532cbc914Sangelos 55610f83a8bSniklas 55710f83a8bSniklas 55810f83a8bSniklas keynote-version: 2 55910f83a8bSniklas comment: this is an example of a policy delegating to a CN. 56010f83a8bSniklas authorizer: "POLICY" 5618f426ec7Smcbride licensees: "DN:/CN=CA Certificate/emailAddress=ca@foo.bar.com" 56210f83a8bSniklas 56310f83a8bSniklas 56410f83a8bSniklas 56532cbc914Sangelos keynote-version: 2 56632cbc914Sangelos comment: This is an example of a policy delegating to a key. 56732cbc914Sangelos authorizer: "POLICY" 568e1665715Sjmc licensees: "x509-base64:MIICGDCCAYGgAwIBAgIBADANBgkqhkiG9w0BAQQ\e 569e1665715Sjmc FADBSMQswCQYDVQQGEwJHQjEOMAwGA1UEChMFQmVuQ28xETAPBg\e 570e1665715Sjmc NVBAMTCEJlbkNvIENBMSAwHgYJKoZIhvcNAQkBFhFiZW5AYWxnc\e 571e1665715Sjmc m91cC5jby51azAeFw05OTEwMTEyMjQ5MzhaFw05OTExMTAyMjQ5\e 572e1665715Sjmc MzhaMFIxCzAJBgNVBAYTAkdCMQ4wDAYDVQQKEwVCZW5DbzERMA8\e 573e1665715Sjmc GA1UEAxMIQmVuQ28gQ0ExIDAeBgkqhkiG9w0BCQEWEWJlbkBhbG\e 574e1665715Sjmc dyb3VwLmNvLnVrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBg\e 575e1665715Sjmc QCxyAte2HEVouXg1Yu+vDihbnjDRn+6k00Rv6cZqbwA3BQ30mC/\e 576e1665715Sjmc 3TFJ09VGXCaM0UKfpnxIpkBYLmOA3FWkKI0RvPU7E1AhKkhC1Ds\e 577e1665715Sjmc PSBFjYHrB15T5lYzgfwKJCIxTDzZDx2iobUgPa0FRNGVUjpQ4/k\e 578e1665715Sjmc MJ2BF4Wh7zY3X08rMzsQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBA\e 579e1665715Sjmc DWJ5pbTcE7iKHWLQTMYiz8i9jGi5+Eo1yr1Bab90tgaGQV0zrRH\e 580e1665715Sjmc jDHgAAy1h8WSXuyQrXfgbx2rnWFPhx9CfmuAXn7sZmQE3mnUqeP\e 581e1665715Sjmc ZL2dW87jdBGqtoUdNcoz5zKBkC943yasNui/O01MiqgadTThTJH\e 58232cbc914Sangelos d1Pn17LbJC1ZVRNjR5" 58332cbc914Sangelos conditions: app_domain == "IPsec policy" && doi == "ipsec" && 58432cbc914Sangelos pfs == "yes" && esp_present == "yes" && ah_present == "no" && 5858024bc32Sho (esp_enc_alg == "3des" || esp_enc_alg == "aes") -> "true"; 58632cbc914Sangelos 58710f83a8bSniklas 58810f83a8bSniklas 58932cbc914Sangelos keynote-version: 2 59032cbc914Sangelos comment: This is an example of a credential, the signature does 59132cbc914Sangelos not really verify (although the keys are real). 592e1665715Sjmc licensees: "x509-base64:MIICGDCCAYGgAwIBAgIBADANBgkqhkiG9w0BAQQ\e 593e1665715Sjmc FADBSMQswCQYDVQQGEwJHQjEOMAwGA1UEChMFQmVuQ28xETAPBg\e 594e1665715Sjmc NVBAMTCEJlbkNvIENBMSAwHgYJKoZIhvcNAQkBFhFiZW5AYWxnc\e 595e1665715Sjmc m91cC5jby51azAeFw05OTEwMTEyMzA2MjJaFw05OTExMTAyMzA2\e 596e1665715Sjmc MjJaMFIxCzAJBgNVBAYTAkdCMQ4wDAYDVQQKEwVCZW5DbzERMA8\e 597e1665715Sjmc GA1UEAxMIQmVuQ28gQ0ExIDAeBgkqhkiG9w0BCQEWEWJlbkBhbG\e 598e1665715Sjmc dyb3VwLmNvLnVrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBg\e 599e1665715Sjmc QDaCs+JAB6YRKAVkoi1NkOpE1V3syApjBj0Ahjq5HqYAACo1JhM\e 600e1665715Sjmc +QsPwuSWCNhBT51HX6G6UzfY3mOUz/vou6MJ/wor8EdeTX4nucx\e 601e1665715Sjmc NSz/r6XI262aXezAp+GdBviuJZx3Q67ON/IWYrB4QtvihI4bMn5\e 602e1665715Sjmc E55nF6TKtUMJTdATvs/wIDAQABMA0GCSqGSIb3DQEBBAUAA4GBA\e 603e1665715Sjmc MaQOSkaiR8id0h6Zo0VSB4HpBnjpWqz1jNG8N4RPN0W8muRA2b9\e 604e1665715Sjmc 85GNP1bkC3fK1ZPpFTB0A76lLn11CfhAf/gV1iz3ELlUHo5J8nx\e 605e1665715Sjmc Pu6XfsGJm3HsXJOuvOog8Aean4ODo4KInuAsnbLzpGl0d+Jqa5u\e 60632cbc914Sangelos TZUxsyg4QOBwYEU92H" 607e1665715Sjmc authorizer: "x509-base64:MIICGDCCAYGgAwIBAgIBADANBgkqhkiG9w0BAQQ\e 608e1665715Sjmc FADBSMQswCQYDVQQGEwJHQjEOMAwGA1UEChMFQmVuQ28xETAPBg\e 609e1665715Sjmc NVBAMTCEJlbkNvIENBMSAwHgYJKoZIhvcNAQkBFhFiZW5AYWxnc\e 610e1665715Sjmc m91cC5jby51azAeFw05OTEwMTEyMjQ5MzhaFw05OTExMTAyMjQ5\e 611e1665715Sjmc MzhaMFIxCzAJBgNVBAYTAkdCMQ4wDAYDVQQKEwVCZW5DbzERMA8\e 612e1665715Sjmc GA1UEAxMIQmVuQ28gQ0ExIDAeBgkqhkiG9w0BCQEWEWJlbkBhbG\e 613e1665715Sjmc dyb3VwLmNvLnVrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBg\e 614e1665715Sjmc QCxyAte2HEVouXg1Yu+vDihbnjDRn+6k00Rv6cZqbwA3BQ30mC/\e 615e1665715Sjmc 3TFJ09VGXCaM0UKfpnxIpkBYLmOA3FWkKI0RvPU7E1AhKkhC1Ds\e 616e1665715Sjmc PSBFjYHrB15T5lYzgfwKJCIxTDzZDx2iobUgPa0FRNGVUjpQ4/k\e 617e1665715Sjmc MJ2BF4Wh7zY3X08rMzsQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBA\e 618e1665715Sjmc DWJ5pbTcE7iKHWLQTMYiz8i9jGi5+Eo1yr1Bab90tgaGQV0zrRH\e 619e1665715Sjmc jDHgAAy1h8WSXuyQrXfgbx2rnWFPhx9CfmuAXn7sZmQE3mnUqeP\e 620e1665715Sjmc ZL2dW87jdBGqtoUdNcoz5zKBkC943yasNui/O01MiqgadTThTJH\e 62132cbc914Sangelos d1Pn17LbJC1ZVRNjR5" 62232cbc914Sangelosconditions: app_domain == "IPsec policy" && doi == "ipsec" && 62332cbc914Sangelos pfs == "yes" && esp_present == "yes" && ah_present == "no" && 6248024bc32Sho (esp_enc_alg == "3des" || esp_enc_alg == "aes") -> "true"; 625e1665715SjmcSignature: "sig-x509-sha1-base64:ql+vrUxv14DcBOQHR2jsbXayq6T\e 626e1665715Sjmc mmtMiUB745a8rjwSrQwh+KIVDlUrghPnqhSIkWSDi9oWWMbfg\e 627e1665715Sjmc mkdudZ0wjgeTLMI2NI4GibMMsToakOKMex/0q4cpdpln3DKcQ\e 62832cbc914Sangelos IcjzRv4khDws69FT3QfELjcpShvbLrXmh1Z00OFmxjyqDw=" 62932cbc914Sangelos.Ed 630ab1e9dfdSho.Sh SEE ALSO 631ab1e9dfdSho.Xr ipsec 4 , 632ab1e9dfdSho.Xr keynote 4 , 633ab1e9dfdSho.Xr keynote 5 , 634ab1e9dfdSho.Xr isakmpd 8 6352b65e200Sjmc.Sh BUGS 6362b65e200SjmcA more sane way of expressing IPv6 address ranges is needed. 637