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