1 '\" te
   2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
   3 .\" Copyright (c) 2015, Circonus, Inc. All Rights Reserved.
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
   5 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the
   6 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH IKE.CONFIG 4 "Apr 27, 2009"
   8 .SH NAME
   9 ike.config \- configuration file for IKE policy
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 \fB/etc/inet/ike/config\fR
  14 .fi
  15 
  16 .SH DESCRIPTION
  17 .sp
  18 .LP
  19 The \fB/etc/inet/ike/config\fR file contains rules for matching inbound IKE
  20 requests. It also contains rules for preparing outbound \fBIKE\fR requests.
  21 .sp
  22 .LP
  23 You can test the syntactic correctness of an \fB/etc/inet/ike/config\fR file by
  24 using the \fB-c\fR or \fB-f\fR options of \fBin.iked\fR(1M). You must use the
  25 \fB-c\fR option to test a \fBconfig\fR file. You might need to use the \fB-f\fR
  26 option if it is not in \fB/etc/inet/ike/config\fR.
  27 .SS "Lexical Components"
  28 .sp
  29 .LP
  30 On any line, an unquoted \fB#\fR character introduces a comment. The remainder
  31 of that line is ignored. Additionally, on any line, an unquoted \fB//\fR
  32 sequence introduces a comment. The remainder of that line is ignored.
  33 .sp
  34 .LP
  35 There are several types of lexical tokens in the \fBike.config\fR file:
  36 .sp
  37 .ne 2
  38 .na
  39 \fB\fInum\fR\fR
  40 .ad
  41 .sp .6
  42 .RS 4n
  43 A decimal, hex, or octal number representation is as in 'C'.
  44 .RE
  45 
  46 .sp
  47 .ne 2
  48 .na
  49 \fB\fIIPaddr\fR/\fIprefix\fR/\fIrange\fR\fR
  50 .ad
  51 .sp .6
  52 .RS 4n
  53 An IPv4 or IPv6 address with an optional /\fINNN\fR suffix, (where \fINNN\fR is
  54 a \fInum\fR) that indicates an address (\fBCIDR\fR) prefix (for example,
  55 \fB10.1.2.0/24\fR). An optional /\fIADDR\fR suffix (where \fIADDR\fR is a
  56 second IP address) indicates an address/mask pair (for example,
  57 \fB10.1.2.0/255.255.255.0\fR). An optional -\fIADDR\fR suffix (where \fIADDR\fR
  58 is a second IPv4 address) indicates an inclusive range of addresses (for
  59 example, \fB10.1.2.0-10.1.2.255\fR). The \fB/\fR or \fB-\fR can be surrounded
  60 by an arbitrary amount of white space.
  61 .RE
  62 
  63 .sp
  64 .ne 2
  65 .na
  66 \fB\fBXXX\fR | \fBYYY\fR | \fBZZZ\fR\fR
  67 .ad
  68 .sp .6
  69 .RS 4n
  70 Either the words \fBXX\fRX, \fBYYY\fR, or \fBZZZ\fR, for example, {yes,no}.
  71 .RE
  72 
  73 .sp
  74 .ne 2
  75 .na
  76 \fBp1-id-type\fR
  77 .ad
  78 .sp .6
  79 .RS 4n
  80 An IKE phase 1 identity type. IKE phase 1 identity types include:
  81 .br
  82 .in +2
  83 \fBdn, DN\fR
  84 .in -2
  85 .br
  86 .in +2
  87 \fBdns, DNS\fR
  88 .in -2
  89 .br
  90 .in +2
  91 \fBfqdn, FQDN\fR
  92 .in -2
  93 .br
  94 .in +2
  95 \fBgn, GN\fR
  96 .in -2
  97 .br
  98 .in +2
  99 \fBip, IP\fR
 100 .in -2
 101 .br
 102 .in +2
 103 \fBipv4\fR
 104 .in -2
 105 .br
 106 .in +2
 107 \fBipv4_prefix\fR
 108 .in -2
 109 .br
 110 .in +2
 111 \fBipv4_range\fR
 112 .in -2
 113 .br
 114 .in +2
 115 \fBipv6\fR
 116 .in -2
 117 .br
 118 .in +2
 119 \fBipv6_prefix\fR
 120 .in -2
 121 .br
 122 .in +2
 123 \fBipv6_range\fR
 124 .in -2
 125 .br
 126 .in +2
 127 \fBmbox, MBOX\fR
 128 .in -2
 129 .br
 130 .in +2
 131 \fBuser_fqdn\fR
 132 .in -2
 133 .RE
 134 
 135 .sp
 136 .ne 2
 137 .na
 138 \fB\fB"\fR\fIstring\fR\fB"\fR\fR
 139 .ad
 140 .sp .6
 141 .RS 4n
 142 A quoted string.
 143 .sp
 144 Examples include:\fB"Label foo"\fR, or \fB"C=US, OU=Sun Microsystems\\, Inc.,
 145 N=olemcd@eng.example.com"\fR
 146 .sp
 147 A backslash (\fB\e\fR) is an escape character. If the string needs an actual
 148 backslash, two must be specified.
 149 .RE
 150 
 151 .sp
 152 .ne 2
 153 .na
 154 \fB\fIcert-sel\fR\fR
 155 .ad
 156 .sp .6
 157 .RS 4n
 158 A certificate selector, a \fIstring\fR which specifies the identities of zero
 159 or more certificates. The specifiers can conform to \fBX.509\fR naming
 160 conventions.
 161 .sp
 162 A \fIcert-sel\fR can also use various shortcuts to match either subject
 163 alternative names, the filename or \fBslot\fR of a certificate in
 164 \fB/etc/inet/ike/publickeys\fR, or even the \fBISSUER\fR. For example:
 165 .sp
 166 .in +2
 167 .nf
 168 "SLOT=0"
 169 "EMAIL=postmaster@domain.org"
 170 "webmaster@domain.org" # Some just work w/o TYPE=
 171 "IP=10.0.0.1"
 172 "10.21.11.11"          # Some just work w/o TYPE=
 173 "DNS=www.domain.org"
 174 "mailhost.domain.org"  # Some just work w/o TYPE=
 175 "ISSUER=C=US, O=Sun Microsystems\\, Inc., CN=Sun CA"
 176 .fi
 177 .in -2
 178 .sp
 179 
 180 Any \fIcert-sel\fR preceded by the character \fB!\fR indicates a negative
 181 match, that is, not matching this specifier. These are the same kind of strings
 182 used in \fBikecert\fR(1M).
 183 .RE
 184 
 185 .sp
 186 .ne 2
 187 .na
 188 \fB\fIldap-list\fR\fR
 189 .ad
 190 .sp .6
 191 .RS 4n
 192 A quoted, comma-separated list of LDAP servers and ports.
 193 .sp
 194 For example, \fB"ldap1.example.com"\fR, \fB"ldap1.example.com:389"\fR,
 195 \fB"ldap1.example.com:389,ldap2.example.com"\fR.
 196 .sp
 197 The default port for LDAP is \fB389\fR.
 198 .RE
 199 
 200 .sp
 201 .ne 2
 202 .na
 203 \fB\fIparameter-list\fR\fR
 204 .ad
 205 .sp .6
 206 .RS 4n
 207 A list of parameters.
 208 .RE
 209 
 210 .SS "File Body Entries"
 211 .sp
 212 .LP
 213 There are four main types of entries:
 214 .RS +4
 215 .TP
 216 .ie t \(bu
 217 .el o
 218 global parameters
 219 .RE
 220 .RS +4
 221 .TP
 222 .ie t \(bu
 223 .el o
 224 IKE phase 1 transform defaults
 225 .RE
 226 .RS +4
 227 .TP
 228 .ie t \(bu
 229 .el o
 230 IKE rule defaults
 231 .RE
 232 .RS +4
 233 .TP
 234 .ie t \(bu
 235 .el o
 236 IKE rules
 237 .RE
 238 .sp
 239 .LP
 240 The global parameter entries are as follows:
 241 .sp
 242 .ne 2
 243 .na
 244 \fBcert_root \fIcert-sel\fR\fR
 245 .ad
 246 .sp .6
 247 .RS 4n
 248 The X.509 distinguished name of a certificate that is a trusted root CA
 249 certificate.It must be encoded in a file in the \fB/etc/inet/ike/publickeys\fR
 250 directory. It must have a CRL in \fB/etc/inet/ike/crl\fRs. Multiple
 251 \fBcert_root\fR parameters aggregate.
 252 .RE
 253 
 254 .sp
 255 .ne 2
 256 .na
 257 \fBcert_trust \fIcert-sel\fR\fR
 258 .ad
 259 .sp .6
 260 .RS 4n
 261 Specifies an X.509 distinguished name of a certificate that is self-signed, or
 262 has otherwise been verified as trustworthy for signing IKE exchanges. It must
 263 be encoded in a file in \fB/etc/inet/ike/publickeys\fR. Multiple
 264 \fBcert_trust\fR parameters aggregate.
 265 .RE
 266 
 267 .sp
 268 .ne 2
 269 .na
 270 \fBexpire_timer \fIinteger\fR\fR
 271 .ad
 272 .sp .6
 273 .RS 4n
 274 The number of seconds to let a not-yet-complete IKE Phase I (Main Mode)
 275 negotiation linger before deleting it. Default value: 300 seconds.
 276 .RE
 277 
 278 .sp
 279 .ne 2
 280 .na
 281 \fBignore_crls\fR
 282 .ad
 283 .sp .6
 284 .RS 4n
 285 If this keyword is present in the file, \fBin.iked\fR(1M) ignores Certificate
 286 Revocation Lists (\fBCRL\fRs) for root \fBCA\fRs (as given in \fBcert_root\fR)
 287 .RE
 288 
 289 .sp
 290 .ne 2
 291 .na
 292 \fBldap_server \fIldap-list\fR\fR
 293 .ad
 294 .sp .6
 295 .RS 4n
 296 A list of LDAP servers to query for certificates. The list can be additive.
 297 .RE
 298 
 299 .sp
 300 .ne 2
 301 .na
 302 \fBpkcs11_path \fIstring\fR\fR
 303 .ad
 304 .sp .6
 305 .RS 4n
 306 The string that follows is a name of a shared object (\fB\&.so\fR) that
 307 implements the PKCS#11 standard. The name is passed directly into
 308 \fBdlopen\fR(3C) for linking, with all of the semantics of that library call.
 309 By default, \fBin.iked\fR(1M) runs the same ISA as the running kernel, so a
 310 library specified using \fBpkcs11_path\fR and an absolute pathname \fBmust\fR
 311 match the same ISA as the kernel. One can use the start/exec SMF property (see
 312 \fBsvccfg\fR(1M)) to change \fBin.iked\fR's ISA, but it is not recommended.
 313 .sp
 314 If this setting is not present, the default value is set to \fBlibpkcs11.so\fR.
 315 Most cryptographic providers go through the default library, and this parameter
 316 should only be used if a specialized provider of IKE-useful cryptographic
 317 services cannot interface with the Solaris Cryptographic Framework. See
 318 \fBcryptoadm\fR(1M).
 319 .sp
 320 This option is now deprecated, and may be removed in a future release.
 321 .RE
 322 
 323 .sp
 324 .ne 2
 325 .na
 326 \fBretry_limit \fIinteger\fR\fR
 327 .ad
 328 .sp .6
 329 .RS 4n
 330 The number of retransmits before any IKE negotiation is aborted. Default value:
 331 5 times.
 332 .RE
 333 
 334 .sp
 335 .ne 2
 336 .na
 337 \fBretry_timer_init \fIinteger\fR or \fIfloat\fR\fR
 338 .ad
 339 .sp .6
 340 .RS 4n
 341 The initial interval (in seconds) between retransmits. This interval is doubled
 342 until the \fBretry_timer_max\fR value (see below) is reached. Default value:
 343 0.5 seconds.
 344 .RE
 345 
 346 .sp
 347 .ne 2
 348 .na
 349 \fBretry_timer_max \fIinteger\fR or \fIfloat\fR\fR
 350 .ad
 351 .sp .6
 352 .RS 4n
 353 The maximum interval (in seconds) between retransmits. The doubling retransmit
 354 interval stops growing at this limit. Default value: 30 seconds.
 355 .LP
 356 Note -
 357 .sp
 358 .RS 2
 359 This value is never reached with the default configuration. The longest
 360 interval is 8 (0.5 * 2 ^ (5 - 1)) seconds.
 361 .RE
 362 .RE
 363 
 364 .sp
 365 .ne 2
 366 .na
 367 \fBproxy \fIstring\fR\fR
 368 .ad
 369 .sp .6
 370 .RS 4n
 371 The string following this keyword must be a URL for an HTTP proxy, for example,
 372 \fBhttp://proxy:8080\fR.
 373 .RE
 374 
 375 .sp
 376 .ne 2
 377 .na
 378 \fBsocks \fIstring\fR\fR
 379 .ad
 380 .sp .6
 381 .RS 4n
 382 The string following this keyword must be a URL for a SOCKS proxy, for example,
 383 \fBsocks://socks-proxy\fR.
 384 .RE
 385 
 386 .sp
 387 .ne 2
 388 .na
 389 \fBuse_http\fR
 390 .ad
 391 .sp .6
 392 .RS 4n
 393 If this keyword is present in the file, \fBin.iked\fR(1M) uses HTTP to retrieve
 394 Certificate Revocation Lists (\fBCRL\fRs).
 395 .RE
 396 
 397 .sp
 398 .LP
 399 The following IKE phase 1 transform parameters can be prefigured using
 400 file-level defaults. Values specified within any given transform override these
 401 defaults.
 402 .sp
 403 .LP
 404 The IKE phase 1 transform defaults are as follows:
 405 .sp
 406 .ne 2
 407 .na
 408 \fBp1_lifetime_secs \fInum\fR\fR
 409 .ad
 410 .sp .6
 411 .RS 4n
 412 The proposed default lifetime, in seconds, of an IKE phase 1 security
 413 association (\fBSA\fR).
 414 .RE
 415 
 416 .sp
 417 .ne 2
 418 .na
 419 \fBp1_nonce_len \fInum\fR\fR
 420 .ad
 421 .sp .6
 422 .RS 4n
 423 The length in bytes of the phase 1 (quick mode) nonce data. This cannot be
 424 specified on a per-rule basis.
 425 .RE
 426 
 427 .sp
 428 .LP
 429 The following IKE rule parameters can be prefigured using file-level defaults.
 430 Values specified within any given rule override these defaults, unless a rule
 431 cannot.
 432 .sp
 433 .ne 2
 434 .na
 435 \fBp2_lifetime_secs \fInum\fR\fR
 436 .ad
 437 .sp .6
 438 .RS 4n
 439 The proposed default lifetime, in seconds, of an IKE phase 2 security
 440 association (SA). This value is optional. If omitted, a default value is used.
 441 .RE
 442 
 443 .sp
 444 .ne 2
 445 .na
 446 \fBp2_softlife_secs \fInum\fR\fR
 447 .ad
 448 .sp .6
 449 .RS 4n
 450 The soft lifetime of a phase 2 SA, in seconds. If this value is specified, the
 451 SA soft expires after the number of seconds specified by
 452 \fBp2_softlife_secs\fR. This causes \fBin.iked\fR to renegotiate a new phase 2
 453 SA before the original SA expires.
 454 .sp
 455 This value is optional, if omitted soft expiry occurs after 90% of the lifetime
 456 specified by \fBp2_lifetime_secs\fR. The value specified by
 457 \fBp2_softlife_secs\fR is ignored if \fBp2_lifetime_secs\fR is not specified.
 458 .sp
 459 Setting \fBp2_softlife_secs\fR to the same value as \fBp2_lifetime_secs\fR
 460 disables soft expires.
 461 .RE
 462 
 463 .sp
 464 .ne 2
 465 .na
 466 \fBp2_idletime_secs \fInum\fR\fR
 467 .ad
 468 .sp .6
 469 .RS 4n
 470 The idle lifetime of a phase 2 SA, in seconds. If the value is specified, the
 471 value specifies the lifetime of the SA, if the security association is not used
 472 before the SA is revalidated.
 473 .RE
 474 
 475 .sp
 476 .ne 2
 477 .na
 478 \fBp2_lifetime_kb \fInum\fR\fR
 479 .ad
 480 .sp .6
 481 .RS 4n
 482 The lifetime of an SA can optionally be specified in kilobytes. This parameter
 483 specifies the default value. If lifetimes are specified in both seconds and
 484 kilobytes, the SA expires when either the seconds or kilobyte threshholds are
 485 passed.
 486 .RE
 487 
 488 .sp
 489 .ne 2
 490 .na
 491 \fBp2_softlife_kb \fInum\fR\fR
 492 .ad
 493 .sp .6
 494 .RS 4n
 495 This value is the number of kilobytes that can be protected by an SA before a
 496 soft expire occurs (see \fBp2_softlife_secs\fR, above).
 497 .sp
 498 This value is optional. If omitted, soft expiry occurs after 90% of the
 499 lifetime specified by \fBp2_lifetime_kb\fR. The value specified by
 500 \fBp2_softlife_kb\fR is ignored if \fBp2_lifetime_kb\fR is not specified.
 501 .RE
 502 
 503 .sp
 504 .ne 2
 505 .na
 506 \fBp2_nonce_len \fInum\fR\fR
 507 .ad
 508 .sp .6
 509 .RS 4n
 510 The length in bytes of the phase 2 (quick mode) nonce data. This cannot be
 511 specified on a per-rule basis.
 512 .RE
 513 
 514 .sp
 515 .ne 2
 516 .na
 517 \fBlocal_id_type \fIp1-id-type\fR\fR
 518 .ad
 519 .sp .6
 520 .RS 4n
 521 The local identity for IKE requires a type. This identity type is reflected in
 522 the IKE exchange. The type can be one of the following:
 523 .RS +4
 524 .TP
 525 .ie t \(bu
 526 .el o
 527 an IP address (for example, \fB10.1.1.2\fR)
 528 .RE
 529 .RS +4
 530 .TP
 531 .ie t \(bu
 532 .el o
 533 DNS name (for example, \fBtest.domain.com\fR)
 534 .RE
 535 .RS +4
 536 .TP
 537 .ie t \(bu
 538 .el o
 539 MBOX RFC 822 name (for example, \fBroot@domain.com\fR)
 540 .RE
 541 .RS +4
 542 .TP
 543 .ie t \(bu
 544 .el o
 545 DNX.509 distinguished name (for example, \fBC=US, O=Sun Microsystems\, Inc.,
 546 CN=Sun Test cert\fR)
 547 .RE
 548 .RE
 549 
 550 .sp
 551 .ne 2
 552 .na
 553 \fBp1_xform '{' parameter-list '}\fR
 554 .ad
 555 .sp .6
 556 .RS 4n
 557 A phase 1 transform specifies a method for protecting an IKE phase 1 exchange.
 558 An initiator offers up lists of phase 1 transforms, and a receiver is expected
 559 to only accept such an entry if it matches one in a phase 1 rule. There can be
 560 several of these, and they are additive. There must be either at least one
 561 phase 1 transform in a rule or a global default phase 1 transform list. In a
 562 configuration file without a global default phase 1 transform list \fBand\fR a
 563 rule without a phase, transform list is an invalid file. Unless specified as
 564 optional, elements in the parameter-list must occur exactly once within a given
 565 transform's parameter-list:
 566 .sp
 567 .ne 2
 568 .na
 569 \fBoakley_group \fInumber\fR\fR
 570 .ad
 571 .sp .6
 572 .RS 4n
 573 The Oakley Diffie-Hellman group used for IKE SA key derivation. The group
 574 numbers are defined in RFC 2409, Appendix A, RFC 3526, and RFC 5114, section
 575 3.2. Acceptable values are currently:
 576 .br
 577 .in +2
 578 1 (MODP 768-bit)
 579 .in -2
 580 .br
 581 .in +2
 582 2 (MODP 1024-bit)
 583 .in -2
 584 .br
 585 .in +2
 586 3 (EC2N 155-bit)
 587 .in -2
 588 .br
 589 .in +2
 590 4 (EC2N 185-bit)
 591 .in -2
 592 .br
 593 .in +2
 594 5 (MODP 1536-bit)
 595 .in -2
 596 .br
 597 .in +2
 598 14 (MODP 2048-bit)
 599 .in -2
 600 .br
 601 .in +2
 602 15 (MODP 3072-bit)
 603 .in -2
 604 .br
 605 .in +2
 606 16 (MODP 4096-bit)
 607 .in -2
 608 .br
 609 .in +2
 610 17 (MODP 6144-bit)
 611 .in -2
 612 .br
 613 .in +2
 614 18 (MODP 8192-bit)
 615 .in -2
 616 .br
 617 .in +2
 618 19 (ECP 256-bit)
 619 .in -2
 620 .br
 621 .in +2
 622 20 (ECP 384-bit)
 623 .in -2
 624 .br
 625 .in +2
 626 21 (ECP 521-bit)
 627 .in -2
 628 .br
 629 .in +2
 630 22 (MODP 1024-bit, with 160-bit Prime Order Subgroup)
 631 .in -2
 632 .br
 633 .in +2
 634 23 (MODP 2048-bit, with 224-bit Prime Order Subgroup)
 635 .in -2
 636 .br
 637 .in +2
 638 24 (MODP 2048-bit, with 256-bit Prime Order Subgroup)
 639 .in -2
 640 .br
 641 .in +2
 642 25 (ECP 192-bit)
 643 .in -2
 644 .br
 645 .in +2
 646 26 (ECP 224-bit)
 647 .in -2
 648 .RE
 649 
 650 .sp
 651 .ne 2
 652 .na
 653 \fBencr_alg {3des, 3des-cbc, blowfish, blowfish-cdc, des, des-cbc, aes,
 654 aes-cbc}\fR
 655 .ad
 656 .sp .6
 657 .RS 4n
 658 An encryption algorithm, as in \fBipsecconf\fR(1M). However, of the ciphers
 659 listed above, only \fBaes\fR and \fBaes-cbc\fR allow optional key-size setting,
 660 using the "low value-to-high value" syntax. To specify a single AES key size,
 661 the low value must equal the high value. If no range is specified, all three
 662 AES key sizes are allowed.
 663 .RE
 664 
 665 .sp
 666 .ne 2
 667 .na
 668 \fBauth_alg {md5, sha, sha1, sha256, sha384, sha512}\fR
 669 .ad
 670 .sp .6
 671 .RS 4n
 672 An authentication algorithm.
 673 .sp
 674 Use \fBipsecalgs\fR(1M) with the \fB-l\fR option to list the IPsec protocols
 675 and algorithms currently defined on a system. The \fBcryptoadm list\fR command
 676 diplays a list of installed providers and their mechanisms. See
 677 \fBcryptoadm\fR(1M).
 678 .RE
 679 
 680 .sp
 681 .ne 2
 682 .na
 683 \fBauth_method {preshared, rsa_sig, rsa_encrypt, dss_sig}\fR
 684 .ad
 685 .sp .6
 686 .RS 4n
 687 The authentication method used for IKE phase 1.
 688 .RE
 689 
 690 .sp
 691 .ne 2
 692 .na
 693 \fBp1_lifetime_secs \fInum\fR\fR
 694 .ad
 695 .sp .6
 696 .RS 4n
 697 Optional. The lifetime for a phase 1 SA.
 698 .RE
 699 
 700 .RE
 701 
 702 .sp
 703 .ne 2
 704 .na
 705 \fBp2_lifetime_secs \fInum\fR\fR
 706 .ad
 707 .sp .6
 708 .RS 4n
 709 If configuring the kernel defaults is not sufficient for different tasks, this
 710 parameter can be used on a per-rule basis to set the IPsec \fBSA\fR lifetimes
 711 in seconds.
 712 .RE
 713 
 714 .sp
 715 .ne 2
 716 .na
 717 \fBp2_pfs \fInum\fR\fR
 718 .ad
 719 .sp .6
 720 .RS 4n
 721 Use perfect forward secrecy for phase 2 (quick mode). If selected, the oakley
 722 group specified is used for phase 2 PFS. Acceptable values are:
 723 .br
 724 .in +2
 725 0 (do not use Perfect Forward Secrecy for IPsec SAs)
 726 .in -2
 727 .br
 728 .in +2
 729 1 (768-bit)
 730 .in -2
 731 .br
 732 .in +2
 733 2 (1024-bit)
 734 .in -2
 735 .br
 736 .in +2
 737 5 (1536-bit)
 738 .in -2
 739 .br
 740 .in +2
 741 14 (2048-bit)
 742 .in -2
 743 .br
 744 .in +2
 745 15 (3072-bit)
 746 .in -2
 747 .br
 748 .in +2
 749 16 (4096-bit)
 750 .in -2
 751 .RE
 752 
 753 .sp
 754 .LP
 755 An IKE rule starts with a right-curly-brace (\fB{\fR), ends with a
 756 left-curly-brace (\fB}\fR), and has the following parameters in between:
 757 .sp
 758 .ne 2
 759 .na
 760 \fBlabel \fIstring\fR\fR
 761 .ad
 762 .sp .6
 763 .RS 4n
 764 Required parameter. The administrative interface to \fBin.iked\fR looks up
 765 phase 1 policy rules with the label as the search string. The administrative
 766 interface also converts the label into an index, suitable for an extended
 767 ACQUIRE message from PF_KEY - effectively tying IPsec policy to IKE policy in
 768 the case of a node initiating traffic. Only one \fBlabel\fR parameter is
 769 allowed per rule.
 770 .RE
 771 
 772 .sp
 773 .ne 2
 774 .na
 775 \fBlocal_addr <\fIIPaddr\fR/\fIprefix\fR/\fIrange\fR>\fR
 776 .ad
 777 .sp .6
 778 .RS 4n
 779 Required parameter. The local address, address prefix, or address range for
 780 this phase 1 rule. Multiple \fBlocal_addr\fR parameters accumulate within a
 781 given rule.
 782 .RE
 783 
 784 .sp
 785 .ne 2
 786 .na
 787 \fBremote_addr <\fIIPaddr\fR/\fIprefix\fR/\fIrang\fRe>\fR
 788 .ad
 789 .sp .6
 790 .RS 4n
 791 Required parameter. The remote address, address prefix, or address range for
 792 this phase 1 rule. Multiple \fBremote_addr\fR parameters accumulate within a
 793 given rule.
 794 .RE
 795 
 796 .sp
 797 .ne 2
 798 .na
 799 \fBlocal_id_type \fIp1-id-type\fR\fR
 800 .ad
 801 .sp .6
 802 .RS 4n
 803 Which phase 1 identity type I uses. This is needed because a single certificate
 804 can contain multiple values for use in IKE phase 1. Within a given rule, all
 805 phase 1 transforms must either use preshared or non-preshared authentication
 806 (they cannot be mixed). For rules with preshared authentication, the
 807 \fBlocal_id_type\fR parameter is optional, and defaults to \fBIP\fR. For rules
 808 which use non-preshared authentication, the 'local_id_type' parameter is
 809 required. Multiple 'local_id_type' parameters within a rule are not allowed.
 810 .RE
 811 
 812 .sp
 813 .ne 2
 814 .na
 815 \fBlocal_id \fIcert-sel\fR\fR
 816 .ad
 817 .sp .6
 818 .RS 4n
 819 Disallowed for preshared authentication method; required parameter for
 820 non-preshared authentication method. The local identity string or certificate
 821 selector. Only one local identity per rule is used, the first one stated.
 822 .RE
 823 
 824 .sp
 825 .ne 2
 826 .na
 827 \fBremote_id \fIcert-sel\fR\fR
 828 .ad
 829 .sp .6
 830 .RS 4n
 831 Disallowed for preshared authentication method; required parameter for
 832 non-preshared authentication method. Selector for which remote phase 1
 833 identities are allowed by this rule. Multiple \fBremote_id\fR parameters
 834 accumulate within a given rule. If a single empty string (\fB""\fR) is given,
 835 then this accepts any remote \fBID\fR for phase 1. It is recommended that
 836 certificate trust chains or address enforcement be configured strictly to
 837 prevent a breakdown in security if this value for \fBremote_id\fR is used.
 838 .RE
 839 
 840 .sp
 841 .ne 2
 842 .na
 843 \fBp2_lifetime_secs \fInum\fR\fR
 844 .ad
 845 .sp .6
 846 .RS 4n
 847 If configuring the kernel defaults is not sufficient for different tasks, this
 848 parameter can be used on a per-rule basis to set the IPsec \fBSA\fR lifetimes
 849 in seconds.
 850 .RE
 851 
 852 .sp
 853 .ne 2
 854 .na
 855 \fBp2_pfs \fInum\fR\fR
 856 .ad
 857 .sp .6
 858 .RS 4n
 859 Use perfect forward secrecy for phase 2 (quick mode). If selected, the oakley
 860 group specified is used for phase 2 PFS. Acceptable values are:
 861 .br
 862 .in +2
 863 0 (do not use Perfect Forward Secrecy for IPsec SAs)
 864 .in -2
 865 .br
 866 .in +2
 867 1 (768-bit)
 868 .in -2
 869 .br
 870 .in +2
 871 2 (1024-bit)
 872 .in -2
 873 .br
 874 .in +2
 875 5 (1536-bit)
 876 .in -2
 877 .br
 878 .in +2
 879 14 (2048-bit)
 880 .in -2
 881 .br
 882 .in +2
 883 15 (3072-bit)
 884 .in -2
 885 .br
 886 .in +2
 887 16 (4096-bit)
 888 .in -2
 889 .RE
 890 
 891 .sp
 892 .ne 2
 893 .na
 894 \fBp1_xform \fB{\fR \fIparameter-list\fR \fB}\fR\fR
 895 .ad
 896 .sp .6
 897 .RS 4n
 898 A phase 1 transform specifies a method for protecting an IKE phase 1 exchange.
 899 An initiator offers up lists of phase 1 transforms, and a receiver is expected
 900 to only accept such an entry if it matches one in a phase 1 rule. There can be
 901 several of these, and they are additive. There must be either at least one
 902 phase 1 transform in a rule or a global default phase 1 transform list. A
 903 \fBike.config\fR file without a global default phase 1transform list \fBand\fR
 904 a rule without a phase 1 transform list is an invalid file. Elements within the
 905 parameter-list; unless specified as optional, must occur exactly once within a
 906 given transform's parameter-list:
 907 .sp
 908 .ne 2
 909 .na
 910 \fBoakley_group \fInumber\fR\fR
 911 .ad
 912 .sp .6
 913 .RS 4n
 914 The Oakley Diffie-Hellman group used for \fBIKE SA\fR key derivation.
 915 Acceptable values are currently:
 916 .br
 917 .in +2
 918 1 (768-bit)
 919 .in -2
 920 .br
 921 .in +2
 922 2 (1024-bit)
 923 .in -2
 924 .br
 925 .in +2
 926 5 (1536-bit)
 927 .in -2
 928 .br
 929 .in +2
 930 14 (2048-bit)
 931 .in -2
 932 .br
 933 .in +2
 934 15 (3072-bit)
 935 .in -2
 936 .br
 937 .in +2
 938 16 (4096-bit)
 939 .in -2
 940 .RE
 941 
 942 .sp
 943 .ne 2
 944 .na
 945 \fBencr_alg {3des, 3des-cbc, blowfish, blowfish-cdc, des, des-cbc, aes,
 946 aes-cbc}\fR
 947 .ad
 948 .sp .6
 949 .RS 4n
 950 An encryption algorithm, as in \fBipsecconf\fR(1M). However, of the ciphers
 951 listed above, only \fBaes\fR and \fBaes-cbc\fR allow optional key-size setting,
 952 using the "low value-to-high value" syntax. To specify a single AES key size,
 953 the low value must equal the high value. If no range is specified, all three
 954 AES key sizes are allowed.
 955 .RE
 956 
 957 .sp
 958 .ne 2
 959 .na
 960 \fBauth_alg {md5, sha, sha1}\fR
 961 .ad
 962 .sp .6
 963 .RS 4n
 964 An authentication algorithm, as specified in \fBipseckey\fR(1M).
 965 .RE
 966 
 967 .sp
 968 .ne 2
 969 .na
 970 \fBauth_method {preshared, rsa_sig, rsa_encrypt, dss_sig}\fR
 971 .ad
 972 .sp .6
 973 .RS 4n
 974 The authentication method used for IKE phase 1.
 975 .RE
 976 
 977 .sp
 978 .ne 2
 979 .na
 980 \fBp1_lifetime_secs \fInum\fR\fR
 981 .ad
 982 .sp .6
 983 .RS 4n
 984 Optional. The lifetime for a phase 1 SA.
 985 .RE
 986 
 987 .RE
 988 
 989 .SH EXAMPLES
 990 .LP
 991 \fBExample 1 \fRA Sample \fBike.config\fR File
 992 .sp
 993 .LP
 994 The following is an example of an \fBike.config\fR file:
 995 
 996 .sp
 997 .in +2
 998 .nf
 999 
1000 ### BEGINNING OF FILE
1001 
1002 ### First some global parameters...
1003 
1004 ### certificate parameters...
1005 
1006 # Root certificates. I SHOULD use a full Distinguished Name.
1007 # I must have this certificate in my local filesystem, see ikecert(1m).
1008 cert_root    "C=US, O=Sun Microsystems\\, Inc., CN=Sun CA"
1009 
1010 # Explicitly trusted certs that need no signatures, or perhaps
1011 # self-signed ones. Like root certificates, use full DNs for them
1012 # for now.
1013 cert_trust    "EMAIL=root@domain.org"
1014 
1015 # Where do I send LDAP requests?
1016 ldap_server        "ldap1.domain.org,ldap2.domain.org:389"
1017 
1018 ## phase 1 transform defaults...
1019 
1020 p1_lifetime_secs 14400
1021 p1_nonce_len 20
1022 
1023 ## Parameters that might also show up in rules.
1024 
1025 p1_xform { auth_method preshared oakley_group 5 auth_alg sha
1026           encr_alg 3des }
1027 p2_pfs 2
1028 
1029 
1030 
1031 ### Now some rules...
1032 
1033 {
1034    label "simple inheritor"
1035    local_id_type ip
1036    local_addr 10.1.1.1
1037    remote_addr 10.1.1.2
1038 }
1039 {
1040    label "simple inheritor IPv6"
1041    local_id_type ipv6
1042    local_addr fe80::a00:20ff:fe7d:6
1043    remote_addr fe80::a00:20ff:fefb:3780
1044 }
1045 
1046 {
1047    # an index-only rule.  If I'm a receiver, and all I
1048    # have are index-only rules, what do I do about inbound IKE requests?
1049    # Answer:  Take them all!
1050 
1051    label "default rule"
1052    # Use whatever "host" (e.g. IP address) identity is appropriate
1053    local_id_type ipv4
1054 
1055    local_addr 0.0.0.0/0
1056    remote_addr 0.0.0.0/0
1057 
1058    p2_pfs 5
1059 
1060    # Now I'm going to have the p1_xforms
1061    p1_xform
1062    {auth_method preshared  oakley_group 5  auth_alg md5  encr_alg \e
1063     blowfish }   p1_xform
1064    {auth_method preshared  oakley_group 5  auth_alg md5  encr_alg 3des }
1065 
1066    # After said list, another keyword (or a '}') stops xform
1067    # parsing.
1068 }
1069 
1070 {
1071    # Let's try something a little more conventional.
1072 
1073    label "host to .80 subnet"
1074    local_id_type ip
1075    local_id "10.1.86.51"
1076 
1077    remote_id ""    # Take any, use remote_addr for access control.
1078 
1079    local_addr 10.1.86.51
1080    remote_addr 10.1.80.0/24
1081 
1082    p1_xform
1083    { auth_method rsa_sig  oakley_group 5  auth_alg md5  encr_alg 3des }
1084    p1_xform
1085    { auth_method rsa_sig  oakley_group 5  auth_alg md5  encr_alg \e
1086      blowfish }
1087    p1_xform
1088    { auth_method rsa_sig  oakley_group 5  auth_alg sha1  encr_alg 3des }
1089    p1_xform
1090    { auth_method rsa_sig  oakley_group 5  auth_alg sha1  encr_alg \e
1091      blowfish }
1092 }
1093 
1094 {
1095    # Let's try something a little more conventional, but with ipv6.
1096 
1097     label "host to fe80::/10 subnet"
1098     local_id_type ip
1099     local_id "fe80::a00:20ff:fe7d:6"
1100 
1101     remote_id ""    # Take any, use remote_addr for access control.
1102 
1103     local_addr fe80::a00:20ff:fe7d:6
1104     remote_addr fe80::/10
1105 
1106     p1_xform
1107     { auth_method rsa_sig  oakley_group 5  auth_alg md5  encr_alg 3des }
1108     p1_xform
1109     { auth_method rsa_sig  oakley_group 5  auth_alg md5  encr_alg \e
1110       blowfish }
1111     p1_xform
1112     { auth_method rsa_sig  oakley_group 5  auth_alg sha1  encr_alg \e
1113       3des }
1114     p1_xform
1115     { auth_method rsa_sig  oakley_group 5  auth_alg sha1  encr_alg \e
1116       blowfish }
1117 }
1118 
1119 {
1120     # How 'bout something with a different cert type and name?
1121 
1122     label "punchin-point"
1123     local_id_type mbox
1124     local_id "ipsec-wizard@domain.org"
1125 
1126     remote_id "10.5.5.128"
1127 
1128     local_addr 0.0.0.0/0
1129     remote_addr 10.5.5.128
1130 
1131     p1_xform
1132     { auth_method rsa_sig oakley_group 5 auth_alg md5 encr_alg \e
1133       blowfish }
1134 }
1135 
1136 {
1137    label "receiver side"
1138 
1139    remote_id "ipsec-wizard@domain.org"
1140 
1141    local_id_type ip
1142    local_id "10.5.5.128"
1143 
1144    local_addr 10.5.5.128
1145    remote_addr 0.0.0.0/0
1146 
1147    p1_xform
1148    { auth_method rsa_sig oakley_group 5 auth_alg md5 encr_alg blowfish }
1149    # NOTE:  Specifying preshared null-and-voids the remote_id/local_id
1150    #        fields.
1151    p1_xform
1152    { auth_method preshared oakley_group 5 auth_alg md5 encr_alg \e
1153      blowfish}
1154 
1155 }
1156 .fi
1157 .in -2
1158 
1159 .SH ATTRIBUTES
1160 .sp
1161 .LP
1162 See \fBattributes\fR(5) for descriptions of the following attributes:
1163 .sp
1164 
1165 .sp
1166 .TS
1167 box;
1168 c | c
1169 l | l .
1170 ATTRIBUTE TYPE  ATTRIBUTE VALUE
1171 _
1172 Interface Stability     Committed
1173 .TE
1174 
1175 .SH SEE ALSO
1176 .sp
1177 .LP
1178 \fBcryptoadm\fR(1M), \fBikeadm\fR(1M), \fBin.iked\fR(1M), \fBikecert\fR(1M),
1179 \fBipseckey\fR(1M), \fBipsecalgs\fR(1M), \fBipsecconf\fR(1M), \fBsvccfg\fR(1M),
1180 \fBdlopen\fR(3C), \fBattributes\fR(5), \fBrandom\fR(7D)
1181 .sp
1182 .LP
1183 Harkins, Dan and Carrel, Dave. \fIRFC 2409, Internet Key Exchange (IKE)\fR.
1184 Cisco Systems, November 1998.
1185 .sp
1186 .LP
1187 Maughan, Douglas et. al. \fIRFC 2408, Internet Security Association and Key
1188 Management Protocol (ISAKMP)\fR. National Security Agency, Ft. Meade, MD.
1189 November 1998.
1190 .sp
1191 .LP
1192 Piper, Derrell. \fIRFC 2407, The Internet IP Security Domain of Interpretation
1193 for ISAKMP\fR. Network Alchemy. Santa Cruz, California. November 1998.
1194 .sp
1195 .LP
1196 Kivinen, T. \fIRFC 3526, More Modular Exponential (MODP) Diffie-Hellman Groups
1197 for Internet Key Exchange (IKE)\fR. The Internet Society, Network Working
1198 Group. May 2003.
1199 .sp
1200 .LP
1201 Lepinksi, M. and Kent, S. \fIRFC 5114, Additional Diffie-Hellman Groups for Use
1202 with IETF Standards\fR. BBN Technologies, January 2008.