summaryrefslogtreecommitdiff
path: root/usr/src/man/man4/ike.config.4
blob: 53b0c6d270fc79377bec584179b9a9d6c5670f6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
'\" te
.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2015, Circonus, Inc. All Rights Reserved.
.\" 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.
.\"  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
.\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH IKE.CONFIG 4 "Apr 27, 2009"
.SH NAME
ike.config \- configuration file for IKE policy
.SH SYNOPSIS
.LP
.nf
\fB/etc/inet/ike/config\fR
.fi

.SH DESCRIPTION
.LP
The \fB/etc/inet/ike/config\fR file contains rules for matching inbound IKE
requests. It also contains rules for preparing outbound \fBIKE\fR requests.
.sp
.LP
You can test the syntactic correctness of an \fB/etc/inet/ike/config\fR file by
using the \fB-c\fR or \fB-f\fR options of \fBin.iked\fR(1M). You must use the
\fB-c\fR option to test a \fBconfig\fR file. You might need to use the \fB-f\fR
option if it is not in \fB/etc/inet/ike/config\fR.
.SS "Lexical Components"
.LP
On any line, an unquoted \fB#\fR character introduces a comment. The remainder
of that line is ignored. Additionally, on any line, an unquoted \fB//\fR
sequence introduces a comment. The remainder of that line is ignored.
.sp
.LP
There are several types of lexical tokens in the \fBike.config\fR file:
.sp
.ne 2
.na
\fB\fInum\fR\fR
.ad
.sp .6
.RS 4n
A decimal, hex, or octal number representation is as in 'C'.
.RE

.sp
.ne 2
.na
\fB\fIIPaddr\fR/\fIprefix\fR/\fIrange\fR\fR
.ad
.sp .6
.RS 4n
An IPv4 or IPv6 address with an optional /\fINNN\fR suffix, (where \fINNN\fR is
a \fInum\fR) that indicates an address (\fBCIDR\fR) prefix (for example,
\fB10.1.2.0/24\fR). An optional /\fIADDR\fR suffix (where \fIADDR\fR is a
second IP address) indicates an address/mask pair (for example,
\fB10.1.2.0/255.255.255.0\fR). An optional -\fIADDR\fR suffix (where \fIADDR\fR
is a second IPv4 address) indicates an inclusive range of addresses (for
example, \fB10.1.2.0-10.1.2.255\fR). The \fB/\fR or \fB-\fR can be surrounded
by an arbitrary amount of white space.
.RE

.sp
.ne 2
.na
\fB\fBXXX\fR | \fBYYY\fR | \fBZZZ\fR\fR
.ad
.sp .6
.RS 4n
Either the words \fBXX\fRX, \fBYYY\fR, or \fBZZZ\fR, for example, {yes,no}.
.RE

.sp
.ne 2
.na
\fBp1-id-type\fR
.ad
.sp .6
.RS 4n
An IKE phase 1 identity type. IKE phase 1 identity types include:
.br
.in +2
\fBdn, DN\fR
.in -2
.br
.in +2
\fBdns, DNS\fR
.in -2
.br
.in +2
\fBfqdn, FQDN\fR
.in -2
.br
.in +2
\fBgn, GN\fR
.in -2
.br
.in +2
\fBip, IP\fR
.in -2
.br
.in +2
\fBipv4\fR
.in -2
.br
.in +2
\fBipv4_prefix\fR
.in -2
.br
.in +2
\fBipv4_range\fR
.in -2
.br
.in +2
\fBipv6\fR
.in -2
.br
.in +2
\fBipv6_prefix\fR
.in -2
.br
.in +2
\fBipv6_range\fR
.in -2
.br
.in +2
\fBmbox, MBOX\fR
.in -2
.br
.in +2
\fBuser_fqdn\fR
.in -2
.RE

.sp
.ne 2
.na
\fB\fB"\fR\fIstring\fR\fB"\fR\fR
.ad
.sp .6
.RS 4n
A quoted string.
.sp
Examples include:\fB"Label foo"\fR, or \fB"C=US, OU=Sun Microsystems\e, Inc.,
N=olemcd@eng.example.com"\fR
.sp
A backslash (\fB\e\fR) is an escape character. If the string needs an actual
backslash, two must be specified.
.RE

