]>
Commit | Line | Data |
---|---|---|
8250fc10 | 1 | .TH IPSEC.CONF 5 "2012-06-26" "@PACKAGE_VERSION@" "strongSwan" |
fea5e716 MW |
2 | .SH NAME |
3 | ipsec.conf \- IPsec configuration and connections | |
4 | .SH DESCRIPTION | |
5 | The optional | |
6 | .I ipsec.conf | |
7 | file | |
8 | specifies most configuration and control information for the | |
9 | strongSwan IPsec subsystem. | |
f115838b | 10 | The major exception is secrets for authentication; |
fea5e716 | 11 | see |
f115838b | 12 | .IR ipsec.secrets (5). |
532f2347 | 13 | Its contents are not security-sensitive. |
fea5e716 MW |
14 | .PP |
15 | The file is a text file, consisting of one or more | |
16 | .IR sections . | |
17 | White space followed by | |
18 | .B # | |
19 | followed by anything to the end of the line | |
20 | is a comment and is ignored, | |
21 | as are empty lines which are not within a section. | |
22 | .PP | |
23 | A line which contains | |
24 | .B include | |
25 | and a file name, separated by white space, | |
a83d1245 | 26 | is replaced by the contents of that file. |
fea5e716 MW |
27 | If the file name is not a full pathname, |
28 | it is considered to be relative to the directory containing the | |
29 | including file. | |
30 | Such inclusions can be nested. | |
31 | Only a single filename may be supplied, and it may not contain white space, | |
32 | but it may include shell wildcards (see | |
33 | .IR sh (1)); | |
34 | for example: | |
35 | .PP | |
36 | .B include | |
37 | .B "ipsec.*.conf" | |
38 | .PP | |
39 | The intention of the include facility is mostly to permit keeping | |
40 | information on connections, or sets of connections, | |
41 | separate from the main configuration file. | |
42 | This permits such connection descriptions to be changed, | |
43 | copied to the other security gateways involved, etc., | |
44 | without having to constantly extract them from the configuration | |
45 | file and then insert them back into it. | |
46 | Note also the | |
47 | .B also | |
48 | parameter (described below) which permits splitting a single logical | |
49 | section (e.g. a connection description) into several actual sections. | |
50 | .PP | |
fea5e716 MW |
51 | A section |
52 | begins with a line of the form: | |
53 | .PP | |
54 | .I type | |
55 | .I name | |
56 | .PP | |
57 | where | |
58 | .I type | |
59 | indicates what type of section follows, and | |
60 | .I name | |
61 | is an arbitrary name which distinguishes the section from others | |
62 | of the same type. | |
fea5e716 | 63 | All subsequent non-empty lines |
a83d1245 TB |
64 | which begin with white space are part of the section. |
65 | Sections of the same type that share the same name are merged. | |
fea5e716 MW |
66 | .PP |
67 | Lines within the section are generally of the form | |
68 | .PP | |
69 | \ \ \ \ \ \fIparameter\fB=\fIvalue\fR | |
70 | .PP | |
71 | (note the mandatory preceding white space). | |
72 | There can be white space on either side of the | |
73 | .BR = . | |
a83d1245 | 74 | Parameter names are specific to a section type. |
fea5e716 MW |
75 | .PP |
76 | An empty | |
77 | .I value | |
78 | stands for the system default value (if any) of the parameter, | |
a83d1245 TB |
79 | i.e. it is roughly equivalent to omitting the parameter line entirely. This may |
80 | be useful to clear a setting inherited from a | |
81 | .B %default | |
82 | section or via | |
83 | .B also | |
84 | parameter (see below). | |
fea5e716 MW |
85 | A |
86 | .I value | |
a83d1245 TB |
87 | may contain single spaces (additional white space is reduced to one space). |
88 | To preserve white space as written enclose the entire | |
fea5e716 | 89 | .I value |
a83d1245 TB |
90 | in double quotes (\fB"\fR); in such values double quotes themselves may be |
91 | escaped by prefixing them with | |
92 | .B \\\\ | |
93 | characters. A double-quoted string may span multiple lines by ending them with | |
94 | .B \\\\ | |
95 | characters (following lines don't have to begin with white space, as that will | |
96 | be preserved). Additionally, the following control characters may be encoded in | |
97 | double-quoted strings: \\n, \\r, \\t, \\b, \\f. | |
fea5e716 MW |
98 | .PP |
99 | Numeric values are specified to be either an ``integer'' | |
100 | (a sequence of digits) or a ``decimal number'' | |
101 | (sequence of digits optionally followed by `.' and another sequence of digits). | |
102 | .PP | |
103 | There is currently one parameter which is available in any type of | |
104 | section: | |
105 | .TP | |
106 | .B also | |
a83d1245 TB |
107 | the value is a section name; the parameters of that section are inherited by |
108 | the current section. Parameters in the current section always override inherited | |
109 | parameters, even if an | |
110 | .B also | |
111 | follows after them. | |
112 | The specified section must exist and must have the same section type; it doesn't | |
113 | if it is defined before or after the current section. | |
114 | Nesting is permitted, and there may be more than one | |
115 | .B also | |
116 | in a single section (parameters from referenced sections are inherited and | |
117 | overridden in the order of these | |
fea5e716 | 118 | .B also |
a83d1245 | 119 | parameters). |
fea5e716 MW |
120 | .PP |
121 | A section with name | |
122 | .B %default | |
a83d1245 TB |
123 | specifies defaults for sections of the same type. All parameters in it, are |
124 | inherited by all other sections of that type. | |
fea5e716 MW |
125 | .PP |
126 | Currently there are three types of sections: | |
127 | a | |
128 | .B config | |
129 | section specifies general configuration information for IPsec, a | |
130 | .B conn | |
131 | section specifies an IPsec connection, while a | |
132 | .B ca | |
7900ab1b | 133 | section specifies special properties of a certification authority. |
fea5e716 MW |
134 | .SH "CONN SECTIONS" |
135 | A | |
136 | .B conn | |
137 | section contains a | |
138 | .IR "connection specification" , | |
139 | defining a network connection to be made using IPsec. | |
532f2347 | 140 | The name given is arbitrary, and is used to identify the connection. |
fea5e716 MW |
141 | Here's a simple example: |
142 | .PP | |
143 | .ne 10 | |
144 | .nf | |
145 | .ft B | |
146 | .ta 1c | |
147 | conn snt | |
7900ab1b AS |
148 | left=192.168.0.1 |
149 | leftsubnet=10.1.0.0/16 | |
150 | right=192.168.0.2 | |
151 | rightsubnet=10.1.0.0/16 | |
fea5e716 | 152 | keyingtries=%forever |
7900ab1b | 153 | auto=add |
fea5e716 MW |
154 | .ft |
155 | .fi | |
156 | .PP | |
532f2347 | 157 | A note on terminology: There are two kinds of communications going on: |
fea5e716 MW |
158 | transmission of user IP packets, and gateway-to-gateway negotiations for |
159 | keying, rekeying, and general control. | |
f115838b TB |
160 | The path to control the connection is called 'ISAKMP SA' in IKEv1 |
161 | and 'IKE SA' in the IKEv2 protocol. That what is being negotiated, the kernel | |
162 | level data path, is called 'IPsec SA' or 'Child SA'. | |
75e3d90d MW |
163 | strongSwan previously used two separate keying daemons, \fIpluto\fP and |
164 | \fIcharon\fP. This manual does not discuss \fIpluto\fP options anymore, but | |
165 | only \fIcharon\fP that since strongSwan 5.0 supports both IKEv1 and IKEv2. | |
fea5e716 MW |
166 | .PP |
167 | To avoid trivial editing of the configuration file to suit it to each system | |
168 | involved in a connection, | |
169 | connection specifications are written in terms of | |
170 | .I left | |
171 | and | |
172 | .I right | |
173 | participants, | |
174 | rather than in terms of local and remote. | |
175 | Which participant is considered | |
176 | .I left | |
177 | or | |
178 | .I right | |
179 | is arbitrary; | |
f115838b TB |
180 | for every connection description an attempt is made to figure out whether |
181 | the local endpoint should act as the | |
182 | .I left | |
183 | or | |
184 | .I right | |
185 | endpoint. This is done by matching the IP addresses defined for both endpoints | |
186 | with the IP addresses assigned to local network interfaces. If a match is found | |
187 | then the role (left or right) that matches is going to be considered local. | |
188 | If no match is found during startup, | |
189 | .I left | |
190 | is considered local. | |
fea5e716 MW |
191 | This permits using identical connection specifications on both ends. |
192 | There are cases where there is no symmetry; a good convention is to | |
193 | use | |
194 | .I left | |
195 | for the local side and | |
196 | .I right | |
197 | for the remote side (the first letters are a good mnemonic). | |
198 | .PP | |
199 | Many of the parameters relate to one participant or the other; | |
200 | only the ones for | |
201 | .I left | |
202 | are listed here, but every parameter whose name begins with | |
203 | .B left | |
204 | has a | |
205 | .B right | |
206 | counterpart, | |
207 | whose description is the same but with | |
208 | .B left | |
209 | and | |
210 | .B right | |
211 | reversed. | |
212 | .PP | |
532f2347 MW |
213 | Parameters are optional unless marked '(required)'. |
214 | .SS "CONN PARAMETERS" | |
215 | Unless otherwise noted, for a connection to work, | |
fea5e716 MW |
216 | in general it is necessary for the two ends to agree exactly |
217 | on the values of these parameters. | |
6bcf6016 TB |
218 | .TP |
219 | .BR aaa_identity " = <id>" | |
64d7b073 MW |
220 | defines the identity of the AAA backend used during IKEv2 EAP authentication. |
221 | This is required if the EAP client uses a method that verifies the server | |
222 | identity (such as EAP-TLS), but it does not match the IKEv2 gateway identity. | |
223 | .TP | |
72970b45 TB |
224 | .BR aggressive " = yes | " no |
225 | whether to use IKEv1 Aggressive or Main Mode (the default). | |
226 | .TP | |
5fdbb3c6 MW |
227 | .BR ah " = <cipher suites>" |
228 | comma-separated list of AH algorithms to be used for the connection, e.g. | |
229 | .BR sha1-sha256-modp1024 . | |
230 | The notation is | |
231 | .BR integrity[-dhgroup] . | |
232 | For IKEv2, multiple algorithms (separated by -) of the same type can be included | |
233 | in a single proposal. IKEv1 only includes the first algorithm in a proposal. | |
234 | Only either the | |
235 | .B ah | |
236 | or | |
237 | .B esp | |
238 | keyword may be used, AH+ESP bundles are not supported. | |
239 | ||
240 | There is no default, by default ESP is used. | |
241 | The daemon adds its extensive default proposal to the configured value. To | |
242 | restrict it to the configured proposal an | |
243 | exclamation mark | |
244 | .RB ( ! ) | |
245 | can be added at the end. | |
246 | ||
247 | If | |
248 | .B dh-group | |
249 | is specified, CHILD_SA/Quick Mode setup and rekeying include a separate | |
250 | Diffie-Hellman exchange. | |
251 | .TP | |
a5477a6f TB |
252 | .BR also " = <name>" |
253 | includes conn section | |
254 | .BR <name> . | |
fea5e716 | 255 | .TP |
5fdbb3c6 MW |
256 | .BR auth " = <value>" |
257 | was used by the | |
258 | .B pluto | |
259 | IKEv1 daemon to use AH integrity protection for ESP encrypted packets, but is | |
260 | not supported in charon. The | |
261 | .B ah | |
262 | keyword specifies algorithms to use for integrity protection with AH, but | |
263 | without encryption. AH+ESP bundles are not supported. | |
264 | .TP | |
2045a9d3 | 265 | .BR authby " = " pubkey " | rsasig | ecdsasig | psk | secret | never | xauthpsk | xauthrsasig" |
fea5e716 MW |
266 | how the two security gateways should authenticate each other; |
267 | acceptable values are | |
7900ab1b | 268 | .B psk |
a5477a6f TB |
269 | or |
270 | .B secret | |
c7f76958 AS |
271 | for pre-shared secrets, |
272 | .B pubkey | |
273 | (the default) for public key signatures as well as the synonyms | |
fea5e716 | 274 | .B rsasig |
c7f76958 AS |
275 | for RSA digital signatures and |
276 | .B ecdsasig | |
277 | for Elliptic Curve DSA signatures. | |
fea5e716 | 278 | .B never |
c7f76958 AS |
279 | can be used if negotiation is never to be attempted or accepted (useful for |
280 | shunt-only conns). | |
8015c91c | 281 | Digital signatures are superior in every way to shared secrets. |
7900ab1b AS |
282 | IKEv1 additionally supports the values |
283 | .B xauthpsk | |
284 | and | |
285 | .B xauthrsasig | |
286 | that will enable eXtended AUTHentication (XAUTH) in addition to IKEv1 main mode | |
c8d46f29 | 287 | based on shared secrets or digital RSA signatures, respectively. |
75e3d90d MW |
288 | This parameter is deprecated, as two peers do not need to agree on an |
289 | authentication method in IKEv2. Use the | |
a44bb934 | 290 | .B leftauth |
75e3d90d | 291 | parameter instead to define authentication methods. |
fea5e716 | 292 | .TP |
6bcf6016 | 293 | .BR auto " = " ignore " | add | route | start" |
c2bc2b27 AS |
294 | what operation, if any, should be done automatically at IPsec startup; |
295 | currently-accepted values are | |
f115838b TB |
296 | .BR add , |
297 | .BR route , | |
c2bc2b27 | 298 | .B start |
7900ab1b | 299 | and |
f115838b TB |
300 | .B ignore |
301 | (the default). | |
c2bc2b27 AS |
302 | .B add |
303 | loads a connection without starting it. | |
304 | .B route | |
305 | loads a connection and installs kernel traps. If traffic is detected between | |
306 | .B leftsubnet | |
307 | and | |
72970b45 TB |
308 | .BR rightsubnet , |
309 | a connection is established. | |
c2bc2b27 | 310 | .B start |
f3bb1bd0 | 311 | loads a connection and brings it up immediately. |
c2bc2b27 | 312 | .B ignore |
72970b45 | 313 | ignores the connection. This is equal to deleting a connection from the config |
8015c91c | 314 | file. |
66e12b92 TB |
315 | Relevant only locally, other end need not agree on it. |
316 | .TP | |
317 | .BR closeaction " = " none " | clear | hold | restart" | |
318 | defines the action to take if the remote peer unexpectedly closes a CHILD_SA | |
319 | (see | |
320 | .B dpdaction | |
321 | for meaning of values). | |
322 | A | |
323 | .B closeaction should not be | |
324 | used if the peer uses reauthentication or uniquids checking, as these events | |
b2dfa062 | 325 | might trigger the defined action when not desired. |
7900ab1b | 326 | .TP |
6bcf6016 | 327 | .BR compress " = yes | " no |
fea5e716 MW |
328 | whether IPComp compression of content is proposed on the connection |
329 | (link-level compression does not work on encrypted data, | |
330 | so to be effective, compression must be done \fIbefore\fR encryption); | |
331 | acceptable values are | |
332 | .B yes | |
333 | and | |
334 | .B no | |
532f2347 | 335 | (the default). A value of |
fea5e716 | 336 | .B yes |
18dac73f | 337 | causes the daemon to propose both compressed and uncompressed, |
fea5e716 MW |
338 | and prefer compressed. |
339 | A value of | |
340 | .B no | |
18dac73f | 341 | prevents the daemon from proposing or accepting compression. |
fea5e716 | 342 | .TP |
6bcf6016 | 343 | .BR dpdaction " = " none " | clear | hold | restart" |
fea5e716 | 344 | controls the use of the Dead Peer Detection protocol (DPD, RFC 3706) where |
a655f5c0 MW |
345 | R_U_THERE notification messages (IKEv1) or empty INFORMATIONAL messages (IKEv2) |
346 | are periodically sent in order to check the | |
347 | liveliness of the IPsec peer. The values | |
7900ab1b AS |
348 | .BR clear , |
349 | .BR hold , | |
8015c91c | 350 | and |
7900ab1b AS |
351 | .B restart |
352 | all activate DPD. If no activity is detected, all connections with a dead peer | |
f115838b TB |
353 | are stopped and unrouted |
354 | .RB ( clear ), | |
355 | put in the hold state | |
356 | .RB ( hold ) | |
357 | or restarted | |
358 | .RB ( restart ). | |
75e3d90d | 359 | The default is |
7900ab1b | 360 | .B none |
75e3d90d | 361 | which disables the active sending of DPD messages. |
fea5e716 | 362 | .TP |
6bcf6016 | 363 | .BR dpddelay " = " 30s " | <time>" |
a655f5c0 MW |
364 | defines the period time interval with which R_U_THERE messages/INFORMATIONAL |
365 | exchanges are sent to the peer. These are only sent if no other traffic is | |
366 | received. In IKEv2, a value of 0 sends no additional INFORMATIONAL | |
367 | messages and uses only standard messages (such as those to rekey) to detect | |
368 | dead peers. | |
fea5e716 | 369 | .TP |
66e12b92 TB |
370 | .BR dpdtimeout " = " 150s " | <time> |
371 | defines the timeout interval, after which all connections to a peer are deleted | |
372 | in case of inactivity. This only applies to IKEv1, in IKEv2 the default | |
373 | retransmission timeout applies, as every exchange is used to detect dead peers. | |
4876f896 | 374 | .TP |
6bcf6016 | 375 | .BR inactivity " = <time>" |
8015c91c | 376 | defines the timeout interval, after which a CHILD_SA is closed if it did |
d048a319 MW |
377 | not send or receive any traffic. The inactivity counter is reset during CHILD_SA |
378 | rekeying. This means that the inactivity timeout must be smaller than the | |
379 | rekeying interval to have any effect. | |
eea626ed | 380 | .TP |
6bcf6016 | 381 | .BR eap_identity " = <id>" |
72970b45 | 382 | defines the identity the client uses to reply to an EAP Identity request. |
82290106 | 383 | If defined on the EAP server, the defined identity will be used as peer |
8015c91c | 384 | identity during EAP authentication. The special value |
82290106 | 385 | .B %identity |
f115838b | 386 | uses the EAP Identity method to ask the client for an EAP identity. If not |
82290106 MW |
387 | defined, the IKEv2 identity will be used as EAP identity. |
388 | .TP | |
6bcf6016 | 389 | .BR esp " = <cipher suites>" |
f115838b | 390 | comma-separated list of ESP encryption/authentication algorithms to be used |
c2bc2b27 | 391 | for the connection, e.g. |
a5477a6f | 392 | .BR aes128-sha256 . |
f115838b | 393 | The notation is |
de13eab0 | 394 | .BR encryption-integrity[-dhgroup][-esnmode] . |
5fdbb3c6 MW |
395 | For IKEv2, multiple algorithms (separated by -) of the same type can be included |
396 | in a single proposal. IKEv1 only includes the first algorithm in a proposal. | |
397 | Only either the | |
398 | .B ah | |
399 | or | |
400 | .B esp | |
401 | keyword may be used, AH+ESP bundles are not supported. | |
5b2e669b | 402 | |
de13eab0 | 403 | Defaults to |
75e3d90d MW |
404 | .BR aes128-sha1,3des-sha1 . |
405 | The daemon adds its extensive default proposal to this default | |
de13eab0 TB |
406 | or the configured value. To restrict it to the configured proposal an |
407 | exclamation mark | |
408 | .RB ( ! ) | |
409 | can be added at the end. | |
5b2e669b | 410 | |
de13eab0 | 411 | .BR Note : |
75e3d90d | 412 | As a responder the daemon accepts the first supported proposal received from |
de13eab0 TB |
413 | the peer. In order to restrict a responder to only accept specific cipher |
414 | suites, the strict flag | |
415 | .RB ( ! , | |
416 | exclamation mark) can be used, e.g: aes256-sha512-modp4096! | |
f115838b TB |
417 | .br |
418 | If | |
419 | .B dh-group | |
75e3d90d MW |
420 | is specified, CHILD_SA/Quick Mode setup and rekeying include a separate |
421 | Diffie-Hellman exchange. Valid values for | |
de13eab0 | 422 | .B esnmode |
37821954 MW |
423 | (IKEv2 only) are |
424 | .B esn | |
425 | and | |
de13eab0 TB |
426 | .BR noesn . |
427 | Specifying both negotiates Extended Sequence Number support with the peer, | |
428 | the default is | |
37821954 | 429 | .B noesn. |
c2bc2b27 | 430 | .TP |
6bcf6016 | 431 | .BR forceencaps " = yes | " no |
a5477a6f | 432 | force UDP encapsulation for ESP packets even if no NAT situation is detected. |
f115838b | 433 | This may help to surmount restrictive firewalls. In order to force the peer to |
75e3d90d | 434 | encapsulate packets, NAT detection payloads are faked. |
9dae1bed | 435 | .TP |
365d9a6f | 436 | .BR fragmentation " = yes | force | " no |
aaf9911a TB |
437 | whether to use IKE fragmentation (proprietary IKEv1 extension or IKEv2 |
438 | fragmentation as per RFC 7383). Acceptable values are | |
365d9a6f TB |
439 | .BR yes , |
440 | .B force | |
97973f86 TB |
441 | and |
442 | .B no | |
aaf9911a | 443 | (the default). Fragmented IKE messages sent by a peer are always accepted |
365d9a6f TB |
444 | irrespective of the value of this option. If set to |
445 | .BR yes , | |
446 | and the peer supports it, larger IKE messages will be sent in fragments. | |
447 | If set to | |
448 | .B force | |
aaf9911a TB |
449 | (only supported for IKEv1) the initial IKE message will already be fragmented |
450 | if required. | |
97973f86 | 451 | .TP |
6bcf6016 | 452 | .BR ike " = <cipher suites>" |
f115838b TB |
453 | comma-separated list of IKE/ISAKMP SA encryption/authentication algorithms |
454 | to be used, e.g. | |
455 | .BR aes128-sha1-modp2048 . | |
456 | The notation is | |
5b2e669b MW |
457 | .BR encryption-integrity[-prf]-dhgroup . |
458 | If no PRF is given, the algorithms defined for integrity are used for the PRF. | |
459 | The prf keywords are the same as the integrity algorithms, but have a | |
460 | .B prf | |
461 | prefix (such as | |
462 | .BR prfsha1 , | |
463 | .B prfsha256 | |
464 | or | |
465 | .BR prfaesxcbc ). | |
de13eab0 | 466 | .br |
5b2e669b MW |
467 | In IKEv2, multiple algorithms and proposals may be included, such as |
468 | .BR aes128-aes256-sha1-modp1536-modp2048,3des-sha1-md5-modp1024 . | |
469 | ||
de13eab0 | 470 | Defaults to |
72970b45 | 471 | .BR aes128-sha1-modp2048,3des-sha1-modp1536 . |
75e3d90d | 472 | The daemon adds its extensive default proposal to this |
de13eab0 TB |
473 | default or the configured value. To restrict it to the configured proposal an |
474 | exclamation mark | |
475 | .RB ( ! ) | |
476 | can be added at the end. | |
5b2e669b | 477 | |
de13eab0 | 478 | .BR Note : |
75e3d90d | 479 | As a responder the daemon accepts the first supported proposal received from |
de13eab0 TB |
480 | the peer. In order to restrict a responder to only accept specific cipher |
481 | suites, the strict flag | |
72970b45 | 482 | .RB ( ! , |
5b2e669b MW |
483 | exclamation mark) can be used, e.g: |
484 | .BR aes256-sha512-modp4096! | |
c2bc2b27 | 485 | .TP |
88f4cd39 MW |
486 | .BR ikedscp " = " 000000 " | <DSCP field>" |
487 | Differentiated Services Field Codepoint to set on outgoing IKE packets sent | |
488 | from this connection. The value is a six digit binary encoded string defining | |
489 | the Codepoint to set, as defined in RFC 2474. | |
490 | .TP | |
6bcf6016 | 491 | .BR ikelifetime " = " 3h " | <time>" |
f115838b | 492 | how long the keying channel of a connection (ISAKMP or IKE SA) |
9f8ceffb | 493 | should last before being renegotiated. Also see EXPIRY/REKEY below. |
fea5e716 | 494 | .TP |
6bcf6016 | 495 | .BR installpolicy " = " yes " | no" |
75e3d90d MW |
496 | decides whether IPsec policies are installed in the kernel by the charon daemon |
497 | for a given connection. Allows peaceful cooperation e.g. with | |
84bec926 AS |
498 | the Mobile IPv6 daemon mip6d who wants to control the kernel policies. |
499 | Acceptable values are | |
500 | .B yes | |
501 | (the default) and | |
502 | .BR no . | |
503 | .TP | |
6bcf6016 | 504 | .BR keyexchange " = " ike " | ikev1 | ikev2" |
72970b45 TB |
505 | which key exchange protocol should be used to initiate the connection. |
506 | Connections marked with | |
fea5e716 | 507 | .B ike |
75e3d90d | 508 | use IKEv2 when initiating, but accept any protocol version when responding. |
fea5e716 | 509 | .TP |
bf870ffb | 510 | .BR keyingtries " = " 3 " | <number> | %forever" |
fea5e716 MW |
511 | how many attempts (a whole number or \fB%forever\fP) should be made to |
512 | negotiate a connection, or a replacement for one, before giving up | |
513 | (default | |
bf870ffb | 514 | .BR 3 ). |
fea5e716 | 515 | The value \fB%forever\fP |
532f2347 | 516 | means 'never give up'. |
fea5e716 MW |
517 | Relevant only locally, other end need not agree on it. |
518 | .TP | |
519 | .B keylife | |
deddfde9 TB |
520 | synonym for |
521 | .BR lifetime . | |
fea5e716 | 522 | .TP |
6301ec0a MW |
523 | .BR left " = <ip address> | <fqdn> | " %any " | <range> | <subnet> " |
524 | The IP address of the left participant's public-network interface | |
c2bc2b27 | 525 | or one of several magic values. |
75e3d90d | 526 | The value |
f115838b | 527 | .B %any |
72970b45 TB |
528 | (the default) for the local endpoint signifies an address to be filled in (by |
529 | automatic keying) during negotiation. If the local peer initiates the | |
530 | connection setup the routing table will be queried to determine the correct | |
531 | local IP address. | |
f115838b TB |
532 | In case the local peer is responding to a connection setup then any IP address |
533 | that is assigned to a local interface will be accepted. | |
66e12b92 TB |
534 | |
535 | The prefix | |
536 | .B % | |
537 | in front of a fully-qualified domain name or an IP address will implicitly set | |
538 | .BR leftallowany =yes. | |
f115838b TB |
539 | |
540 | If | |
541 | .B %any | |
542 | is used for the remote endpoint it literally means any IP address. | |
543 | ||
6301ec0a MW |
544 | To limit the connection to a specific range of hosts, a range ( |
545 | .BR 10.1.0.0-10.2.255.255 | |
546 | ) or a subnet ( | |
547 | .BR 10.1.0.0/16 | |
548 | ) can be specified, and multiple addresses, ranges and subnets can be separated | |
549 | by commas. While one can freely combine these items, to initiate the connection | |
550 | at least one non-range/subnet is required. | |
551 | ||
f115838b TB |
552 | Please note that with the usage of wildcards multiple connection descriptions |
553 | might match a given incoming connection attempt. The most specific description | |
554 | is used in that case. | |
c2bc2b27 | 555 | .TP |
66e12b92 TB |
556 | .BR leftallowany " = yes | " no |
557 | a modifier for | |
558 | .BR left , | |
559 | making it behave as | |
560 | .B %any | |
561 | although a concrete IP address or domain name has been assigned. | |
562 | .TP | |
6bcf6016 | 563 | .BR leftauth " = <auth method>" |
f115838b TB |
564 | Authentication method to use locally (left) or require from the remote (right) |
565 | side. | |
75e3d90d | 566 | Acceptable values are |
a44bb934 | 567 | .B pubkey |
8015c91c | 568 | for public key authentication (RSA/ECDSA), |
a44bb934 | 569 | .B psk |
75e3d90d | 570 | for pre-shared key authentication, |
a44bb934 | 571 | .B eap |
75e3d90d MW |
572 | to (require the) use of the Extensible Authentication Protocol in IKEv2, and |
573 | .B xauth | |
574 | for IKEv1 eXtended Authentication. | |
276cf3b7 | 575 | |
44e513a3 | 576 | To require a trustchain public key strength for the remote side, specify the |
7c4214bd MW |
577 | key type followed by the minimum strength in bits (for example |
578 | .BR ecdsa-384 | |
44e513a3 | 579 | or |
7c4214bd MW |
580 | .BR rsa-2048-ecdsa-256 ). |
581 | To limit the acceptable set of hashing algorithms for trustchain validation, | |
582 | append hash algorithms to | |
583 | .BR pubkey | |
584 | or a key strength definition (for example | |
585 | .BR pubkey-sha1-sha256 | |
586 | or | |
587 | .BR rsa-2048-ecdsa-256-sha256-sha384-sha512 ). | |
276cf3b7 TB |
588 | Unless disabled in |
589 | .BR strongswan.conf (5) | |
590 | such key types and hash algorithms are also applied as constraints against IKEv2 | |
591 | signature authentication schemes used by the remote side. | |
592 | ||
593 | If both peers support RFC 7427 ("Signature Authentication in IKEv2") specific | |
594 | hash algorithms to be used during IKEv2 authentication may be configured. | |
595 | The syntax is the same as above. For example, with | |
596 | .B pubkey-sha384-sha256 | |
597 | a public key signature scheme with either SHA-384 or SHA-256 would get used for | |
598 | authentication, in that order and depending on the hash algorithms supported by | |
599 | the peer. If no specific hash algorithms are configured, the default is to | |
600 | prefer an algorithm that matches or exceeds the strength of the signature key. | |
601 | ||
44e513a3 | 602 | For |
72970b45 | 603 | .BR eap , |
a44bb934 | 604 | an optional EAP method can be appended. Currently defined methods are |
f115838b TB |
605 | .BR eap-aka , |
606 | .BR eap-gtc , | |
607 | .BR eap-md5 , | |
0293f095 AS |
608 | .BR eap-mschapv2 , |
609 | .BR eap-peap , | |
610 | .BR eap-sim , | |
21079538 | 611 | .BR eap-tls , |
b24be296 | 612 | .BR eap-ttls , |
5f6ef5d5 | 613 | .BR eap-dynamic , |
a44bb934 | 614 | and |
c8d46f29 | 615 | .BR eap-radius . |
a44bb934 MW |
616 | Alternatively, IANA assigned EAP method numbers are accepted. Vendor specific |
617 | EAP methods are defined in the form | |
618 | .B eap-type-vendor | |
f115838b | 619 | .RB "(e.g. " eap-7-12345 ). |
f2e2cce2 MW |
620 | To specify signature and trust chain constraints for EAP-(T)TLS, append a colon |
621 | to the EAP method, followed by the key type/size and hash algorithm as discussed | |
622 | above. For | |
75e3d90d | 623 | .B xauth, |
66e12b92 | 624 | an XAuth authentication backend can be specified, such as |
75e3d90d MW |
625 | .B xauth-generic |
626 | or | |
66e12b92 | 627 | .BR xauth-eap . |
75e3d90d MW |
628 | If XAuth is used in |
629 | .BR leftauth , | |
630 | Hybrid authentication is used. For traditional XAuth authentication, define | |
631 | XAuth in | |
632 | .BR lefauth2 . | |
a44bb934 | 633 | .TP |
6bcf6016 | 634 | .BR leftauth2 " = <auth method>" |
8015c91c | 635 | Same as |
f115838b | 636 | .BR leftauth , |
75e3d90d MW |
637 | but defines an additional authentication exchange. In IKEv1, only XAuth can be |
638 | used in the second authentication round. IKEv2 supports multiple complete | |
a44bb934 | 639 | authentication rounds using "Multiple Authentication Exchanges" defined |
72970b45 | 640 | in RFC 4739. This allows, for example, separated authentication |
75e3d90d | 641 | of host and user. |
a44bb934 | 642 | .TP |
6bcf6016 | 643 | .BR leftca " = <issuer dn> | %same" |
fea5e716 MW |
644 | the distinguished name of a certificate authority which is required to |
645 | lie in the trust path going from the left participant's certificate up | |
8015c91c | 646 | to the root certification authority. |
72970b45 TB |
647 | .B %same |
648 | means that the value configured for the right participant should be reused. | |
fea5e716 | 649 | .TP |
6bcf6016 | 650 | .BR leftca2 " = <issuer dn> | %same" |
a44bb934 | 651 | Same as |
6bcf6016 | 652 | .BR leftca , |
a44bb934 MW |
653 | but for the second authentication round (IKEv2 only). |
654 | .TP | |
6bcf6016 | 655 | .BR leftcert " = <path>" |
f115838b TB |
656 | the path to the left participant's X.509 certificate. The file can be encoded |
657 | either in PEM or DER format. OpenPGP certificates are supported as well. | |
7900ab1b | 658 | Both absolute paths or paths relative to \fI/etc/ipsec.d/certs\fP |
fea5e716 MW |
659 | are accepted. By default |
660 | .B leftcert | |
8015c91c | 661 | sets |
fea5e716 | 662 | .B leftid |
72970b45 | 663 | to the distinguished name of the certificate's subject. |
84545f6e | 664 | The left participant's ID can be overridden by specifying a |
fea5e716 MW |
665 | .B leftid |
666 | value which must be certified by the certificate, though. | |
05e266ea MW |
667 | .br |
668 | A value in the form | |
f6d8fb36 | 669 | .B %smartcard[<slot nr>[@<module>]]:<keyid> |
05e266ea | 670 | defines a specific certificate to load from a PKCS#11 backend for this |
f6d8fb36 | 671 | connection. See ipsec.secrets(5) for details about smartcard definitions. |
05e266ea MW |
672 | .B leftcert |
673 | is required only if selecting the certificate with | |
674 | .B leftid | |
675 | is not sufficient, for example if multiple certificates use the same subject. | |
11a7abf5 MW |
676 | .br |
677 | Multiple certificate paths or PKCS#11 backends can be specified in a comma | |
678 | separated list. The daemon chooses the certificate based on the received | |
679 | certificate requests if possible before enforcing the first. | |
fea5e716 | 680 | .TP |
6bcf6016 | 681 | .BR leftcert2 " = <path>" |
a44bb934 MW |
682 | Same as |
683 | .B leftcert, | |
684 | but for the second authentication round (IKEv2 only). | |
685 | .TP | |
6367de28 | 686 | .BR leftcertpolicy " = <OIDs>" |
66e12b92 TB |
687 | Comma separated list of certificate policy OIDs the peer's certificate must |
688 | have. | |
689 | OIDs are specified using the numerical dotted representation. | |
6367de28 | 690 | .TP |
c60f1da4 MW |
691 | .BR leftdns " = <servers>" |
692 | Comma separated list of DNS server addresses to exchange as configuration | |
72970b45 TB |
693 | attributes. On the initiator, a server is a fixed IPv4/IPv6 address, or |
694 | .BR %config4 / %config6 | |
c60f1da4 | 695 | to request attributes without an address. On the responder, |
72970b45 | 696 | only fixed IPv4/IPv6 addresses are allowed and define DNS servers assigned |
c60f1da4 MW |
697 | to the client. |
698 | .TP | |
6bcf6016 | 699 | .BR leftfirewall " = yes | " no |
c2bc2b27 AS |
700 | whether the left participant is doing forwarding-firewalling |
701 | (including masquerading) using iptables for traffic from \fIleftsubnet\fR, | |
702 | which should be turned off (for traffic to the other subnet) | |
703 | once the connection is established; | |
704 | acceptable values are | |
705 | .B yes | |
706 | and | |
707 | .B no | |
708 | (the default). | |
709 | May not be used in the same connection description with | |
710 | .BR leftupdown . | |
711 | Implemented as a parameter to the default \fBipsec _updown\fR script. | |
712 | See notes below. | |
713 | Relevant only locally, other end need not agree on it. | |
714 | ||
715 | If one or both security gateways are doing forwarding firewalling | |
716 | (possibly including masquerading), | |
717 | and this is specified using the firewall parameters, | |
718 | tunnels established with IPsec are exempted from it | |
719 | so that packets can flow unchanged through the tunnels. | |
720 | (This means that all subnets connected in this manner must have | |
721 | distinct, non-overlapping subnet address blocks.) | |
75e3d90d | 722 | This is done by the default \fBipsec _updown\fR script. |
c2bc2b27 AS |
723 | |
724 | In situations calling for more control, | |
725 | it may be preferable for the user to supply his own | |
726 | .I updown | |
727 | script, | |
728 | which makes the appropriate adjustments for his system. | |
729 | .TP | |
6bcf6016 | 730 | .BR leftgroups " = <group list>" |
c2bc2b27 AS |
731 | a comma separated list of group names. If the |
732 | .B leftgroups | |
733 | parameter is present then the peer must be a member of at least one | |
75e3d90d | 734 | of the groups defined by the parameter. |
c2bc2b27 | 735 | .TP |
46df61df MW |
736 | .BR leftgroups2 " = <group list>" |
737 | Same as | |
738 | .B leftgroups, | |
739 | but for the second authentication round defined with | |
740 | .B leftauth2. | |
741 | .TP | |
6bcf6016 | 742 | .BR lefthostaccess " = yes | " no |
c2bc2b27 AS |
743 | inserts a pair of INPUT and OUTPUT iptables rules using the default |
744 | \fBipsec _updown\fR script, thus allowing access to the host itself | |
745 | in the case where the host's internal interface is part of the | |
746 | negotiated client subnet. | |
747 | Acceptable values are | |
748 | .B yes | |
749 | and | |
750 | .B no | |
751 | (the default). | |
752 | .TP | |
6bcf6016 | 753 | .BR leftid " = <id>" |
f115838b | 754 | how the left participant should be identified for authentication; |
c2bc2b27 | 755 | defaults to |
66e12b92 TB |
756 | .B left |
757 | or the subject of the certificate configured with | |
758 | .BR leftcert . | |
9388bf13 | 759 | If |
72970b45 TB |
760 | .B leftcert |
761 | is configured the identity has to be confirmed by the certificate. | |
b7a500e9 | 762 | |
9388bf13 MW |
763 | Can be an IP address, a fully-qualified domain name, an email address or a |
764 | Distinguished Name for which the ID type is determined automatically and the | |
765 | string is converted to the appropriate encoding. To enforce a specific identity | |
766 | type, a prefix may be used, followed by a colon (:). If the number sign (#) | |
767 | follows the colon, the remaining data is interpreted as hex encoding, otherwise | |
768 | the string is used as-is as the identification data. Note that this implies | |
769 | that no conversion is performed for non-string identities. For example, | |
770 | \fIipv4:10.0.0.1\fP does not create a valid ID_IPV4_ADDR IKE identity, as it | |
771 | does not get converted to binary 0x0a000001. Instead, one could use | |
772 | \fIipv4:#0a000001\fP to get a valid identity, but just using the implicit type | |
773 | with automatic conversion is usually simpler. The same applies to the ASN1 | |
774 | encoded types. The following prefixes are known: | |
775 | .BR ipv4 , | |
776 | .BR ipv6 , | |
777 | .BR rfc822 , | |
778 | .BR email , | |
779 | .BR userfqdn , | |
780 | .BR fqdn , | |
781 | .BR dns , | |
782 | .BR asn1dn , | |
783 | .B asn1gn | |
784 | and | |
785 | .BR keyid . | |
786 | Custom type prefixes may be specified by surrounding the numerical type value by | |
787 | curly brackets. | |
788 | ||
b7a500e9 TB |
789 | For IKEv2 and |
790 | .B rightid | |
791 | the prefix | |
792 | .B % | |
793 | in front of the identity prevents the daemon from sending IDr in its IKE_AUTH | |
794 | request and will allow it to verify the configured identity against the subject | |
795 | and subjectAltNames contained in the responder's certificate (otherwise it is | |
796 | only compared with the IDr returned by the responder). The IDr sent by the | |
797 | initiator might otherwise prevent the responder from finding a config if it | |
798 | has configured a different value for | |
799 | .BR leftid . | |
c2bc2b27 | 800 | .TP |
6bcf6016 | 801 | .BR leftid2 " = <id>" |
a44bb934 MW |
802 | identity to use for a second authentication for the left participant |
803 | (IKEv2 only); defaults to | |
804 | .BR leftid . | |
805 | .TP | |
6bcf6016 | 806 | .BR leftikeport " = <port>" |
75e3d90d MW |
807 | UDP port the left participant uses for IKE communication. |
808 | If unspecified, port 500 is used with the port floating | |
f115838b | 809 | to 4500 if a NAT is detected or MOBIKE is enabled. Specifying a local IKE port |
667b7372 | 810 | different from the default additionally requires a socket implementation that |
72970b45 | 811 | listens on this port. |
667b7372 | 812 | .TP |
6bcf6016 | 813 | .BR leftprotoport " = <protocol>/<port>" |
24df0678 MW |
814 | restrict the traffic selector to a single protocol and/or port. This option |
815 | is now deprecated, protocol/port information can be defined for each subnet | |
816 | directly in | |
817 | .BR leftsubnet . | |
7900ab1b | 818 | .TP |
87692be2 TB |
819 | .BR leftsigkey " = <raw public key> | <path to public key>" |
820 | the left participant's public key for public key signature authentication, | |
821 | in PKCS#1 format using hex (0x prefix) or base64 (0s prefix) encoding. With the | |
822 | optional | |
fa1d3d39 TB |
823 | .B dns: |
824 | or | |
825 | .B ssh: | |
826 | prefix in front of 0x or 0s, the public key is expected to be in either | |
87692be2 TB |
827 | the RFC 3110 (not the full RR, only RSA key part) or RFC 4253 public key format, |
828 | respectively. | |
b906d412 TB |
829 | Also accepted is the path to a file containing the public key in PEM, DER or SSH |
830 | encoding. Both absolute paths or paths relative to \fI/etc/ipsec.d/certs\fP | |
831 | are accepted. | |
66e12b92 | 832 | .TP |
6bcf6016 | 833 | .BR leftsendcert " = never | no | " ifasked " | always | yes" |
c2bc2b27 AS |
834 | Accepted values are |
835 | .B never | |
836 | or | |
837 | .BR no , | |
838 | .B always | |
839 | or | |
840 | .BR yes , | |
841 | and | |
a5477a6f | 842 | .BR ifasked " (the default)," |
f115838b TB |
843 | the latter meaning that the peer must send a certificate request payload in |
844 | order to get a certificate in return. | |
fea5e716 | 845 | .TP |
26bc6958 MW |
846 | .BR leftsourceip " = %config4 | %config6 | <ip address>" |
847 | Comma separated list of internal source IPs to use in a tunnel, also known as | |
848 | virtual IP. If the value is one of the synonyms | |
7900ab1b | 849 | .BR %config , |
f115838b | 850 | .BR %cfg , |
a5477a6f TB |
851 | .BR %modeconfig , |
852 | or | |
853 | .BR %modecfg , | |
72970b45 TB |
854 | an address (from the tunnel address family) is requested from the peer. With |
855 | .B %config4 | |
856 | and | |
857 | .B %config6 | |
858 | an address of the given address family will be requested explicitly. | |
859 | If an IP address is configured, it will be requested from the responder, | |
860 | which is free to respond with a different address. | |
8e79d8d3 | 861 | .TP |
c355e2b2 | 862 | .BR rightsourceip " = %config | <network>/<netmask> | <from>-<to> | %poolname" |
26bc6958 MW |
863 | Comma separated list of internal source IPs to use in a tunnel for the remote |
864 | peer. If the value is | |
8e79d8d3 | 865 | .B %config |
f115838b TB |
866 | on the responder side, the initiator must propose an address which is then |
867 | echoed back. Also supported are address pools expressed as | |
b0103105 | 868 | \fInetwork\fB/\fInetmask\fR |
c355e2b2 TB |
869 | and |
870 | \fIfrom\fB-\fIto\fR | |
f115838b TB |
871 | or the use of an external IP address pool using %\fIpoolname\fR, |
872 | where \fIpoolname\fR is the name of the IP address pool used for the lookup. | |
fea5e716 | 873 | .TP |
b7b5432f | 874 | .BR leftsubnet " = <ip subnet>[[<proto/port>]][,...]" |
c2bc2b27 | 875 | private subnet behind the left participant, expressed as |
f115838b | 876 | \fInetwork\fB/\fInetmask\fR; |
c2bc2b27 AS |
877 | if omitted, essentially assumed to be \fIleft\fB/32\fR, |
878 | signifying that the left end of the connection goes to the left participant | |
66e12b92 | 879 | only. Configured subnets of the peers may differ, the protocol narrows it to |
75e3d90d MW |
880 | the greatest common subnet. In IKEv1, this may lead to problems with other |
881 | implementations, make sure to configure identical subnets in such | |
55f126fd MW |
882 | configurations. IKEv2 supports multiple subnets separated by commas. IKEv1 only |
883 | interprets the first subnet of such a definition, unless the Cisco Unity | |
884 | extension plugin is enabled. | |
24df0678 | 885 | |
b7b5432f TB |
886 | The optional part after each subnet enclosed in square brackets specifies a |
887 | protocol/port to restrict the selector for that subnet. | |
24df0678 | 888 | |
b7b5432f TB |
889 | Examples: |
890 | .BR leftsubnet=10.0.0.1[tcp/http],10.0.0.2[6/80] " or" | |
891 | .BR leftsubnet=fec1::1[udp],10.0.0.0/16[/53] . | |
24df0678 MW |
892 | Instead of omitting either value |
893 | .B %any | |
894 | can be used to the same effect, e.g. | |
b7b5432f | 895 | .BR leftsubnet=fec1::1[udp/%any],10.0.0.0/16[%any/53] . |
24df0678 | 896 | |
69560611 TB |
897 | If the protocol is |
898 | .B icmp | |
899 | or | |
900 | .B ipv6-icmp | |
901 | the port is interpreted as ICMP message type if it is less than 256 or as type | |
902 | and code if it is greater or equal to 256, with the type in the most significant | |
903 | 8 bits and the code in the least significant 8 bits. | |
904 | ||
24df0678 MW |
905 | The port value can alternatively take the value |
906 | .B %opaque | |
907 | for RFC 4301 OPAQUE selectors, or a numerical range in the form | |
908 | .BR 1024-65535 . | |
909 | None of the kernel backends currently supports opaque or port ranges and uses | |
910 | .B %any | |
911 | for policy installation instead. | |
912 | ||
913 | Instead of specifying a subnet, | |
914 | .B %dynamic | |
915 | can be used to replace it with the IKE address, having the same effect | |
916 | as omitting | |
917 | .B leftsubnet | |
918 | completely. Using | |
919 | .B %dynamic | |
920 | can be used to define multiple dynamic selectors, each having a potentially | |
0ceb2888 | 921 | different protocol/port definition. |
24df0678 | 922 | |
c2bc2b27 | 923 | .TP |
6bcf6016 | 924 | .BR leftupdown " = <path>" |
c2bc2b27 AS |
925 | what ``updown'' script to run to adjust routing and/or firewalling |
926 | when the status of the connection | |
927 | changes (default | |
928 | .BR "ipsec _updown" ). | |
929 | May include positional parameters separated by white space | |
930 | (although this requires enclosing the whole string in quotes); | |
931 | including shell metacharacters is unwise. | |
75e3d90d | 932 | Relevant only locally, other end need not agree on it. Charon uses the updown |
f115838b | 933 | script to insert firewall rules only, since routing has been implemented |
75e3d90d | 934 | directly into the daemon. |
c2bc2b27 | 935 | .TP |
6bcf6016 | 936 | .BR lifebytes " = <number>" |
75e3d90d | 937 | the number of bytes transmitted over an IPsec SA before it expires. |
deddfde9 | 938 | .TP |
6bcf6016 | 939 | .BR lifepackets " = <number>" |
75e3d90d | 940 | the number of packets transmitted over an IPsec SA before it expires. |
deddfde9 | 941 | .TP |
6bcf6016 | 942 | .BR lifetime " = " 1h " | <time>" |
deddfde9 TB |
943 | how long a particular instance of a connection |
944 | (a set of encryption/authentication keys for user packets) should last, | |
945 | from successful negotiation to expiry; | |
946 | acceptable values are an integer optionally followed by | |
947 | .BR s | |
948 | (a time in seconds) | |
949 | or a decimal number followed by | |
950 | .BR m , | |
951 | .BR h , | |
952 | or | |
953 | .B d | |
954 | (a time | |
955 | in minutes, hours, or days respectively) | |
956 | (default | |
957 | .BR 1h , | |
958 | maximum | |
959 | .BR 24h ). | |
960 | Normally, the connection is renegotiated (via the keying channel) | |
961 | before it expires (see | |
962 | .BR margintime ). | |
963 | The two ends need not exactly agree on | |
964 | .BR lifetime , | |
965 | although if they do not, | |
966 | there will be some clutter of superseded connections on the end | |
9f8ceffb | 967 | which thinks the lifetime is longer. Also see EXPIRY/REKEY below. |
deddfde9 | 968 | .TP |
6bcf6016 | 969 | .BR marginbytes " = <number>" |
deddfde9 TB |
970 | how many bytes before IPsec SA expiry (see |
971 | .BR lifebytes ) | |
75e3d90d | 972 | should attempts to negotiate a replacement begin. |
deddfde9 | 973 | .TP |
6bcf6016 | 974 | .BR marginpackets " = <number>" |
deddfde9 TB |
975 | how many packets before IPsec SA expiry (see |
976 | .BR lifepackets ) | |
75e3d90d | 977 | should attempts to negotiate a replacement begin. |
deddfde9 | 978 | .TP |
6bcf6016 | 979 | .BR margintime " = " 9m " | <time>" |
deddfde9 TB |
980 | how long before connection expiry or keying-channel expiry |
981 | should attempts to | |
982 | negotiate a replacement | |
983 | begin; acceptable values as for | |
984 | .B lifetime | |
985 | (default | |
986 | .BR 9m ). | |
9f8ceffb TB |
987 | Relevant only locally, other end need not agree on it. Also see EXPIRY/REKEY |
988 | below. | |
d5f29da3 | 989 | .TP |
6bcf6016 TB |
990 | .BR mark " = <value>[/<mask>]" |
991 | sets an XFRM mark in the inbound and outbound | |
3255e489 | 992 | IPsec SAs and policies. If the mask is missing then a default |
d5f29da3 AS |
993 | mask of |
994 | .B 0xffffffff | |
cc1682be MW |
995 | is assumed. The special value |
996 | .B %unique | |
997 | assigns a unique value to each newly created IPsec SA. | |
d5f29da3 | 998 | .TP |
6bcf6016 TB |
999 | .BR mark_in " = <value>[/<mask>]" |
1000 | sets an XFRM mark in the inbound IPsec SA and | |
a674c79a | 1001 | policy. If the mask is missing then a default mask of |
d5f29da3 AS |
1002 | .B 0xffffffff |
1003 | is assumed. | |
1004 | .TP | |
6bcf6016 TB |
1005 | .BR mark_out " = <value>[/<mask>]" |
1006 | sets an XFRM mark in the outbound IPsec SA and | |
a674c79a | 1007 | policy. If the mask is missing then a default mask of |
d5f29da3 AS |
1008 | .B 0xffffffff |
1009 | is assumed. | |
deddfde9 | 1010 | .TP |
6bcf6016 | 1011 | .BR mobike " = " yes " | no" |
8c4339bd AS |
1012 | enables the IKEv2 MOBIKE protocol defined by RFC 4555. Accepted values are |
1013 | .B yes | |
1014 | (the default) and | |
1015 | .BR no . | |
1016 | If set to | |
1017 | .BR no , | |
75e3d90d | 1018 | the charon daemon will not actively propose MOBIKE as initiator and |
78279973 | 1019 | ignore the MOBIKE_SUPPORTED notify as responder. |
8c4339bd | 1020 | .TP |
6bcf6016 | 1021 | .BR modeconfig " = push | " pull |
7900ab1b AS |
1022 | defines which mode is used to assign a virtual IP. |
1023 | Accepted values are | |
1024 | .B push | |
1025 | and | |
1026 | .B pull | |
1027 | (the default). | |
16149401 | 1028 | Push mode is currently not supported with IKEv2. |
fea5e716 | 1029 | .TP |
6bcf6016 | 1030 | .BR reauth " = " yes " | no" |
c2bc2b27 AS |
1031 | whether rekeying of an IKE_SA should also reauthenticate the peer. In IKEv1, |
1032 | reauthentication is always done. In IKEv2, a value of | |
1033 | .B no | |
1034 | rekeys without uninstalling the IPsec SAs, a value of | |
1035 | .B yes | |
1036 | (the default) creates a new IKE_SA from scratch and tries to recreate | |
1037 | all IPsec SAs. | |
1038 | .TP | |
6bcf6016 | 1039 | .BR rekey " = " yes " | no" |
fea5e716 MW |
1040 | whether a connection should be renegotiated when it is about to expire; |
1041 | acceptable values are | |
1042 | .B yes | |
1043 | (the default) | |
1044 | and | |
1045 | .BR no . | |
7900ab1b | 1046 | The two ends need not agree, but while a value of |
fea5e716 | 1047 | .B no |
75e3d90d | 1048 | prevents charon from requesting renegotiation, |
fea5e716 MW |
1049 | it does not prevent responding to renegotiation requested from the other end, |
1050 | so | |
1051 | .B no | |
66e12b92 TB |
1052 | will be largely ineffective unless both ends agree on it. Also see |
1053 | .BR reauth . | |
fea5e716 | 1054 | .TP |
6bcf6016 | 1055 | .BR rekeyfuzz " = " 100% " | <percentage>" |
fea5e716 | 1056 | maximum percentage by which |
deddfde9 TB |
1057 | .BR marginbytes , |
1058 | .B marginpackets | |
1059 | and | |
1060 | .B margintime | |
fea5e716 MW |
1061 | should be randomly increased to randomize rekeying intervals |
1062 | (important for hosts with many connections); | |
1063 | acceptable values are an integer, | |
1064 | which may exceed 100, | |
1065 | followed by a `%' | |
deddfde9 | 1066 | (defaults to |
fea5e716 MW |
1067 | .BR 100% ). |
1068 | The value of | |
deddfde9 | 1069 | .BR marginTYPE , |
fea5e716 MW |
1070 | after this random increase, |
1071 | must not exceed | |
deddfde9 TB |
1072 | .B lifeTYPE |
1073 | (where TYPE is one of | |
1074 | .IR bytes , | |
1075 | .I packets | |
1076 | or | |
1077 | .IR time ). | |
fea5e716 MW |
1078 | The value |
1079 | .B 0% | |
deddfde9 | 1080 | will suppress randomization. |
9f8ceffb TB |
1081 | Relevant only locally, other end need not agree on it. Also see EXPIRY/REKEY |
1082 | below. | |
fea5e716 MW |
1083 | .TP |
1084 | .B rekeymargin | |
deddfde9 TB |
1085 | synonym for |
1086 | .BR margintime . | |
532f2347 | 1087 | .TP |
8b123d2e TB |
1088 | .BR replay_window " = " \-1 " | <number>" |
1089 | The IPsec replay window size for this connection. With the default of \-1 | |
1090 | the value configured with | |
1091 | .I charon.replay_window | |
1092 | in | |
1093 | .BR strongswan.conf (5) | |
1094 | is used. Larger values than 32 are supported using the Netlink backend only, | |
1095 | a value of 0 disables IPsec replay protection. | |
1096 | .TP | |
6bcf6016 | 1097 | .BR reqid " = <number>" |
b5be105a | 1098 | sets the reqid for a given connection to a pre-configured fixed value. |
a729d17a | 1099 | .TP |
6c302616 MW |
1100 | .BR tfc " = <value>" |
1101 | number of bytes to pad ESP payload data to. Traffic Flow Confidentiality | |
1102 | is currently supported in IKEv2 and applies to outgoing packets only. The | |
1103 | special value | |
1104 | .BR %mtu | |
1105 | fills up ESP packets with padding to have the size of the MTU. | |
1106 | .TP | |
6bcf6016 | 1107 | .BR type " = " tunnel " | transport | transport_proxy | passthrough | drop" |
c2bc2b27 AS |
1108 | the type of the connection; currently the accepted values |
1109 | are | |
1110 | .B tunnel | |
1111 | (the default) | |
1112 | signifying a host-to-host, host-to-subnet, or subnet-to-subnet tunnel; | |
1113 | .BR transport , | |
1114 | signifying host-to-host transport mode; | |
84bec926 AS |
1115 | .BR transport_proxy , |
1116 | signifying the special Mobile IPv6 transport proxy mode; | |
c2bc2b27 AS |
1117 | .BR passthrough , |
1118 | signifying that no IPsec processing should be done at all; | |
1119 | .BR drop , | |
75e3d90d | 1120 | signifying that packets should be discarded. |
fea5e716 | 1121 | .TP |
6bcf6016 | 1122 | .BR xauth " = " client " | server" |
b768d6a4 | 1123 | specifies the role in the XAuth protocol if activated by |
c2bc2b27 AS |
1124 | .B authby=xauthpsk |
1125 | or | |
1126 | .B authby=xauthrsasig. | |
1127 | Accepted values are | |
1128 | .B server | |
1129 | and | |
1130 | .B client | |
1131 | (the default). | |
b768d6a4 TB |
1132 | .TP |
1133 | .BR xauth_identity " = <id>" | |
1134 | defines the identity/username the client uses to reply to an XAuth request. | |
1135 | If not defined, the IKEv1 identity will be used as XAuth identity. | |
d5cc1758 | 1136 | |
e74bc8e5 | 1137 | .SS "CONN PARAMETERS: IKEv2 MEDIATION EXTENSION" |
8015c91c | 1138 | The following parameters are relevant to IKEv2 Mediation Extension |
e74bc8e5 | 1139 | operation only. |
6bcf6016 TB |
1140 | .TP |
1141 | .BR mediation " = yes | " no | |
e74bc8e5 | 1142 | whether this connection is a mediation connection, ie. whether this |
d5cc1758 TB |
1143 | connection is used to mediate other connections. Mediation connections |
1144 | create no child SA. Acceptable values are | |
1145 | .B no | |
1146 | (the default) and | |
1147 | .BR yes . | |
1148 | .TP | |
6bcf6016 | 1149 | .BR mediated_by " = <name>" |
d5cc1758 TB |
1150 | the name of the connection to mediate this connection through. If given, |
1151 | the connection will be mediated through the named mediation connection. | |
1152 | The mediation connection must set | |
e74bc8e5 | 1153 | .BR mediation=yes . |
d5cc1758 | 1154 | .TP |
6bcf6016 | 1155 | .BR me_peerid " = <id>" |
d5cc1758 TB |
1156 | ID as which the peer is known to the mediation server, ie. which the other |
1157 | end of this connection uses as its | |
1158 | .B leftid | |
1159 | on its connection to the mediation server. This is the ID we request the | |
1160 | mediation server to mediate us with. If | |
e74bc8e5 | 1161 | .B me_peerid |
d5cc1758 TB |
1162 | is not given, the |
1163 | .B rightid | |
1164 | of this connection will be used as peer ID. | |
1165 | ||
fea5e716 | 1166 | .SH "CA SECTIONS" |
bf3c3715 TB |
1167 | These are optional sections that can be used to assign special |
1168 | parameters to a Certification Authority (CA). Because the daemons | |
1169 | automatically import CA certificates from \fI/etc/ipsec.d/cacerts\fP, | |
1170 | there is no need to explicitly add them with a CA section, unless you | |
1171 | want to assign special parameters (like a CRL) to a CA. | |
6bcf6016 | 1172 | .TP |
a5477a6f TB |
1173 | .BR also " = <name>" |
1174 | includes ca section | |
1175 | .BR <name> . | |
1176 | .TP | |
6bcf6016 | 1177 | .BR auto " = " ignore " | add" |
fea5e716 MW |
1178 | currently can have either the value |
1179 | .B ignore | |
6bcf6016 TB |
1180 | (the default) or |
1181 | .BR add . | |
fea5e716 | 1182 | .TP |
6bcf6016 | 1183 | .BR cacert " = <path>" |
8015c91c | 1184 | defines a path to the CA certificate either relative to |
fea5e716 | 1185 | \fI/etc/ipsec.d/cacerts\fP or as an absolute path. |
f6d8fb36 MW |
1186 | .br |
1187 | A value in the form | |
1188 | .B %smartcard[<slot nr>[@<module>]]:<keyid> | |
1189 | defines a specific CA certificate to load from a PKCS#11 backend for this CA. | |
1190 | See ipsec.secrets(5) for details about smartcard definitions. | |
fea5e716 | 1191 | .TP |
6bcf6016 | 1192 | .BR crluri " = <uri>" |
fea5e716 MW |
1193 | defines a CRL distribution point (ldap, http, or file URI) |
1194 | .TP | |
7900ab1b AS |
1195 | .B crluri1 |
1196 | synonym for | |
1197 | .B crluri. | |
1198 | .TP | |
6bcf6016 | 1199 | .BR crluri2 " = <uri>" |
fea5e716 MW |
1200 | defines an alternative CRL distribution point (ldap, http, or file URI) |
1201 | .TP | |
fea5e716 | 1202 | .TP |
6bcf6016 | 1203 | .BR ocspuri " = <uri>" |
fea5e716 | 1204 | defines an OCSP URI. |
7900ab1b AS |
1205 | .TP |
1206 | .B ocspuri1 | |
1207 | synonym for | |
1208 | .B ocspuri. | |
1209 | .TP | |
6bcf6016 | 1210 | .BR ocspuri2 " = <uri>" |
75e3d90d | 1211 | defines an alternative OCSP URI. |
f115838b | 1212 | .TP |
6bcf6016 | 1213 | .BR certuribase " = <uri>" |
6439267a | 1214 | defines the base URI for the Hash and URL feature supported by IKEv2. |
72970b45 | 1215 | Instead of exchanging complete certificates, IKEv2 allows one to send an URI |
6439267a TB |
1216 | that resolves to the DER encoded certificate. The certificate URIs are built |
1217 | by appending the SHA1 hash of the DER encoded certificates to this base URI. | |
fea5e716 MW |
1218 | .SH "CONFIG SECTIONS" |
1219 | At present, the only | |
1220 | .B config | |
1221 | section known to the IPsec software is the one named | |
1222 | .BR setup , | |
f115838b | 1223 | which contains information used when the software is being started. |
fea5e716 MW |
1224 | The currently-accepted |
1225 | .I parameter | |
1226 | names in a | |
1227 | .B config | |
1228 | .B setup | |
75e3d90d | 1229 | section are: |
fea5e716 | 1230 | .TP |
72970b45 TB |
1231 | .BR cachecrls " = yes | " no |
1232 | if enabled, certificate revocation lists (CRLs) fetched via HTTP or LDAP will | |
1233 | be cached in | |
1234 | .I /etc/ipsec.d/crls/ | |
1235 | under a unique file name derived from the certification authority's public key. | |
1236 | .TP | |
1237 | .BR charondebug " = <debug list>" | |
1238 | how much charon debugging output should be logged. | |
1239 | A comma separated list containing type/level-pairs may | |
1240 | be specified, e.g: | |
1241 | .B dmn 3, ike 1, net -1. | |
1242 | Acceptable values for types are | |
1243 | .B dmn, mgr, ike, chd, job, cfg, knl, net, asn, enc, lib, esp, tls, | |
1244 | .B tnc, imc, imv, pts | |
1245 | and the level is one of | |
1246 | .B -1, 0, 1, 2, 3, 4 | |
1247 | (for silent, audit, control, controlmore, raw, private). By default, the level | |
1248 | is set to | |
1249 | .B 1 | |
1250 | for all types. For more flexibility see LOGGER CONFIGURATION in | |
1251 | .IR strongswan.conf (5). | |
1252 | .TP | |
6bcf6016 TB |
1253 | .BR strictcrlpolicy " = yes | ifuri | " no |
1254 | defines if a fresh CRL must be available in order for the peer authentication | |
1255 | based on RSA signatures to succeed. | |
e0e7ef07 AS |
1256 | IKEv2 additionally recognizes |
1257 | .B ifuri | |
1258 | which reverts to | |
1259 | .B yes | |
1260 | if at least one CRL URI is defined and to | |
1261 | .B no | |
1262 | if no URI is known. | |
b360e393 | 1263 | .TP |
f4cc7ea1 | 1264 | .BR uniqueids " = " yes " | no | never | replace | keep" |
b360e393 | 1265 | whether a particular participant ID should be kept unique, |
f4cc7ea1 | 1266 | with any new IKE_SA using an ID deemed to replace all old ones using that ID; |
b360e393 | 1267 | acceptable values are |
72970b45 TB |
1268 | .B yes |
1269 | (the default), | |
f4cc7ea1 | 1270 | .B no |
b360e393 | 1271 | and |
f4cc7ea1 TB |
1272 | .BR never . |
1273 | Participant IDs normally \fIare\fR unique, so a new IKE_SA using the same ID is | |
1274 | almost invariably intended to replace an old one. The difference between | |
1275 | .B no | |
1276 | and | |
1277 | .B never | |
72970b45 TB |
1278 | is that the daemon will replace old IKE_SAs when receiving an INITIAL_CONTACT |
1279 | notify if the option is | |
f4cc7ea1 TB |
1280 | .B no |
1281 | but will ignore these notifies if | |
1282 | .B never | |
1283 | is configured. | |
75e3d90d | 1284 | The daemon also accepts the value |
b360e393 | 1285 | .B replace |
f3bb1bd0 | 1286 | which is identical to |
b360e393 MW |
1287 | .B yes |
1288 | and the value | |
1289 | .B keep | |
1290 | to reject new IKE_SA setups and keep the duplicate established earlier. | |
a5477a6f | 1291 | |
75e3d90d | 1292 | .SH SA EXPIRY/REKEY |
9f8ceffb TB |
1293 | The IKE SAs and IPsec SAs negotiated by the daemon can be configured to expire |
1294 | after a specific amount of time. For IPsec SAs this can also happen after a | |
1295 | specified number of transmitted packets or transmitted bytes. The following | |
1296 | settings can be used to configure this: | |
1297 | .TS | |
1298 | l r l r,- - - -,lB s lB s,a r a r. | |
1299 | Setting Default Setting Default | |
1300 | IKE SA IPsec SA | |
1301 | ikelifetime 3h lifebytes - | |
1302 | lifepackets - | |
1303 | lifetime 1h | |
1304 | .TE | |
1305 | .SS Rekeying | |
1306 | IKE SAs as well as IPsec SAs can be rekeyed before they expire. This can be | |
1307 | configured using the following settings: | |
1308 | .TS | |
1309 | l r l r,- - - -,lB s lB s,a r a r. | |
1310 | Setting Default Setting Default | |
1311 | IKE and IPsec SA IPsec SA | |
1312 | margintime 9m marginbytes - | |
1313 | marginpackets - | |
1314 | .TE | |
1315 | .SS Randomization | |
1316 | To avoid collisions the specified margins are increased randomly before | |
1317 | subtracting them from the expiration limits (see formula below). This is | |
1318 | controlled by the | |
1319 | .B rekeyfuzz | |
1320 | setting: | |
1321 | .TS | |
1322 | l r,- -,lB s,a r. | |
1323 | Setting Default | |
1324 | IKE and IPsec SA | |
1325 | rekeyfuzz 100% | |
1326 | .TE | |
1327 | .PP | |
1328 | Randomization can be disabled by setting | |
1329 | .BR rekeyfuzz " to " 0% . | |
1330 | .SS Formula | |
1331 | The following formula is used to calculate the rekey time of IPsec SAs: | |
1332 | .PP | |
1333 | .EX | |
1334 | rekeytime = lifetime - (margintime + random(0, margintime * rekeyfuzz)) | |
1335 | .EE | |
1336 | .PP | |
1337 | It applies equally to IKE SAs and byte and packet limits for IPsec SAs. | |
1338 | .SS Example | |
1339 | Let's consider the default configuration: | |
1340 | .PP | |
1341 | .EX | |
1342 | lifetime = 1h | |
1343 | margintime = 9m | |
1344 | rekeyfuzz = 100% | |
1345 | .EE | |
1346 | .PP | |
1347 | From the formula above follows that the rekey time lies between: | |
1348 | .PP | |
1349 | .EX | |
1350 | rekeytime_min = 1h - (9m + 9m) = 42m | |
1351 | rekeytime_max = 1h - (9m + 0m) = 51m | |
1352 | .EE | |
1353 | .PP | |
1354 | Thus, the daemon will attempt to rekey the IPsec SA at a random time | |
1355 | between 42 and 51 minutes after establishing the SA. Or, in other words, | |
1356 | between 9 and 18 minutes before the SA expires. | |
1357 | .SS Notes | |
1358 | .IP \[bu] | |
1359 | Since the rekeying of an SA needs some time, the margin values must not be | |
1360 | too low. | |
1361 | .IP \[bu] | |
1362 | The value | |
1363 | .B margin... + margin... * rekeyfuzz | |
1364 | must not exceed the original limit. For example, specifying | |
1365 | .B margintime = 30m | |
1366 | in the default configuration is a bad idea as there is a chance that the rekey | |
1367 | time equals zero and, thus, rekeying gets disabled. | |
fea5e716 MW |
1368 | .SH FILES |
1369 | .nf | |
1370 | /etc/ipsec.conf | |
7900ab1b AS |
1371 | /etc/ipsec.d/aacerts |
1372 | /etc/ipsec.d/acerts | |
fea5e716 MW |
1373 | /etc/ipsec.d/cacerts |
1374 | /etc/ipsec.d/certs | |
1375 | /etc/ipsec.d/crls | |
fea5e716 MW |
1376 | |
1377 | .SH SEE ALSO | |
75e3d90d | 1378 | strongswan.conf(5), ipsec.secrets(5), ipsec(8) |
fea5e716 | 1379 | .SH HISTORY |
f115838b TB |
1380 | Originally written for the FreeS/WAN project by Henry Spencer. |
1381 | Updated and extended for the strongSwan project <http://www.strongswan.org> by | |
1382 | Tobias Brunner, Andreas Steffen and Martin Willi. |