.sp
.ne 2
.na
\fB\fIcert-sel\fR\fR
.ad
.sp .6
.RS 4n
A certificate selector, a \fIstring\fR which specifies the identities of zero
or more certificates. The specifiers can conform to \fBX.509\fR naming
conventions.
.sp
A \fIcert-sel\fR can also use various shortcuts to match either subject
alternative names, the filename or \fBslot\fR of a certificate in
\fB/etc/inet/ike/publickeys\fR, or even the \fBISSUER\fR. For example:
.sp
.in +2
.nf
"SLOT=0"
"EMAIL=postmaster@domain.org"
"webmaster@domain.org" # Some just work w/o TYPE=
"IP=10.0.0.1"
"10.21.11.11"          # Some just work w/o TYPE=
"DNS=www.domain.org"
"mailhost.domain.org"  # Some just work w/o TYPE=
"ISSUER=C=US, O=Sun Microsystems\\, Inc., CN=Sun CA"
.fi
.in -2
.sp

Any \fIcert-sel\fR preceded by the character \fB!\fR indicates a negative
match, that is, not matching this specifier. These are the same kind of strings
used in \fBikecert\fR(1M).
.RE

.sp
.ne 2
.na
\fB\fIldap-list\fR\fR
.ad
.sp .6
.RS 4n
A quoted, comma-separated list of LDAP servers and ports.
.sp
For example, \fB"ldap1.example.com"\fR, \fB"ldap1.example.com:389"\fR,
\fB"ldap1.example.com:389,ldap2.example.com"\fR.
.sp
The default port for LDAP is \fB389\fR.
.RE

.sp
.ne 2
.na
\fB\fIparameter-list\fR\fR
.ad
.sp .6
.RS 4n
A list of parameters.
.RE

.SS "File Body Entries"
.LP
There are four main types of entries:
.RS +4
.TP
.ie t \(bu
.el o
global parameters
.RE
.RS +4
.TP
.ie t \(bu
.el o
IKE phase 1 transform defaults
.RE
.RS +4
.TP
.ie t \(bu
.el o
IKE rule defaults
.RE
.RS +4
.TP
.ie t \(bu
.el o
IKE rules
.RE
.sp
.LP
The global parameter entries are as follows:
.sp
.ne 2
.na
\fBcert_root \fIcert-sel\fR\fR
.ad
.sp .6
.RS 4n
The X.509 distinguished name of a certificate that is a trusted root CA
certificate. It must be encoded in a file in the \fB/etc/inet/ike/publickeys\fR
directory. It must have a CRL in \fB/etc/inet/ike/crl\fRs. Multiple
\fBcert_root\fR parameters aggregate.
.RE

.sp
.ne 2
.na
\fBcert_trust \fIcert-sel\fR\fR
.ad
.sp .6
.RS 4n
Specifies an X.509 distinguished name of a certificate that is self-signed, or
has otherwise been verified as trustworthy for signing IKE exchanges. It must
be encoded in a file in \fB/etc/inet/ike/publickeys\fR. Multiple
\fBcert_trust\fR parameters aggregate.
.RE

.sp
.ne 2
.na
\fBexpire_timer \fIinteger\fR\fR
.ad
.sp .6
.RS 4n
The number of seconds to let a not-yet-complete IKE Phase I (Main Mode)
negotiation linger before deleting it. Default value: 300 seconds.
.RE

.sp
.ne 2
.na
\fBignore_crls\fR
.ad
.sp .6
.RS 4n
If this keyword is present in the file, \fBin.iked\fR(1M) ignores Certificate
Revocation Lists (\fBCRL\fRs) for root \fBCA\fRs (as given in \fBcert_root\fR)
.RE

.sp
.ne 2
.na
\fBldap_server \fIldap-list\fR\fR
.ad
.sp .6
.RS 4n
A list of LDAP servers to query for certificates. The list can be additive.
.RE

.sp
.ne 2
.na
\fBpkcs11_path \fIstring\fR\fR
.ad
.sp .6
.RS 4n
The string that follows is a name of a shared object (\fB\&.so\fR) that
implements the PKCS#11 standard. The name is passed directly into
\fBdlopen\fR(3C) for linking, with all of the semantics of that library call.
By default, \fBin.iked\fR(1M) runs the same ISA as the running kernel, so a
library specified using \fBpkcs11_path\fR and an absolute pathname \fBmust\fR
match the same ISA as the kernel. One can use the start/exec SMF property (see
\fBsvccfg\fR(1M)) to change \fBin.iked\fR's ISA, but it is not recommended.
.sp
If this setting is not present, the default value is set to \fBlibpkcs11.so\fR.
Most cryptographic providers go through the default library, and this parameter
should only be used if a specialized provider of IKE-useful cryptographic
services cannot interface with the Solaris Cryptographic Framework. See
\fBcryptoadm\fR(1M).
.sp
This option is now deprecated, and may be removed in a future release.
.RE

.sp
.ne 2
.na
\fBretry_limit \fIinteger\fR\fR
.ad
.sp .6
.RS 4n
The number of retransmits before any IKE negotiation is aborted. Default value:
5 times.
.RE

.sp
.ne 2
.na
\fBretry_timer_init \fIinteger\fR or \fIfloat\fR\fR
.ad
.sp .6
.RS 4n
The initial interval (in seconds) between retransmits. This interval is doubled
until the \fBretry_timer_max\fR value (see below) is reached. Default value:
0.5 seconds.
.RE

.sp
.ne 2
.na
\fBretry_timer_max \fIinteger\fR or \fIfloat\fR\fR
.ad
.sp .6
.RS 4n
The maximum interval (in seconds) between retransmits. The doubling retransmit
interval stops growing at this limit. Default value: 30 seconds.
.LP
Note -
.sp
.RS 2
This value is never reached with the default configuration. The longest
interval is 8 (0.5 * 2 ^ (5 - 1)) seconds.
.RE
.RE

.sp
.ne 2
.na
\fBproxy \fIstring\fR\fR
.ad
.sp .6
.RS 4n
The string following this keyword must be a URL for an HTTP proxy, for example,
\fBhttp://proxy:8080\fR.
.RE

.sp
.ne 2
.na
\fBsocks \fIstring\fR\fR
.ad
.sp .6
.RS 4n
The string following this keyword must be a URL for a SOCKS proxy, for example,
\fBsocks://socks-proxy\fR.
.RE

.sp
.ne 2
.na
\fBuse_http\fR
.ad
.sp .6
.RS 4n
If this keyword is present in the file, \fBin.iked\fR(1M) uses HTTP to retrieve
Certificate Revocation Lists (\fBCRL\fRs).
.RE

.sp
.LP
The following IKE phase 1 transform parameters can be prefigured using
file-level defaults. Values specified within any given transform override these
defaults.
.sp
.LP
The IKE phase 1 transform defaults are as follows:
.sp
.ne 2
.na
\fBp1_lifetime_secs \fInum\fR\fR
.ad
.sp .6
.RS 4n
The proposed default lifetime, in seconds, of an IKE phase 1 security
association (\fBSA\fR).
.RE

.sp
.ne 2
.na
\fBp1_nonce_len \fInum\fR\fR
.ad
.sp .6
.RS 4n
The length in bytes of the phase 1 (quick mode) nonce data. This cannot be
specified on a per-rule basis.
.RE

.sp
.LP
The following IKE rule parameters can be prefigured using file-level defaults.
Values specified within any given rule override these defaults, unless a rule
cannot.
.sp
.ne 2
.na
\fBp2_lifetime_secs \fInum\fR\fR
.ad
.sp .6
.RS 4n
The proposed default lifetime, in seconds, of an IKE phase 2 security
association (SA). This value is optional. If omitted, a default value is used.
.RE

.sp
.ne 2
.na
\fBp2_softlife_secs \fInum\fR\fR
.ad
.sp .6
.RS 4n
The soft lifetime of a phase 2 SA, in seconds. If this value is specified, the
SA soft expires after the number of seconds specified by
\fBp2_softlife_secs\fR. This causes \fBin.iked\fR to renegotiate a new phase 2
SA before the original SA expires.
.sp
This value is optional, if omitted soft expiry occurs after 90% of the lifetime
specified by \fBp2_lifetime_secs\fR. The value specified by
\fBp2_softlife_secs\fR is ignored if \fBp2_lifetime_secs\fR is not specified.
.sp
Setting \fBp2_softlife_secs\fR to the same value as \fBp2_lifetime_secs\fR
disables soft expires.
.RE

.sp
.ne 2
.na
\fBp2_idletime_secs \fInum\fR\fR
.ad
.sp .6
.RS 4n
The idle lifetime of a phase 2 SA, in seconds. If the value is specified, the
value specifies the lifetime of the SA, if the security association is not used
before the SA is revalidated.
.RE

.sp
.ne 2
.na
\fBp2_lifetime_kb \fInum\fR\fR
.ad
.sp .6
.RS 4n
The lifetime of an SA can optionally be specified in kilobytes. This parameter
specifies the default value. If lifetimes are specified in both seconds and
kilobytes, the SA expires when either the seconds or kilobyte thresholds are
passed.
.RE

.sp
.ne 2
.na
\fBp2_softlife_kb \fInum\fR\fR
.ad
.sp .6
.RS 4n
This value is the number of kilobytes that can be protected by an SA before a
soft expire occurs (see \fBp2_softlife_secs\fR, above).
.sp
This value is optional. If omitted, soft expiry occurs after 90% of the
lifetime specified by \fBp2_lifetime_kb\fR. The value specified by
\fBp2_softlife_kb\fR is ignored if \fBp2_lifetime_kb\fR is not specified.
.RE

.sp
.ne 2
.na
\fBp2_nonce_len \fInum\fR\fR
.ad
.sp .6
.RS 4n
The length in bytes of the phase 2 (quick mode) nonce data. This cannot be
specified on a per-rule basis.
.RE

.sp
.ne 2
.na
\fBlocal_id_type \fIp1-id-type\fR\fR
.ad
.sp .6
.RS 4n
The local identity for IKE requires a type. This identity type is reflected in
the IKE exchange. The type can be one of the following:
.RS +4
.TP
.ie t \(bu
.el o
an IP address (for example, \fB10.1.1.2\fR)
.RE
.RS +4
.TP
.ie t \(bu
.el o
DNS name (for example, \fBtest.domain.com\fR)
.RE
.RS +4
.TP
.ie t \(bu
.el o
MBOX RFC 822 name (for example, \fBroot@domain.com\fR)
.RE
.RS +4
.TP
.ie t \(bu
.el o
DNX.509 distinguished name (for example, \fBC=US, O=Sun Microsystems\, Inc.,
CN=Sun Test cert\fR)
.RE
.RE

.sp
.ne 2
.na
\fBp1_xform '{' parameter-list '}\fR
.ad
.sp .6
.RS 4n
A phase 1 transform specifies a method for protecting an IKE phase 1 exchange.
An initiator offers up lists of phase 1 transforms, and a receiver is expected
to only accept such an entry if it matches one in a phase 1 rule. There can be
several of these, and they are additive. There must be either at least one
phase 1 transform in a rule or a global default phase 1 transform list. In a
configuration file without a global default phase 1 transform list \fBand\fR a
rule without a phase, transform list is an invalid file. Unless specified as
optional, elements in the parameter-list must occur exactly once within a given
transform's parameter-list:
.sp
.ne 2
.na
\fBoakley_group \fInumber\fR\fR
.ad
.sp .6
.RS 4n
The Oakley Diffie-Hellman group used for IKE SA key derivation. The group
numbers are defined in RFC 2409, Appendix A, RFC 3526, and RFC 5114, section
3.2. Acceptable values are currently:
.br
.in +2
1 (MODP 768-bit)
.in -2
.br
.in +2
2 (MODP 1024-bit)
.in -2
.br
.in +2
3 (EC2N 155-bit)
.in -2
.br
.in +2
4 (EC2N 185-bit)
.in -2
.br
.in +2
5 (MODP 1536-bit)
.in -2
.br
.in +2
14 (MODP 2048-bit)
.in -2
.br
.in +2
15 (MODP 3072-bit)
.in -2
.br
.in +2
16 (MODP 4096-bit)
.in -2
.br
.in +2
17 (MODP 6144-bit)
.in -2
.br
.in +2
18 (MODP 8192-bit)
.in -2
.br
.in +2
19 (ECP 256-bit)
.in -2
.br
.in +2
20 (ECP 384-bit)
.in -2
.br
.in +2
21 (ECP 521-bit)
.in -2
.br
.in +2
22 (MODP 1024-bit, with 160-bit Prime Order Subgroup)
.in -2
.br
.in +2
23 (MODP 2048-bit, with 224-bit Prime Order Subgroup)
.in -2
.br
.in +2
24 (MODP 2048-bit, with 256-bit Prime Order Subgroup)
.in -2
.br
.in +2
25 (ECP 192-bit)
.in -2
.br
.in +2
26 (ECP 224-bit)
.in -2
.RE

.sp
.ne 2
.na
\fBencr_alg {3des, 3des-cbc, blowfish, blowfish-cdc, des, des-cbc, aes,
aes-cbc}\fR
.ad
.sp .6
.RS 4n
An encryption algorithm, as in \fBipsecconf\fR(1M). However, of the ciphers
listed above, only \fBaes\fR and \fBaes-cbc\fR allow optional key-size setting,
using the "low value-to-high value" syntax. To specify a single AES key size,
the low value must equal the high value. If no range is specified, all three
AES key sizes are allowed.
.RE

.sp
.ne 2
.na
\fBauth_alg {md5, sha, sha1, sha256, sha384, sha512}\fR
.ad
.sp .6
.RS 4n
An authentication algorithm.
.sp
Use \fBipsecalgs\fR(1M) with the \fB-l\fR option to list the IPsec protocols
and algorithms currently defined on a system. The \fBcryptoadm list\fR command
displays a list of installed providers and their mechanisms. See
\fBcryptoadm\fR(1M).
.RE

.sp
.ne 2
.na
\fBauth_method {preshared, rsa_sig, rsa_encrypt, dss_sig}\fR
.ad
.sp .6
.RS 4n
The authentication method used for IKE phase 1.
.RE

.sp
.ne 2
.na
\fBp1_lifetime_secs \fInum\fR\fR
.ad
.sp .6
.RS 4n
Optional. The lifetime for a phase 1 SA.
.RE

.RE

.sp
.ne 2
.na
\fBp2_lifetime_secs \fInum\fR\fR
.ad
.sp .6
.RS 4n
If configuring the kernel defaults is not sufficient for different tasks, this
parameter can be used on a per-rule basis to set the IPsec \fBSA\fR lifetimes
in seconds.
.RE

.sp
.ne 2
.na
\fBp2_pfs \fInum\fR\fR
.ad
.sp .6
.RS 4n
Use perfect forward secrecy for phase 2 (quick mode). If selected, the oakley
group specified is used for phase 2 PFS. Acceptable values are:
.br
.in +2
0 (do not use Perfect Forward Secrecy for IPsec SAs)
.in -2
.br
.in +2
1 (768-bit)
.in -2
.br
.in +2
2 (1024-bit)
.in -2
.br
.in +2
5 (1536-bit)
.in -2
.br
.in +2
14 (2048-bit)
.in -2
.br
.in +2
15 (3072-bit)
.in -2
.br
.in +2
16 (4096-bit)
.in -2
.RE

.sp
.LP
An IKE rule starts with a right-curly-brace (\fB{\fR), ends with a
left-curly-brace (\fB}\fR), and has the following parameters in between:
.sp
.ne 2
.na
\fBlabel \fIstring\fR\fR
.ad
.sp .6
.RS 4n
Required parameter. The administrative interface to \fBin.iked\fR looks up
phase 1 policy rules with the label as the search string. The administrative
interface also converts the label into an index, suitable for an extended
ACQUIRE message from PF_KEY - effectively tying IPsec policy to IKE policy in
the case of a node initiating traffic. Only one \fBlabel\fR parameter is
allowed per rule.
.RE

.sp
.ne 2
.na
\fBlocal_addr <\fIIPaddr\fR/\fIprefix\fR/\fIrange\fR>\fR
.ad
.sp .6
.RS 4n
Required parameter. The local address, address prefix, or address range for
this phase 1 rule. Multiple \fBlocal_addr\fR parameters accumulate within a
given rule.
.RE

.sp
.ne 2
.na
\fBremote_addr <\fIIPaddr\fR/\fIprefix\fR/\fIrang\fRe>\fR
.ad
.sp .6
.RS 4n
Required parameter. The remote address, address prefix, or address range for
this phase 1 rule. Multiple \fBremote_addr\fR parameters accumulate within a
given rule.
.RE

.sp
.ne 2
.na
\fBlocal_id_type \fIp1-id-type\fR\fR
.ad
.sp .6
.RS 4n
Which phase 1 identity type I uses. This is needed because a single certificate
can contain multiple values for use in IKE phase 1. Within a given rule, all
phase 1 transforms must either use preshared or non-preshared authentication
(they cannot be mixed). For rules with preshared authentication, the
\fBlocal_id_type\fR parameter is optional, and defaults to \fBIP\fR. For rules
which use non-preshared authentication, the 'local_id_type' parameter is
required. Multiple 'local_id_type' parameters within a rule are not allowed.
.RE

.sp
.ne 2
.na
\fBlocal_id \fIcert-sel\fR\fR
.ad
.sp .6
.RS 4n
Disallowed for preshared authentication method; required parameter for
non-preshared authentication method. The local identity string or certificate
selector. Only one local identity per rule is used, the first one stated.
.RE

.sp
.ne 2
.na
\fBremote_id \fIcert-sel\fR\fR
.ad
.sp .6
.RS 4n
Disallowed for preshared authentication method; required parameter for
non-preshared authentication method. Selector for which remote phase 1
identities are allowed by this rule. Multiple \fBremote_id\fR parameters
accumulate within a given rule. If a single empty string (\fB""\fR) is given,
then this accepts any remote \fBID\fR for phase 1. It is recommended that
certificate trust chains or address enforcement be configured strictly to
prevent a breakdown in security if this value for \fBremote_id\fR is used.
.RE

.sp
.ne 2
.na
\fBp2_lifetime_secs \fInum\fR\fR
.ad
.sp .6
.RS 4n
If configuring the kernel defaults is not sufficient for different tasks, this
parameter can be used on a per-rule basis to set the IPsec \fBSA\fR lifetimes
in seconds.
.RE

.sp
.ne 2
.na
\fBp2_pfs \fInum\fR\fR
.ad
.sp .6
.RS 4n
Use perfect forward secrecy for phase 2 (quick mode). If selected, the oakley
group specified is used for phase 2 PFS. Acceptable values are:
.br
.in +2
0 (do not use Perfect Forward Secrecy for IPsec SAs)
.in -2
.br
.in +2
1 (768-bit)
.in -2
.br
.in +2
2 (1024-bit)
.in -2
.br
.in +2
5 (1536-bit)
.in -2
.br
.in +2
14 (2048-bit)
.in -2
.br
.in +2
15 (3072-bit)
.in -2
.br
.in +2
16 (4096-bit)
.in -2
.RE

.sp
.ne 2
.na
\fBp1_xform \fB{\fR \fIparameter-list\fR \fB}\fR\fR
.ad
.sp .6
.RS 4n
A phase 1 transform specifies a method for protecting an IKE phase 1 exchange.
An initiator offers up lists of phase 1 transforms, and a receiver is expected
to only accept such an entry if it matches one in a phase 1 rule. There can be
several of these, and they are additive. There must be either at least one
phase 1 transform in a rule or a global default phase 1 transform list. A
\fBike.config\fR file without a global default phase 1transform list \fBand\fR
a rule without a phase 1 transform list is an invalid file. Elements within the
parameter-list; unless specified as optional, must occur exactly once within a
given transform's parameter-list:
.sp
.ne 2
.na
\fBoakley_group \fInumber\fR\fR
.ad
.sp .6
.RS 4n
The Oakley Diffie-Hellman group used for \fBIKE SA\fR key derivation.
Acceptable values are currently:
.br
.in +2
1 (768-bit)
.in -2
.br
.in +2
2 (1024-bit)
.in -2
.br
.in +2
5 (1536-bit)
.in -2
.br
.in +2
14 (2048-bit)
.in -2
.br
.in +2
15 (3072-bit)
.in -2
.br
.in +2
16 (4096-bit)
.in -2
.RE

.sp
.ne 2
.na
\fBencr_alg {3des, 3des-cbc, blowfish, blowfish-cdc, des, des-cbc, aes,
aes-cbc}\fR
.ad
.sp .6
.RS 4n
An encryption algorithm, as in \fBipsecconf\fR(1M). However, of the ciphers
listed above, only \fBaes\fR and \fBaes-cbc\fR allow optional key-size setting,
using the "low value-to-high value" syntax. To specify a single AES key size,
the low value must equal the high value. If no range is specified, all three
AES key sizes are allowed.
.RE

.sp
.ne 2
.na
\fBauth_alg {md5, sha, sha1}\fR
.ad
.sp .6
.RS 4n
An authentication algorithm, as specified in \fBipseckey\fR(1M).
.RE

.sp
.ne 2
.na
\fBauth_method {preshared, rsa_sig, rsa_encrypt, dss_sig}\fR
.ad
.sp .6
.RS 4n
The authentication method used for IKE phase 1.
.RE

.sp
.ne 2
.na
\fBp1_lifetime_secs \fInum\fR\fR
.ad
.sp .6
.RS 4n
Optional. The lifetime for a phase 1 SA.
.RE

.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRA Sample \fBike.config\fR File
.sp
.LP
The following is an example of an \fBike.config\fR file:

.sp
.in +2
.nf

### BEGINNING OF FILE

### First some global parameters...

### certificate parameters...

# Root certificates. I SHOULD use a full Distinguished Name.
# I must have this certificate in my local filesystem, see ikecert(1m).
cert_root    "C=US, O=Sun Microsystems\\, Inc., CN=Sun CA"

# Explicitly trusted certs that need no signatures, or perhaps
# self-signed ones. Like root certificates, use full DNs for them
# for now.
cert_trust    "EMAIL=root@domain.org"

# Where do I send LDAP requests?
ldap_server        "ldap1.domain.org,ldap2.domain.org:389"

## phase 1 transform defaults...

p1_lifetime_secs 14400
p1_nonce_len 20

## Parameters that might also show up in rules.

p1_xform { auth_method preshared oakley_group 5 auth_alg sha
          encr_alg 3des }
p2_pfs 2



### Now some rules...

{
   label "simple inheritor"
   local_id_type ip
   local_addr 10.1.1.1
   remote_addr 10.1.1.2
}
{
   label "simple inheritor IPv6"
   local_id_type ipv6
   local_addr fe80::a00:20ff:fe7d:6
   remote_addr fe80::a00:20ff:fefb:3780
}

{
   # an index-only rule.  If I'm a receiver, and all I
   # have are index-only rules, what do I do about inbound IKE requests?
   # Answer:  Take them all!

   label "default rule"
   # Use whatever "host" (e.g. IP address) identity is appropriate
   local_id_type ipv4

   local_addr 0.0.0.0/0
   remote_addr 0.0.0.0/0

   p2_pfs 5

   # Now I'm going to have the p1_xforms
   p1_xform
   {auth_method preshared  oakley_group 5  auth_alg md5  encr_alg \e
    blowfish }   p1_xform
   {auth_method preshared  oakley_group 5  auth_alg md5  encr_alg 3des }

   # After said list, another keyword (or a '}') stops xform
   # parsing.
}

{
   # Let's try something a little more conventional.

   label "host to .80 subnet"
   local_id_type ip
   local_id "10.1.86.51"

   remote_id ""    # Take any, use remote_addr for access control.

   local_addr 10.1.86.51
   remote_addr 10.1.80.0/24

   p1_xform
   { auth_method rsa_sig  oakley_group 5  auth_alg md5  encr_alg 3des }
   p1_xform
   { auth_method rsa_sig  oakley_group 5  auth_alg md5  encr_alg \e
     blowfish }
   p1_xform
   { auth_method rsa_sig  oakley_group 5  auth_alg sha1  encr_alg 3des }
   p1_xform
   { auth_method rsa_sig  oakley_group 5  auth_alg sha1  encr_alg \e
     blowfish }
}

{
   # Let's try something a little more conventional, but with ipv6.

    label "host to fe80::/10 subnet"
    local_id_type ip
    local_id "fe80::a00:20ff:fe7d:6"

    remote_id ""    # Take any, use remote_addr for access control.

    local_addr fe80::a00:20ff:fe7d:6
    remote_addr fe80::/10

    p1_xform
    { auth_method rsa_sig  oakley_group 5  auth_alg md5  encr_alg 3des }
    p1_xform
    { auth_method rsa_sig  oakley_group 5  auth_alg md5  encr_alg \e
      blowfish }
    p1_xform
    { auth_method rsa_sig  oakley_group 5  auth_alg sha1  encr_alg \e
      3des }
    p1_xform
    { auth_method rsa_sig  oakley_group 5  auth_alg sha1  encr_alg \e
      blowfish }
}

{
    # How 'bout something with a different cert type and name?

    label "punchin-point"
    local_id_type mbox
    local_id "ipsec-wizard@domain.org"

    remote_id "10.5.5.128"

    local_addr 0.0.0.0/0
    remote_addr 10.5.5.128

    p1_xform
    { auth_method rsa_sig oakley_group 5 auth_alg md5 encr_alg \e
      blowfish }
}

{
   label "receiver side"

   remote_id "ipsec-wizard@domain.org"

   local_id_type ip
   local_id "10.5.5.128"

   local_addr 10.5.5.128
   remote_addr 0.0.0.0/0

   p1_xform
   { auth_method rsa_sig oakley_group 5 auth_alg md5 encr_alg blowfish }
   # NOTE:  Specifying preshared null-and-voids the remote_id/local_id
   #        fields.
   p1_xform
   { auth_method preshared oakley_group 5 auth_alg md5 encr_alg \e
     blowfish}

}
.fi
.in -2

.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Committed
.TE

.SH SEE ALSO
.LP
\fBcryptoadm\fR(1M), \fBikeadm\fR(1M), \fBin.iked\fR(1M), \fBikecert\fR(1M),
\fBipseckey\fR(1M), \fBipsecalgs\fR(1M), \fBipsecconf\fR(1M), \fBsvccfg\fR(1M),
\fBdlopen\fR(3C), \fBattributes\fR(5), \fBrandom\fR(7D)
.sp
.LP
Harkins, Dan and Carrel, Dave. \fIRFC 2409, Internet Key Exchange (IKE)\fR.
Cisco Systems, November 1998.
.sp
.LP
Maughan, Douglas et. al. \fIRFC 2408, Internet Security Association and Key
Management Protocol (ISAKMP)\fR. National Security Agency, Ft. Meade, MD.
November 1998.
.sp
.LP
Piper, Derrell. \fIRFC 2407, The Internet IP Security Domain of Interpretation
for ISAKMP\fR. Network Alchemy. Santa Cruz, California. November 1998.
.sp
.LP
Kivinen, T. \fIRFC 3526, More Modular Exponential (MODP) Diffie-Hellman Groups
for Internet Key Exchange (IKE)\fR. The Internet Society, Network Working
Group. May 2003.
.sp
.LP
Lepinksi, M. and Kent, S. \fIRFC 5114, Additional Diffie-Hellman Groups for Use
with IETF Standards\fR. BBN Technologies, January 2008.
.sp
.LP
Fu, D. and Solinas, J. \fIRFC 5903, Elliptic Curve Groups modulo a Prime (ECP
Groups) for IKE and IKEv2\fR. NSA, June 2010.