]> git.ipfire.org Git - thirdparty/strongswan.git/blob - man/strongswan.conf.5.in
847d9d5206b1f0f0b6ad6705c275895991263e4d
[thirdparty/strongswan.git] / man / strongswan.conf.5.in
1 .TH STRONGSWAN.CONF 5 "2013-07-22" "@IPSEC_VERSION@" "strongSwan"
2 .SH NAME
3 strongswan.conf \- strongSwan configuration file
4 .SH DESCRIPTION
5 While the
6 .IR ipsec.conf (5)
7 configuration file is well suited to define IPsec related configuration
8 parameters, it is not useful for other strongSwan applications to read options
9 from this file.
10 The file is hard to parse and only
11 .I ipsec starter
12 is capable of doing so. As the number of components of the strongSwan project
13 is continually growing, a more flexible configuration file was needed, one that
14 is easy to extend and can be used by all components. With strongSwan 4.2.1
15 .IR strongswan.conf (5)
16 was introduced which meets these requirements.
17
18 .SH SYNTAX
19 The format of the strongswan.conf file consists of hierarchical
20 .B sections
21 and a list of
22 .B key/value pairs
23 in each section. Each section has a name, followed by C-Style curly brackets
24 defining the section body. Each section body contains a set of subsections
25 and key/value pairs:
26 .PP
27 .EX
28 settings := (section|keyvalue)*
29 section := name { settings }
30 keyvalue := key = value\\n
31 .EE
32 .PP
33 Values must be terminated by a newline.
34 .PP
35 Comments are possible using the \fB#\fP-character, but be careful: The parser
36 implementation is currently limited and does not like brackets in comments.
37 .PP
38 Section names and keys may contain any printable character except:
39 .PP
40 .EX
41 . { } # \\n \\t space
42 .EE
43 .PP
44 An example file in this format might look like this:
45 .PP
46 .EX
47 a = b
48 section-one {
49 somevalue = asdf
50 subsection {
51 othervalue = xxx
52 }
53 # yei, a comment
54 yetanother = zz
55 }
56 section-two {
57 x = 12
58 }
59 .EE
60 .PP
61 Indentation is optional, you may use tabs or spaces.
62
63 .SH INCLUDING FILES
64 Using the
65 .B include
66 statement it is possible to include other files into strongswan.conf, e.g.
67 .PP
68 .EX
69 include /some/path/*.conf
70 .EE
71 .PP
72 If the file name is not an absolute path, it is considered to be relative
73 to the directory of the file containing the include statement. The file name
74 may include shell wildcards (see
75 .IR sh (1)).
76 Also, such inclusions can be nested.
77 .PP
78 Sections loaded from included files
79 .I extend
80 previously loaded sections; already existing values are
81 .IR replaced .
82 It is important to note that settings are added relative to the section the
83 include statement is in.
84 .PP
85 As an example, the following three files result in the same final
86 config as the one given above:
87 .PP
88 .EX
89 a = b
90 section-one {
91 somevalue = before include
92 include include.conf
93 }
94 include other.conf
95
96 include.conf:
97 # settings loaded from this file are added to section-one
98 # the following replaces the previous value
99 somevalue = asdf
100 subsection {
101 othervalue = yyy
102 }
103 yetanother = zz
104
105 other.conf:
106 # this extends section-one and subsection
107 section-one {
108 subsection {
109 # this replaces the previous value
110 othervalue = xxx
111 }
112 }
113 section-two {
114 x = 12
115 }
116 .EE
117
118 .SH READING VALUES
119 Values are accessed using a dot-separated section list and a key.
120 With reference to the example above, accessing
121 .B section-one.subsection.othervalue
122 will return
123 .BR xxx .
124
125 .SH DEFINED KEYS
126 The following keys are currently defined (using dot notation). The default
127 value (if any) is listed in brackets after the key.
128
129 .SS attest section
130 .TP
131 .BR attest.database
132 Path to database with file measurement information
133 .TP
134 .BR attest.load
135 Plugins to load in ipsec attest tool
136
137 .SS charon section
138 .TP
139 .BR Note :
140 Many of these options also apply to \fBcharon\-cmd\fR and other
141 \fBcharon\fR derivatives. Just use their respective name (e.g.
142 \fIcharon\-cmd\fR) instead of \fIcharon\fR.
143 .TP
144 .BR charon.block_threshold " [5]"
145 Maximum number of half-open IKE_SAs for a single peer IP
146 .TP
147 .BR charon.cisco_unity " [no]
148 Send Cisco Unity vendor ID payload (IKEv1 only)
149 .TP
150 .BR charon.close_ike_on_child_failure " [no]"
151 Close the IKE_SA if setup of the CHILD_SA along with IKE_AUTH failed
152 .TP
153 .BR charon.cookie_threshold " [10]"
154 Number of half-open IKE_SAs that activate the cookie mechanism
155 .TP
156 .BR charon.dns1
157 .TQ
158 .BR charon.dns2
159 DNS servers assigned to peer via configuration payload (CP)
160 .TP
161 .BR charon.dos_protection " [yes]"
162 Enable Denial of Service protection using cookies and aggressiveness checks
163 .TP
164 .BR charon.filelog
165 Section to define file loggers, see LOGGER CONFIGURATION
166 .TP
167 .BR charon.flush_auth_cfg " [no]"
168 If enabled objects used during authentication (certificates, identities etc.)
169 are released to free memory once an IKE_SA is established.
170 Enabling this might conflict with plugins that later need access to e.g. the
171 used certificates.
172 .TP
173 .BR charon.fragment_size " [512]"
174 Maximum size (in bytes) of a sent fragment when using the proprietary IKEv1
175 fragmentation extension.
176 .TP
177 .BR charon.group
178 Name of the group the daemon changes to after startup
179 .TP
180 .BR charon.half_open_timeout " [30]"
181 Timeout in seconds for connecting IKE_SAs (also see IKE_SA_INIT DROPPING).
182 .TP
183 .BR charon.hash_and_url " [no]"
184 Enable hash and URL support
185 .TP
186 .BR charon.i_dont_care_about_security_and_use_aggressive_mode_psk " [no]"
187 If enabled responders are allowed to use IKEv1 Aggressive Mode with pre-shared
188 keys, which is discouraged due to security concerns (offline attacks on the
189 openly transmitted hash of the PSK)
190 .TP
191 .BR charon.ignore_routing_tables
192 A space-separated list of routing tables to be excluded from route lookups
193 .TP
194 .BR charon.ikesa_limit " [0]"
195 Maximum number of IKE_SAs that can be established at the same time before new
196 connection attempts are blocked
197 .TP
198 .BR charon.ikesa_table_segments " [1]"
199 Number of exclusively locked segments in the hash table
200 .TP
201 .BR charon.ikesa_table_size " [1]"
202 Size of the IKE_SA hash table
203 .TP
204 .BR charon.inactivity_close_ike " [no]"
205 Whether to close IKE_SA if the only CHILD_SA closed due to inactivity
206 .TP
207 .BR charon.init_limit_half_open " [0]"
208 Limit new connections based on the current number of half open IKE_SAs (see
209 IKE_SA_INIT DROPPING).
210 .TP
211 .BR charon.init_limit_job_load " [0]"
212 Limit new connections based on the number of jobs currently queued for
213 processing (see IKE_SA_INIT DROPPING).
214 .TP
215 .BR charon.initiator_only " [no]"
216 Causes charon daemon to ignore IKE initiation requests.
217 .TP
218 .BR charon.install_routes " [yes]"
219 Install routes into a separate routing table for established IPsec tunnels
220 .TP
221 .BR charon.install_virtual_ip " [yes]"
222 Install virtual IP addresses
223 .TP
224 .BR charon.install_virtual_ip_on
225 The name of the interface on which virtual IP addresses should be installed.
226 If not specified the addresses will be installed on the outbound interface.
227 .TP
228 .BR charon.interfaces_ignore
229 A comma-separated list of network interfaces that should be ignored, if
230 .B charon.interfaces_use
231 is specified this option has no effect.
232 .TP
233 .BR charon.interfaces_use
234 A comma-separated list of network interfaces that should be used by charon.
235 All other interfaces are ignored.
236 .TP
237 .BR charon.keep_alive " [20s]"
238 NAT keep alive interval
239 .TP
240 .BR charon.load
241 Plugins to load in the IKEv2 daemon charon
242 .TP
243 .BR charon.max_packet " [10000]"
244 Maximum packet size accepted by charon
245 .TP
246 .BR charon.multiple_authentication " [yes]"
247 Enable multiple authentication exchanges (RFC 4739)
248 .TP
249 .BR charon.nbns1
250 .TQ
251 .BR charon.nbns2
252 WINS servers assigned to peer via configuration payload (CP)
253 .TP
254 .BR charon.port " [500]"
255 UDP port used locally. If set to 0 a random port will be allocated.
256 .TP
257 .BR charon.port_nat_t " [4500]"
258 UDP port used locally in case of NAT-T. If set to 0 a random port will be
259 allocated. Has to be different from
260 .BR charon.port ,
261 otherwise a random port will be allocated.
262 .TP
263 .BR charon.process_route " [yes]"
264 Process RTM_NEWROUTE and RTM_DELROUTE events
265 .TP
266 .BR charon.receive_delay " [0]"
267 Delay in ms for receiving packets, to simulate larger RTT
268 .TP
269 .BR charon.receive_delay_response " [yes]"
270 Delay response messages
271 .TP
272 .BR charon.receive_delay_request " [yes]"
273 Delay request messages
274 .TP
275 .BR charon.receive_delay_type " [0]"
276 Specific IKEv2 message type to delay, 0 for any
277 .TP
278 .BR charon.replay_window " [32]"
279 Size of the AH/ESP replay window, in packets.
280 .TP
281 .BR charon.retransmit_base " [1.8]"
282 Base to use for calculating exponential back off, see IKEv2 RETRANSMISSION
283 .TP
284 .BR charon.retransmit_timeout " [4.0]
285 Timeout in seconds before sending first retransmit
286 .TP
287 .BR charon.retransmit_tries " [5]"
288 Number of times to retransmit a packet before giving up
289 .TP
290 .BR charon.retry_initiate_interval " [0]"
291 Interval to use when retrying to initiate an IKE_SA (e.g. if DNS resolution
292 failed), 0 to disable retries.
293 .TP
294 .BR charon.reuse_ikesa " [yes]
295 Initiate CHILD_SA within existing IKE_SAs
296 .TP
297 .BR charon.routing_table
298 Numerical routing table to install routes to
299 .TP
300 .BR charon.routing_table_prio
301 Priority of the routing table
302 .TP
303 .BR charon.send_delay " [0]"
304 Delay in ms for sending packets, to simulate larger RTT
305 .TP
306 .BR charon.send_delay_response " [yes]"
307 Delay response messages
308 .TP
309 .BR charon.send_delay_request " [yes]"
310 Delay request messages
311 .TP
312 .BR charon.send_delay_type " [0]"
313 Specific IKEv2 message type to delay, 0 for any
314 .TP
315 .BR charon.send_vendor_id " [no]
316 Send strongSwan vendor ID payload
317 .TP
318 .BR charon.syslog
319 Section to define syslog loggers, see LOGGER CONFIGURATION
320 .TP
321 .BR charon.threads " [16]"
322 Number of worker threads in charon
323 .TP
324 .BR charon.user
325 Name of the user the daemon changes to after startup
326 .SS charon.plugins subsection
327 .TP
328 .BR charon.plugins.android_log.loglevel " [1]"
329 Loglevel for logging to Android specific logger
330 .TP
331 .BR charon.plugins.attr
332 Section to specify arbitrary attributes that are assigned to a peer via
333 configuration payload (CP)
334 .TP
335 .BR charon.plugins.certexpire.csv.cron
336 Cron style string specifying CSV export times
337 .TP
338 .BR charon.plugins.certexpire.csv.empty_string
339 String to use in empty intermediate CA fields
340 .TP
341 .BR charon.plugins.certexpire.csv.fixed_fields " [yes]"
342 Use a fixed intermediate CA field count
343 .TP
344 .BR charon.plugins.certexpire.csv.force " [yes]"
345 Force export of all trustchains we have a private key for
346 .TP
347 .BR charon.plugins.certexpire.csv.format " [%d:%m:%Y]"
348 strftime(3) format string to export expiration dates as
349 .TP
350 .BR charon.plugins.certexpire.csv.local
351 strftime(3) format string for the CSV file name to export local certificates to
352 .TP
353 .BR charon.plugins.certexpire.csv.remote
354 strftime(3) format string for the CSV file name to export remote certificates to
355 .TP
356 .BR charon.plugins.certexpire.csv.separator " [,]"
357 CSV field separator
358 .TP
359 .BR charon.plugins.coupling.file
360 File to store coupling list to
361 .TP
362 .BR charon.plugins.coupling.hash " [sha1]"
363 Hashing algorithm to fingerprint coupled certificates
364 .TP
365 .BR charon.plugins.coupling.max " [1]"
366 Maximum number of coupling entries to create
367 .TP
368 .BR charon.plugins.dhcp.force_server_address " [no]"
369 Always use the configured server address. This might be helpful if the DHCP
370 server runs on the same host as strongSwan, and the DHCP daemon does not listen
371 on the loopback interface. In that case the server cannot be reached via
372 unicast (or even 255.255.255.255) as that would be routed via loopback.
373 Setting this option to yes and configuring the local broadcast address (e.g.
374 192.168.0.255) as server address might work.
375 .TP
376 .BR charon.plugins.dhcp.identity_lease " [no]"
377 Derive user-defined MAC address from hash of IKEv2 identity
378 .TP
379 .BR charon.plugins.dhcp.server " [255.255.255.255]"
380 DHCP server unicast or broadcast IP address
381 .TP
382 .BR charon.plugins.duplicheck.enable " [yes]"
383 Enable duplicheck plugin (if loaded)
384 .TP
385 .BR charon.plugins.duplicheck.socket " [unix://${piddir}/charon.dck]"
386 Socket provided by the duplicheck plugin
387 .TP
388 .BR charon.plugins.eap-aka.request_identity " [yes]"
389
390 .TP
391 .BR charon.plugins.eap-aka-3ggp2.seq_check
392
393 .TP
394 .BR charon.plugins.eap-dynamic.preferred
395 The preferred EAP method(s) to be used. If it is not given the first
396 registered method will be used initially. If a comma separated list is given
397 the methods are tried in the given order before trying the rest of the
398 registered methods.
399 .TP
400 .BR charon.plugins.eap-dynamic.prefer_user " [no]"
401 If enabled the EAP methods proposed in an EAP-Nak message sent by the peer are
402 preferred over the methods registered locally.
403 .TP
404 .BR charon.plugins.eap-gtc.backend " [pam]"
405 XAuth backend to be used for credential verification
406 .TP
407 .BR charon.plugins.eap-peap.fragment_size " [1024]"
408 Maximum size of an EAP-PEAP packet
409 .TP
410 .BR charon.plugins.eap-peap.max_message_count " [32]"
411 Maximum number of processed EAP-PEAP packets (0 = no limit)
412 .TP
413 .BR charon.plugins.eap-peap.include_length " [no]"
414 Include length in non-fragmented EAP-PEAP packets
415 .TP
416 .BR charon.plugins.eap-peap.phase2_method " [mschapv2]"
417 Phase2 EAP client authentication method
418 .TP
419 .BR charon.plugins.eap-peap.phase2_piggyback " [no]"
420 Phase2 EAP Identity request piggybacked by server onto TLS Finished message
421 .TP
422 .BR charon.plugins.eap-peap.phase2_tnc " [no]"
423 Start phase2 EAP TNC protocol after successful client authentication
424 .TP
425 .BR charon.plugins.eap-peap.request_peer_auth " [no]"
426 Request peer authentication based on a client certificate
427 .TP
428 .BR charon.plugins.eap-radius.accounting " [no]"
429 Send RADIUS accounting information to RADIUS servers.
430 .TP
431 .BR charon.plugins.eap-radius.accounting_requires_vip " [no]"
432 If enabled, accounting is disabled unless an IKE_SA has at least one virtual IP
433 .TP
434 .BR charon.plugins.eap-radius.class_group " [no]"
435 Use the
436 .I class
437 attribute sent in the RADIUS-Accept message as group membership information that
438 is compared to the groups specified in the
439 .B rightgroups
440 option in
441 .B ipsec.conf (5).
442 .TP
443 .BR charon.plugins.eap-radius.close_all_on_timeout " [no]"
444 Closes all IKE_SAs if communication with the RADIUS server times out. If it is
445 not set only the current IKE_SA is closed.
446 .TP
447 .BR charon.plugins.eap-radius.dae.enable " [no]"
448 Enables support for the Dynamic Authorization Extension (RFC 5176)
449 .TP
450 .BR charon.plugins.eap-radius.dae.listen " [0.0.0.0]"
451 Address to listen for DAE messages from the RADIUS server
452 .TP
453 .BR charon.plugins.eap-radius.dae.port " [3799]"
454 Port to listen for DAE requests
455 .TP
456 .BR charon.plugins.eap-radius.dae.secret
457 Shared secret used to verify/sign DAE messages
458 .TP
459 .BR charon.plugins.eap-radius.eap_start " [no]"
460 Send EAP-Start instead of EAP-Identity to start RADIUS conversation
461 .TP
462 .BR charon.plugins.eap-radius.filter_id " [no]"
463 If the RADIUS
464 .I tunnel_type
465 attribute with value
466 .B ESP
467 is received, use the
468 .I filter_id
469 attribute sent in the RADIUS-Accept message as group membership information that
470 is compared to the groups specified in the
471 .B rightgroups
472 option in
473 .B ipsec.conf (5).
474 .TP
475 .BR charon.plugins.eap-radius.forward.ike_to_radius
476 RADIUS attributes to be forwarded from IKEv2 to RADIUS (can be defined by
477 name or attribute number, a colon can be used to specify vendor-specific
478 attributes, e.g. Reply-Message, or 11, or 36906:12).
479 .TP
480 .BR charon.plugins.eap-radius.forward.radius_to_ike
481 Same as
482 .B charon.plugins.eap-radius.forward.ike_to_radius
483 but from RADIUS to
484 IKEv2, a strongSwan specific private notify (40969) is used to transmit the
485 attributes.
486 .TP
487 .BR charon.plugins.eap-radius.id_prefix
488 Prefix to EAP-Identity, some AAA servers use a IMSI prefix to select the
489 EAP method
490 .TP
491 .BR charon.plugins.eap-radius.nas_identifier " [strongSwan]"
492 NAS-Identifier to include in RADIUS messages
493 .TP
494 .BR charon.plugins.eap-radius.port " [1812]"
495 Port of RADIUS server (authentication)
496 .TP
497 .BR charon.plugins.eap-radius.secret
498 Shared secret between RADIUS and NAS
499 .TP
500 .BR charon.plugins.eap-radius.server
501 IP/Hostname of RADIUS server
502 .TP
503 .BR charon.plugins.eap-radius.servers
504 Section to specify multiple RADIUS servers. The
505 .BR nas_identifier ,
506 .BR secret ,
507 .B sockets
508 and
509 .B port
510 (or
511 .BR auth_port )
512 options can be specified for each server. A server's IP/Hostname can be
513 configured using the
514 .B address
515 option. The
516 .BR acct_port " [1813]"
517 option can be used to specify the port used for RADIUS accounting.
518 For each RADIUS server a priority can be specified using the
519 .BR preference " [0]"
520 option.
521 .TP
522 .BR charon.plugins.eap-radius.sockets " [1]"
523 Number of sockets (ports) to use, increase for high load
524 .TP
525 .BR charon.plugins.eap-sim.request_identity " [yes]"
526
527 .TP
528 .BR charon.plugins.eap-simaka-sql.database
529
530 .TP
531 .BR charon.plugins.eap-simaka-sql.remove_used " [no]"
532
533 .TP
534 .BR charon.plugins.eap-tls.fragment_size " [1024]"
535 Maximum size of an EAP-TLS packet
536 .TP
537 .BR charon.plugins.eap-tls.max_message_count " [32]"
538 Maximum number of processed EAP-TLS packets (0 = no limit)
539 .TP
540 .BR charon.plugins.eap-tls.include_length " [yes]"
541 Include length in non-fragmented EAP-TLS packets
542 .TP
543 .BR charon.plugins.eap-tnc.max_message_count " [10]"
544 Maximum number of processed EAP-TNC packets (0 = no limit)
545 .TP
546 .BR charon.plugins.eap-tnc.protocol " [tnccs-1.1]"
547 IF-TNCCS protocol version to be used (tnccs-1.1, tnccs-2.0, tnccs-dynamic)
548 .TP
549 .BR charon.plugins.eap-ttls.fragment_size " [1024]"
550 Maximum size of an EAP-TTLS packet
551 .TP
552 .BR charon.plugins.eap-ttls.max_message_count " [32]"
553 Maximum number of processed EAP-TTLS packets (0 = no limit)
554 .TP
555 .BR charon.plugins.eap-ttls.include_length " [yes]"
556 Include length in non-fragmented EAP-TTLS packets
557 .TP
558 .BR charon.plugins.eap-ttls.phase2_method " [md5]"
559 Phase2 EAP client authentication method
560 .TP
561 .BR charon.plugins.eap-ttls.phase2_piggyback " [no]"
562 Phase2 EAP Identity request piggybacked by server onto TLS Finished message
563 .TP
564 .BR charon.plugins.eap-ttls.phase2_tnc " [no]"
565 Start phase2 EAP TNC protocol after successful client authentication
566 .TP
567 .BR charon.plugins.eap-ttls.request_peer_auth " [no]"
568 Request peer authentication based on a client certificate
569 .TP
570 .BR charon.plugins.error-notify.socket " [unix://${piddir}/charon.enfy]"
571 Socket provided by the error-notify plugin
572 .TP
573 .BR charon.plugins.ha.autobalance " [0]"
574 Interval in seconds to automatically balance handled segments between nodes.
575 Set to 0 to disable.
576 .TP
577 .BR charon.plugins.ha.fifo_interface " [yes]"
578
579 .TP
580 .BR charon.plugins.ha.heartbeat_delay " [1000]"
581
582 .TP
583 .BR charon.plugins.ha.heartbeat_timeout " [2100]"
584
585 .TP
586 .BR charon.plugins.ha.local
587
588 .TP
589 .BR charon.plugins.ha.monitor " [yes]"
590
591 .TP
592 .BR charon.plugins.ha.pools
593
594 .TP
595 .BR charon.plugins.ha.remote
596
597 .TP
598 .BR charon.plugins.ha.resync " [yes]"
599
600 .TP
601 .BR charon.plugins.ha.secret
602
603 .TP
604 .BR charon.plugins.ha.segment_count " [1]"
605
606 .TP
607 .BR charon.plugins.ipseckey.enable " [no]"
608 Enable the fetching of IPSECKEY RRs via DNS
609 .TP
610 .BR charon.plugins.led.activity_led
611
612 .TP
613 .BR charon.plugins.led.blink_time " [50]"
614
615 .TP
616 .BR charon.plugins.kernel-klips.ipsec_dev_count " [4]"
617 Number of ipsecN devices
618 .TP
619 .BR charon.plugins.kernel-klips.ipsec_dev_mtu " [0]"
620 Set MTU of ipsecN device
621 .TP
622 .BR charon.plugins.kernel-netlink.roam_events " [yes]"
623 Whether to trigger roam events when interfaces, addresses or routes change
624 .TP
625 .BR charon.plugins.kernel-pfroute.vip_wait " [1000]"
626 Time in ms to wait until virtual IP addresses appear/disappear before failing.
627 .TP
628 .BR charon.plugins.load-tester
629 Section to configure the load-tester plugin, see LOAD TESTS
630 .TP
631 .BR charon.plugins.lookip.socket " [unix://${piddir}/charon.lkp]"
632 Socket provided by the lookip plugin
633 .TP
634 .BR charon.plugins.radattr.dir
635 Directory where RADIUS attributes are stored in client-ID specific files.
636 .TP
637 .BR charon.plugins.radattr.message_id " [-1]"
638 Attributes are added to all IKE_AUTH messages by default (-1), or only to the
639 IKE_AUTH message with the given IKEv2 message ID.
640 .TP
641 .BR charon.plugins.resolve.file " [/etc/resolv.conf]"
642 File where to add DNS server entries
643 .TP
644 .BR charon.plugins.resolve.resolvconf.iface_prefix " [lo.inet.ipsec.]"
645 Prefix used for interface names sent to resolvconf(8). The nameserver address
646 is appended to this prefix to make it unique. The result has to be a valid
647 interface name according to the rules defined by resolvconf. Also, it should
648 have a high priority according to the order defined in interface-order(5).
649 .TP
650 .BR charon.plugins.socket-default.set_source " [yes]"
651 Set source address on outbound packets, if possible.
652 .TP
653 .BR charon.plugins.socket-default.use_ipv4 " [yes]"
654 Listen on IPv4, if possible.
655 .TP
656 .BR charon.plugins.socket-default.use_ipv6 " [yes]"
657 Listen on IPv6, if possible.
658 .TP
659 .BR charon.plugins.sql.database
660 Database URI for charons SQL plugin
661 .TP
662 .BR charon.plugins.sql.loglevel " [-1]"
663 Loglevel for logging to SQL database
664 .TP
665 .BR charon.plugins.stroke.ignore_missing_ca_basic_constraint " [no]"
666 Treat certificates in ipsec.d/cacerts and ipsec.conf ca sections as CA
667 certificates even if they don't contain a CA basic constraint.
668 .TP
669 .BR charon.plugins.stroke.max_concurrent " [4]"
670 Maximum number of stroke messages handled concurrently
671 .TP
672 .BR charon.plugins.stroke.socket " [unix://${piddir}/charon.ctl]"
673 Socket provided by the stroke plugin
674 .TP
675 .BR charon.plugins.stroke.timeout " [0]"
676 Timeout in ms for any stroke command. Use 0 to disable the timeout
677 .TP
678 .BR charon.plugins.systime-fix.interval " [0]"
679 Interval in seconds to check system time for validity. 0 disables the check
680 .TP
681 .BR charon.plugins.systime-fix.reauth " [no]"
682 Whether to use reauth or delete if an invalid cert lifetime is detected
683 .TP
684 .BR charon.plugins.systime-fix.threshold
685 Threshold date where system time is considered valid. Disabled if not specified
686 .TP
687 .BR charon.plugins.systime-fix.threshold_format " [%Y]"
688 strptime(3) format used to parse threshold option
689 .TP
690 .BR charon.plugins.tnccs-11.max_message_size " [45000]"
691 Maximum size of a PA-TNC message (XML & Base64 encoding)
692 .TP
693 .BR charon.plugins.tnccs-20.max_batch_size " [65522]"
694 Maximum size of a PB-TNC batch (upper limit via PT-EAP = 65529)
695 .TP
696 .BR charon.plugins.tnccs-20.max_message_size " [65490]"
697 Maximum size of a PA-TNC message (upper limit via PT-EAP = 65497)
698 .TP
699 .BR charon.plugins.tnc-ifmap.client_cert
700 Path to X.509 certificate file of IF-MAP client
701 .TP
702 .BR charon.plugins.tnc-ifmap.client_key
703 Path to private key file of IF-MAP client
704 .TP
705 .BR charon.plugins.tnc-ifmap.device_name
706 Unique name of strongSwan server as a PEP and/or PDP device
707 .TP
708 .BR charon.plugins.tnc-ifmap.renew_session_interval " [150]"
709 Interval in seconds between periodic IF-MAP RenewSession requests
710 .TP
711 .BR charon.plugins.tnc-ifmap.server_uri " [https://localhost:8444/imap]"
712 URI of the form [https://]servername[:port][/path]
713 .TP
714 .BR charon.plugins.tnc-ifmap.server_cert
715 Path to X.509 certificate file of IF-MAP server
716 .TP
717 .BR charon.plugins.tnc-ifmap.username_password
718 Credentials of IF-MAP client of the form username:password
719 .TP
720 .BR charon.plugins.tnc-imc.dlclose " [yes]"
721 Unload IMC after use
722 .TP
723 .BR charon.plugins.tnc-imc.preferred_language " [en]"
724 Preferred language for TNC recommendations
725 .TP
726 .BR charon.plugins.tnc-imv.dlclose " [yes]"
727 Unload IMV after use
728 .TP
729 .BR charon.plugins.tnc-pdp.method " [ttls]"
730 EAP tunnel method to be used
731 .TP
732 .BR charon.plugins.tnc-pdp.port " [1812]"
733 RADIUS server port the strongSwan PDP is listening on
734 .TP
735 .BR charon.plugins.tnc-pdp.secret
736 Shared RADIUS secret between strongSwan PDP and NAS
737 .TP
738 .BR charon.plugins.tnc-pdp.server
739 Name of the strongSwan PDP as contained in the AAA certificate
740 .TP
741 .BR charon.plugins.tnc-pdp.timeout
742 Timeout in seconds before closing incomplete connections
743 .TP
744 .BR charon.plugins.updown.dns_handler " [no]"
745 Whether the updown script should handle DNS serves assigned via IKEv1 Mode
746 Config or IKEv2 Config Payloads (if enabled they can't be handled by other
747 plugins, like resolve)
748 .TP
749 .BR charon.plugins.whitelist.enable " [yes]"
750 Enable loaded whitelist plugin
751 .TP
752 .BR charon.plugins.whitelist.socket " [unix://${piddir}/charon.wlst]"
753 Socket provided by the whitelist plugin
754 .TP
755 .BR charon.plugins.xauth-eap.backend " [radius]"
756 EAP plugin to be used as backend for XAuth credential verification
757 .TP
758 .BR charon.plugins.xauth-pam.pam_service " [login]"
759 PAM service to be used for authentication
760 .SS libstrongswan section
761 .TP
762 .BR libstrongswan.cert_cache " [yes]"
763 Whether relations in validated certificate chains should be cached in memory
764 .TP
765 .BR libstrongswan.crypto_test.bench " [no]"
766
767 .TP
768 .BR libstrongswan.crypto_test.bench_size " [1024]"
769
770 .TP
771 .BR libstrongswan.crypto_test.bench_time " [50]"
772
773 .TP
774 .BR libstrongswan.crypto_test.on_add " [no]"
775 Test crypto algorithms during registration
776 .TP
777 .BR libstrongswan.crypto_test.on_create " [no]"
778 Test crypto algorithms on each crypto primitive instantiation
779 .TP
780 .BR libstrongswan.crypto_test.required " [no]"
781 Strictly require at least one test vector to enable an algorithm
782 .TP
783 .BR libstrongswan.crypto_test.rng_true " [no]"
784 Whether to test RNG with TRUE quality; requires a lot of entropy
785 .TP
786 .BR libstrongswan.dh_exponent_ansi_x9_42 " [yes]"
787 Use ANSI X9.42 DH exponent size or optimum size matched to cryptographical
788 strength
789 .TP
790 .BR libstrongswan.ecp_x_coordinate_only " [yes]"
791 Compliance with the errata for RFC 4753
792 .TP
793 .BR libstrongswan.host_resolver.max_threads " [3]"
794 Maximum number of concurrent resolver threads (they are terminated if unused)
795 .TP
796 .BR libstrongswan.host_resolver.min_threads " [0]"
797 Minimum number of resolver threads to keep around
798 .TP
799 .BR libstrongswan.integrity_test " [no]"
800 Check daemon, libstrongswan and plugin integrity at startup
801 .TP
802 .BR libstrongswan.leak_detective.detailed " [yes]"
803 Includes source file names and line numbers in leak detective output
804 .TP
805 .BR libstrongswan.leak_detective.usage_threshold " [10240]"
806 Threshold in bytes for leaks to be reported (0 to report all)
807 .TP
808 .BR libstrongswan.leak_detective.usage_threshold_count " [0]"
809 Threshold in number of allocations for leaks to be reported (0 to report all)
810 .TP
811 .BR libstrongswan.processor.priority_threads
812 Subsection to configure the number of reserved threads per priority class
813 see JOB PRIORITY MANAGEMENT
814 .TP
815 .BR libstrongswan.x509.enforce_critical " [yes]"
816 Discard certificates with unsupported or unknown critical extensions
817 .SS libstrongswan.plugins subsection
818 .TP
819 .BR libstrongswan.plugins.attr-sql.database
820 Database URI for attr-sql plugin used by charon
821 .TP
822 .BR libstrongswan.plugins.attr-sql.lease_history " [yes]"
823 Enable logging of SQL IP pool leases
824 .TP
825 .BR libstrongswan.plugins.gcrypt.quick_random " [no]"
826 Use faster random numbers in gcrypt; for testing only, produces weak keys!
827 .TP
828 .BR libstrongswan.plugins.openssl.engine_id " [pkcs11]"
829 ENGINE ID to use in the OpenSSL plugin
830 .TP
831 .BR libstrongswan.plugins.openssl.fips_mode " [0]"
832 Set OpenSSL FIPS mode: disabled(0), enabled(1), Suite B enabled(2)
833 .TP
834 .BR libstrongswan.plugins.pkcs11.modules
835 List of available PKCS#11 modules
836 .TP
837 .BR libstrongswan.plugins.pkcs11.load_certs " [yes]"
838 Whether to load certificates from tokens
839 .TP
840 .BR libstrongswan.plugins.pkcs11.reload_certs " [no]"
841 Reload certificates from all tokens if charon receives a SIGHUP
842 .TP
843 .BR libstrongswan.plugins.pkcs11.use_dh " [no]"
844 Whether the PKCS#11 modules should be used for DH and ECDH (see use_ecc option)
845 .TP
846 .BR libstrongswan.plugins.pkcs11.use_ecc " [no]"
847 Whether the PKCS#11 modules should be used for ECDH and ECDSA public key
848 operations. ECDSA private keys can be used regardless of this option
849 .TP
850 .BR libstrongswan.plugins.pkcs11.use_hasher " [no]"
851 Whether the PKCS#11 modules should be used to hash data
852 .TP
853 .BR libstrongswan.plugins.pkcs11.use_pubkey " [no]"
854 Whether the PKCS#11 modules should be used for public key operations, even for
855 keys not stored on tokens
856 .TP
857 .BR libstrongswan.plugins.pkcs11.use_rng " [no]"
858 Whether the PKCS#11 modules should be used as RNG
859 .TP
860 .BR libstrongswan.plugins.random.random " [@DEV_RANDOM@]"
861 File to read random bytes from, instead of @DEV_RANDOM@
862 .TP
863 .BR libstrongswan.plugins.random.urandom " [@DEV_URANDOM@]"
864 File to read pseudo random bytes from, instead of @DEV_URANDOM@
865 .TP
866 .BR libstrongswan.plugins.unbound.resolv_conf " [/etc/resolv.conf]"
867 File to read DNS resolver configuration from
868 .TP
869 .BR libstrongswan.plugins.unbound.trust_anchors " [/etc/ipsec.d/dnssec.keys]"
870 File to read DNSSEC trust anchors from (usually root zone KSK)
871 .SS libtls section
872 .TP
873 .BR libtls.cipher
874 List of TLS encryption ciphers
875 .TP
876 .BR libtls.key_exchange
877 List of TLS key exchange methods
878 .TP
879 .BR libtls.mac
880 List of TLS MAC algorithms
881 .TP
882 .BR libtls.suites
883 List of TLS cipher suites
884 .SS libtnccs section
885 .TP
886 .BR libtnccs.tnc_config " [/etc/tnc_config]"
887 TNC IMC/IMV configuration directory
888 .SS libimcv section
889 .TP
890 .BR libimcv.assessment_result " [yes]"
891 Whether IMVs send a standard IETF Assessment Result attribute
892 .TP
893 .BR libimcv.database
894 Global IMV policy database URI
895 .TP
896 .BR libimcv.debug_level " [1]"
897 Debug level for a stand-alone libimcv library
898 .TP
899 .BR libimcv.load " [random nonce gmp pubkey x509]"
900 Plugins to load in IMC/IMVs
901 .TP
902 .BR libimcv.os_info.name
903 Manually set the name of the client OS (e.g. Ubuntu)
904 .TP
905 .BR libimcv.os_info.version
906 Manually set the version of the client OS (e.g. 12.04 i686)
907 .TP
908 .BR libimcv.policy_script " [ipsec _imv_policy]"
909 Script called for each TNC connection to generate IMV policies
910 .TP
911 .BR libimcv.stderr_quiet " [no]"
912 isable output to stderr with a stand-alone libimcv library
913 .PP
914 .SS libimcv plugins section
915 .TP
916 .BR libimcv.plugins.imc-attestation.aik_blob
917 AIK encrypted private key blob file
918 .TP
919 .BR libimcv.plugins.imc-attestation.aik_cert
920 AIK certificate file
921 .TP
922 .BR libimcv.plugins.imc-attestation.aik_key
923 AIK public key file
924 .TP
925 .BR libimcv.plugins.imv-attestation.nonce_len " [20]"
926 DH nonce length
927 .TP
928 .BR libimcv.plugins.imv-attestation.use_quote2 " [yes]"
929 Use Quote2 AIK signature instead of Quote signature
930 .TP
931 .BR libimcv.plugins.imv-attestation.cadir
932 Path to directory with AIK cacerts
933 .TP
934 .BR libimcv.plugins.imv-attestation.dh_group " [ecp256]"
935 Preferred Diffie-Hellman group
936 .TP
937 .BR libimcv.plugins.imv-attestation.hash_algorithm " [sha256]"
938 Preferred measurement hash algorithm
939 .TP
940 .BR libimcv.plugins.imv-attestation.min_nonce_len " [0]"
941 DH minimum nonce length
942 .TP
943 .BR libimcv.plugins.imv-attestation.remediation_uri
944 URI pointing to attestation remediation instructions
945 .TP
946 .BR libimcv.plugins.imc-os.push_info " [yes]"
947 Send operating system info without being prompted
948 .TP
949 .BR libimcv.plugins.imv-os.remediation_uri
950 URI pointing to operating system remediation instructions
951 .TP
952 .BR libimcv.plugins.imc-scanner.push_info " [yes]"
953 Send open listening ports without being prompted
954 .TP
955 .BR libimcv.plugins.imv-scanner.remediation_uri
956 URI pointing to scanner remediation instructions
957 .TP
958 .BR libimcv.plugins.imc-test.additional_ids " [0]"
959 Number of additional IMC IDs
960 .TP
961 .BR libimcv.plugins.imc-test.command " [none]"
962 Command to be sent to the Test IMV
963 .TP
964 .BR libimcv.plugins.imc-test.dummy_size " [0]"
965 Size of dummy attribute to be sent to the Test IMV (0 = disabled)
966 .TP
967 .BR libimcv.plugins.imv-test.remediation_uri
968 URI pointing to test remediation instructions
969 .TP
970 .BR libimcv.plugins.imc-test.retry " [no]"
971 Do a handshake retry
972 .TP
973 .BR libimcv.plugins.imc-test.retry_command
974 Command to be sent to the Test IMV in the handshake retry
975 .TP
976 .BR libimcv.plugins.imv-test.rounds " [0]"
977 Number of IMC-IMV retry rounds
978 .SS manager section
979 .TP
980 .BR manager.database
981 Credential database URI for manager
982 .TP
983 .BR manager.debug " [no]"
984 Enable debugging in manager
985 .TP
986 .BR manager.load
987 Plugins to load in manager
988 .TP
989 .BR manager.socket
990 FastCGI socket of manager, to run it statically
991 .TP
992 .BR manager.threads " [10]"
993 Threads to use for request handling
994 .TP
995 .BR manager.timeout " [15m]"
996 Session timeout for manager
997 .SS mediation client section
998 .TP
999 .BR medcli.database
1000 Mediation client database URI
1001 .TP
1002 .BR medcli.dpd " [5m]"
1003 DPD timeout to use in mediation client plugin
1004 .TP
1005 .BR medcli.rekey " [20m]"
1006 Rekeying time on mediation connections in mediation client plugin
1007 .SS mediation server section
1008 .TP
1009 .BR medsrv.database
1010 Mediation server database URI
1011 .TP
1012 .BR medsrv.debug " [no]"
1013 Debugging in mediation server web application
1014 .TP
1015 .BR medsrv.dpd " [5m]"
1016 DPD timeout to use in mediation server plugin
1017 .TP
1018 .BR medsrv.load
1019 Plugins to load in mediation server plugin
1020 .TP
1021 .BR medsrv.password_length " [6]"
1022 Minimum password length required for mediation server user accounts
1023 .TP
1024 .BR medsrv.rekey " [20m]"
1025 Rekeying time on mediation connections in mediation server plugin
1026 .TP
1027 .BR medsrv.socket
1028 Run Mediation server web application statically on socket
1029 .TP
1030 .BR medsrv.threads " [5]"
1031 Number of thread for mediation service web application
1032 .TP
1033 .BR medsrv.timeout " [15m]"
1034 Session timeout for mediation service
1035 .SS openac section
1036 .TP
1037 .BR openac.load
1038 Plugins to load in ipsec openac tool
1039 .SS pacman section
1040 .TP
1041 .BR pacman.database
1042 Database URI for the database that stores the package information
1043 .SS pki section
1044 .TP
1045 .BR pki.load
1046 Plugins to load in ipsec pki tool
1047 .SS pool section
1048 .TP
1049 .BR pool.load
1050 Plugins to load in ipsec pool tool
1051 .SS scepclient section
1052 .TP
1053 .BR scepclient.load
1054 Plugins to load in ipsec scepclient tool
1055 .SS starter section
1056 .TP
1057 .BR starter.load
1058 Plugins to load in starter
1059 .TP
1060 .BR starter.load_warning " [yes]"
1061 Disable charon plugin load option warning
1062
1063 .SH LOGGER CONFIGURATION
1064 The options described below provide a much more flexible way to configure
1065 loggers for the IKEv2 daemon charon than using the
1066 .B charondebug
1067 option in
1068 .BR ipsec.conf (5).
1069 .PP
1070 .B Please note
1071 that if any loggers are specified in strongswan.conf,
1072 .B charondebug
1073 does not have any effect.
1074 .PP
1075 There are currently two types of loggers defined:
1076 .TP
1077 .B File loggers
1078 Log directly to a file and are defined by specifying the full path to the
1079 file as subsection in the
1080 .B charon.filelog
1081 section. To log to the console the two special filenames
1082 .BR stdout " and " stderr
1083 can be used.
1084 .TP
1085 .B Syslog loggers
1086 Log into a syslog facility and are defined by specifying the facility to log to
1087 as the name of a subsection in the
1088 .B charon.syslog
1089 section. The following facilities are currently supported:
1090 .BR daemon " and " auth .
1091 .PP
1092 Multiple loggers can be defined for each type with different log verbosity for
1093 the different subsystems of the daemon.
1094 .SS Options
1095 .TP
1096 .BR charon.filelog.<filename>.default " [1]"
1097 .TQ
1098 .BR charon.syslog.<facility>.default
1099 Specifies the default loglevel to be used for subsystems for which no specific
1100 loglevel is defined.
1101 .TP
1102 .BR charon.filelog.<filename>.<subsystem> " [<default>]"
1103 .TQ
1104 .BR charon.syslog.<facility>.<subsystem>
1105 Specifies the loglevel for the given subsystem.
1106 .TP
1107 .BR charon.filelog.<filename>.append " [yes]"
1108 If this option is enabled log entries are appended to the existing file.
1109 .TP
1110 .BR charon.filelog.<filename>.flush_line " [no]"
1111 Enabling this option disables block buffering and enables line buffering.
1112 .TP
1113 .BR charon.filelog.<filename>.ike_name " [no]"
1114 .TQ
1115 .BR charon.syslog.<facility>.ike_name
1116 Prefix each log entry with the connection name and a unique numerical
1117 identifier for each IKE_SA.
1118 .TP
1119 .BR charon.filelog.<filename>.time_format
1120 Prefix each log entry with a timestamp. The option accepts a format string as
1121 passed to
1122 .BR strftime (3).
1123 .TP
1124 .BR charon.syslog.identifier
1125 Global identifier used for an
1126 .BR openlog (3)
1127 call, prepended to each log message by syslog. If not configured,
1128 .BR openlog (3)
1129 is not called, so the value will depend on system defaults (often the program
1130 name).
1131
1132 .SS Subsystems
1133 .TP
1134 .B dmn
1135 Main daemon setup/cleanup/signal handling
1136 .TP
1137 .B mgr
1138 IKE_SA manager, handling synchronization for IKE_SA access
1139 .TP
1140 .B ike
1141 IKE_SA
1142 .TP
1143 .B chd
1144 CHILD_SA
1145 .TP
1146 .B job
1147 Jobs queueing/processing and thread pool management
1148 .TP
1149 .B cfg
1150 Configuration management and plugins
1151 .TP
1152 .B knl
1153 IPsec/Networking kernel interface
1154 .TP
1155 .B net
1156 IKE network communication
1157 .TP
1158 .B asn
1159 Low-level encoding/decoding (ASN.1, X.509 etc.)
1160 .TP
1161 .B enc
1162 Packet encoding/decoding encryption/decryption operations
1163 .TP
1164 .B tls
1165 libtls library messages
1166 .TP
1167 .B esp
1168 libipsec library messages
1169 .TP
1170 .B lib
1171 libstrongwan library messages
1172 .TP
1173 .B tnc
1174 Trusted Network Connect
1175 .TP
1176 .B imc
1177 Integrity Measurement Collector
1178 .TP
1179 .B imv
1180 Integrity Measurement Verifier
1181 .TP
1182 .B pts
1183 Platform Trust Service
1184 .SS Loglevels
1185 .TP
1186 .B -1
1187 Absolutely silent
1188 .TP
1189 .B 0
1190 Very basic auditing logs, (e.g. SA up/SA down)
1191 .TP
1192 .B 1
1193 Generic control flow with errors, a good default to see whats going on
1194 .TP
1195 .B 2
1196 More detailed debugging control flow
1197 .TP
1198 .B 3
1199 Including RAW data dumps in Hex
1200 .TP
1201 .B 4
1202 Also include sensitive material in dumps, e.g. keys
1203 .SS Example
1204 .PP
1205 .EX
1206 charon {
1207 filelog {
1208 /var/log/charon.log {
1209 time_format = %b %e %T
1210 append = no
1211 default = 1
1212 }
1213 stderr {
1214 ike = 2
1215 knl = 3
1216 ike_name = yes
1217 }
1218 }
1219 syslog {
1220 # enable logging to LOG_DAEMON, use defaults
1221 daemon {
1222 }
1223 # minimalistic IKE auditing logging to LOG_AUTHPRIV
1224 auth {
1225 default = -1
1226 ike = 0
1227 }
1228 }
1229 }
1230 .EE
1231
1232 .SH JOB PRIORITY MANAGEMENT
1233 Some operations in the IKEv2 daemon charon are currently implemented
1234 synchronously and blocking. Two examples for such operations are communication
1235 with a RADIUS server via EAP-RADIUS, or fetching CRL/OCSP information during
1236 certificate chain verification. Under high load conditions, the thread pool may
1237 run out of available threads, and some more important jobs, such as liveness
1238 checking, may not get executed in time.
1239 .PP
1240 To prevent thread starvation in such situations job priorities were introduced.
1241 The job processor will reserve some threads for higher priority jobs, these
1242 threads are not available for lower priority, locking jobs.
1243 .SS Implementation
1244 Currently 4 priorities have been defined, and they are used in charon as
1245 follows:
1246 .TP
1247 .B CRITICAL
1248 Priority for long-running dispatcher jobs.
1249 .TP
1250 .B HIGH
1251 INFORMATIONAL exchanges, as used by liveness checking (DPD).
1252 .TP
1253 .B MEDIUM
1254 Everything not HIGH/LOW, including IKE_SA_INIT processing.
1255 .TP
1256 .B LOW
1257 IKE_AUTH message processing. RADIUS and CRL fetching block here
1258 .PP
1259 Although IKE_SA_INIT processing is computationally expensive, it is explicitly
1260 assigned to the MEDIUM class. This allows charon to do the DH exchange while
1261 other threads are blocked in IKE_AUTH. To prevent the daemon from accepting more
1262 IKE_SA_INIT requests than it can handle, use IKE_SA_INIT DROPPING.
1263 .PP
1264 The thread pool processes jobs strictly by priority, meaning it will consume all
1265 higher priority jobs before looking for ones with lower priority. Further, it
1266 reserves threads for certain priorities. A priority class having reserved
1267 .I n
1268 threads will always have
1269 .I n
1270 threads available for this class (either currently processing a job, or waiting
1271 for one).
1272 .SS Configuration
1273 To ensure that there are always enough threads available for higher priority
1274 tasks, threads must be reserved for each priority class.
1275 .TP
1276 .BR libstrongswan.processor.priority_threads.critical " [0]"
1277 Threads reserved for CRITICAL priority class jobs
1278 .TP
1279 .BR libstrongswan.processor.priority_threads.high " [0]"
1280 Threads reserved for HIGH priority class jobs
1281 .TP
1282 .BR libstrongswan.processor.priority_threads.medium " [0]"
1283 Threads reserved for MEDIUM priority class jobs
1284 .TP
1285 .BR libstrongswan.processor.priority_threads.low " [0]"
1286 Threads reserved for LOW priority class jobs
1287 .PP
1288 Let's consider the following configuration:
1289 .PP
1290 .EX
1291 libstrongswan {
1292 processor {
1293 priority_threads {
1294 high = 1
1295 medium = 4
1296 }
1297 }
1298 }
1299 .EE
1300 .PP
1301 With this configuration, one thread is reserved for HIGH priority tasks. As
1302 currently only liveness checking and stroke message processing is done with
1303 high priority, one or two threads should be sufficient.
1304 .PP
1305 The MEDIUM class mostly processes non-blocking jobs. Unless your setup is
1306 experiencing many blocks in locks while accessing shared resources, threads for
1307 one or two times the number of CPU cores is fine.
1308 .PP
1309 It is usually not required to reserve threads for CRITICAL jobs. Jobs in this
1310 class rarely return and do not release their thread to the pool.
1311 .PP
1312 The remaining threads are available for LOW priority jobs. Reserving threads
1313 does not make sense (until we have an even lower priority).
1314 .SS Monitoring
1315 To see what the threads are actually doing, invoke
1316 .IR "ipsec statusall" .
1317 Under high load, something like this will show up:
1318 .PP
1319 .EX
1320 worker threads: 2 or 32 idle, 5/1/2/22 working,
1321 job queue: 0/0/1/149, scheduled: 198
1322 .EE
1323 .PP
1324 From 32 worker threads,
1325 .IP 2
1326 are currently idle.
1327 .IP 5
1328 are running CRITICAL priority jobs (dispatching from sockets, etc.).
1329 .IP 1
1330 is currently handling a HIGH priority job. This is actually the thread currently
1331 providing this information via stroke.
1332 .IP 2
1333 are handling MEDIUM priority jobs, likely IKE_SA_INIT or CREATE_CHILD_SA
1334 messages.
1335 .IP 22
1336 are handling LOW priority jobs, probably waiting for an EAP-RADIUS response
1337 while processing IKE_AUTH messages.
1338 .PP
1339 The job queue load shows how many jobs are queued for each priority, ready for
1340 execution. The single MEDIUM priority job will get executed immediately, as
1341 we have two spare threads reserved for MEDIUM class jobs.
1342
1343 .SH IKE_SA_INIT DROPPING
1344 If a responder receives more connection requests per seconds than it can handle,
1345 it does not make sense to accept more IKE_SA_INIT messages. And if they are
1346 queued but can't get processed in time, an answer might be sent after the
1347 client has already given up and restarted its connection setup. This
1348 additionally increases the load on the responder.
1349 .PP
1350 To limit the responder load resulting from new connection attempts, the daemon
1351 can drop IKE_SA_INIT messages just after reception. There are two mechanisms to
1352 decide if this should happen, configured with the following options:
1353 .TP
1354 .BR charon.init_limit_half_open " [0]"
1355 Limit based on the number of half open IKE_SAs. Half open IKE_SAs are SAs in
1356 connecting state, but not yet established.
1357 .TP
1358 .BR charon.init_limit_job_load " [0]"
1359 Limit based on the number of jobs currently queued for processing (sum over all
1360 job priorities).
1361 .PP
1362 The second limit includes load from other jobs, such as rekeying. Choosing a
1363 good value is difficult and depends on the hardware and expected load.
1364 .PP
1365 The first limit is simpler to calculate, but includes the load from new
1366 connections only. If your responder is capable of negotiating 100 tunnels/s, you
1367 might set this limit to 1000. The daemon will then drop new connection attempts
1368 if generating a response would require more than 10 seconds. If you are
1369 allowing for a maximum response time of more than 30 seconds, consider adjusting
1370 the timeout for connecting IKE_SAs
1371 .RB ( charon.half_open_timeout ).
1372 A responder, by default, deletes an IKE_SA if the initiator does not establish
1373 it within 30 seconds. Under high load, a higher value might be required.
1374
1375 .SH LOAD TESTS
1376 To do stability testing and performance optimizations, the IKEv2 daemon charon
1377 provides the load-tester plugin. This plugin allows one to setup thousands of
1378 tunnels concurrently against the daemon itself or a remote host.
1379 .PP
1380 .B WARNING:
1381 Never enable the load-testing plugin on productive systems. It provides
1382 preconfigured credentials and allows an attacker to authenticate as any user.
1383 .SS Options
1384 .TP
1385 .BR charon.plugins.load-tester.addrs
1386 Subsection that contains key/value pairs with address pools (in CIDR notation)
1387 to use for a specific network interface e.g. eth0 = 10.10.0.0/16
1388 .TP
1389 .BR charon.plugins.load-tester.addrs_keep " [no]"
1390 Whether to keep dynamic addresses even after the associated SA got terminated
1391 .TP
1392 .BR charon.plugins.load-tester.addrs_prefix " [16]"
1393 Network prefix length to use when installing dynamic addresses. If set to -1 the
1394 full address is used (i.e. 32 or 128)
1395 .TP
1396 .BR charon.plugins.load-tester.ca_dir
1397 Directory to load (intermediate) CA certificates from
1398 .TP
1399 .BR charon.plugins.load-tester.child_rekey " [600]"
1400 Seconds to start CHILD_SA rekeying after setup
1401 .TP
1402 .BR charon.plugins.load-tester.delay " [0]"
1403 Delay between initiatons for each thread
1404 .TP
1405 .BR charon.plugins.load-tester.delete_after_established " [no]"
1406 Delete an IKE_SA as soon as it has been established
1407 .TP
1408 .BR charon.plugins.load-tester.digest " [sha1]"
1409 Digest algorithm used when issuing certificates
1410 .TP
1411 .BR charon.plugins.load-tester.dpd_delay " [0]"
1412 DPD delay to use in load test
1413 .TP
1414 .BR charon.plugins.load-tester.dynamic_port " [0]"
1415 Base port to be used for requests (each client uses a different port)
1416 .TP
1417 .BR charon.plugins.load-tester.eap_password " [default-pwd]"
1418 EAP secret to use in load test
1419 .TP
1420 .BR charon.plugins.load-tester.enable " [no]"
1421 Enable the load testing plugin
1422 .TP
1423 .BR charon.plugins.load-tester.esp " [aes128-sha1]"
1424 CHILD_SA proposal to use for load tests
1425 .TP
1426 .BR charon.plugins.load-tester.fake_kernel " [no]"
1427 Fake the kernel interface to allow load-testing against self
1428 .TP
1429 .BR charon.plugins.load-tester.ike_rekey " [0]"
1430 Seconds to start IKE_SA rekeying after setup
1431 .TP
1432 .BR charon.plugins.load-tester.init_limit " [0]"
1433 Global limit of concurrently established SAs during load test
1434 .TP
1435 .BR charon.plugins.load-tester.initiator " [0.0.0.0]"
1436 Address to initiate from
1437 .TP
1438 .BR charon.plugins.load-tester.initiators " [0]"
1439 Number of concurrent initiator threads to use in load test
1440 .TP
1441 .BR charon.plugins.load-tester.initiator_auth " [pubkey]"
1442 Authentication method(s) the intiator uses
1443 .TP
1444 .BR charon.plugins.load-tester.initiator_id
1445 Initiator ID used in load test
1446 .TP
1447 .BR charon.plugins.load-tester.initiator_match
1448 Initiator ID to match against as responder
1449 .TP
1450 .BR charon.plugins.load-tester.initiator_tsi
1451 Traffic selector on initiator side, as proposed by initiator
1452 .TP
1453 .BR charon.plugins.load-tester.initiator_tsr
1454 Traffic selector on responder side, as proposed by initiator
1455 .TP
1456 .BR charon.plugins.load-tester.iterations " [1]"
1457 Number of IKE_SAs to initiate by each initiator in load test
1458 .TP
1459 .BR charon.plugins.load-tester.issuer_cert
1460 Path to the issuer certificate (if not configured a hard-coded value is used)
1461 .TP
1462 .BR charon.plugins.load-tester.issuer_key
1463 Path to private key that is used to issue certificates (if not configured a
1464 hard-coded value is used)
1465 .TP
1466 .BR charon.plugins.load-tester.pool
1467 Provide INTERNAL_IPV4_ADDRs from a named pool
1468 .TP
1469 .BR charon.plugins.load-tester.preshared_key " [default-psk]"
1470 Preshared key to use in load test
1471 .TP
1472 .BR charon.plugins.load-tester.proposal " [aes128-sha1-modp768]"
1473 IKE proposal to use in load test
1474 .TP
1475 .BR charon.plugins.load-tester.responder " [127.0.0.1]"
1476 Address to initiation connections to
1477 .TP
1478 .BR charon.plugins.load-tester.responder_auth " [pubkey]"
1479 Authentication method(s) the responder uses
1480 .TP
1481 .BR charon.plugins.load-tester.responder_id
1482 Responder ID used in load test
1483 .TP
1484 .BR charon.plugins.load-tester.responder_tsi " [initiator_tsi]"
1485 Traffic selector on initiator side, as narrowed by responder
1486 .TP
1487 .BR charon.plugins.load-tester.responder_tsr " [initiator_tsr]"
1488 Traffic selector on responder side, as narrowed by responder
1489 .TP
1490 .BR charon.plugins.load-tester.request_virtual_ip " [no]"
1491 Request an INTERNAL_IPV4_ADDR from the server
1492 .TP
1493 .BR charon.plugins.load-tester.shutdown_when_complete " [no]"
1494 Shutdown the daemon after all IKE_SAs have been established
1495 .TP
1496 .BR charon.plugins.load-tester.socket " [unix://${piddir}/charon.ldt]"
1497 Socket provided by the load-tester plugin
1498 .TP
1499 .BR charon.plugins.load-tester.version " [0]"
1500 IKE version to use (0 means use IKEv2 as initiator and accept any version as
1501 responder)
1502 .PP
1503 .SS Configuration details
1504 For public key authentication, the responder uses the
1505 .B \(dqCN=srv, OU=load-test, O=strongSwan\(dq
1506 identity. For the initiator, each connection attempt uses a different identity
1507 in the form
1508 .BR "\(dqCN=c1-r1, OU=load-test, O=strongSwan\(dq" ,
1509 where the first number inidicates the client number, the second the
1510 authentication round (if multiple authentication is used).
1511 .PP
1512 For PSK authentication, FQDN identities are used. The server uses
1513 .BR srv.strongswan.org ,
1514 the client uses an identity in the form
1515 .BR c1-r1.strongswan.org .
1516 .PP
1517 For EAP authentication, the client uses a NAI in the form
1518 .BR 100000000010001@strongswan.org .
1519 .PP
1520 To configure multiple authentication, concatenate multiple methods using, e.g.
1521 .EX
1522 initiator_auth = pubkey|psk|eap-md5|eap-aka
1523 .EE
1524 .PP
1525 The responder uses a hardcoded certificate based on a 1024-bit RSA key.
1526 This certificate additionally serves as CA certificate. A peer uses the same
1527 private key, but generates client certificates on demand signed by the CA
1528 certificate. Install the Responder/CA certificate on the remote host to
1529 authenticate all clients.
1530 .PP
1531 To speed up testing, the load tester plugin implements a special Diffie-Hellman
1532 implementation called modpnull. By setting
1533 .EX
1534 proposal = aes128-sha1-modpnull
1535 .EE
1536 this wicked fast DH implementation is used. It does not provide any security
1537 at all, but allows one to run tests without DH calculation overhead.
1538 .SS Examples
1539 .PP
1540 In the simplest case, the daemon initiates IKE_SAs against itself using the
1541 loopback interface. This will actually establish double the number of IKE_SAs,
1542 as the daemon is initiator and responder for each IKE_SA at the same time.
1543 Installation of IPsec SAs would fails, as each SA gets installed twice. To
1544 simulate the correct behavior, a fake kernel interface can be enabled which does
1545 not install the IPsec SAs at the kernel level.
1546 .PP
1547 A simple loopback configuration might look like this:
1548 .PP
1549 .EX
1550 charon {
1551 # create new IKE_SAs for each CHILD_SA to simulate
1552 # different clients
1553 reuse_ikesa = no
1554 # turn off denial of service protection
1555 dos_protection = no
1556
1557 plugins {
1558 load-tester {
1559 # enable the plugin
1560 enable = yes
1561 # use 4 threads to initiate connections
1562 # simultaneously
1563 initiators = 4
1564 # each thread initiates 1000 connections
1565 iterations = 1000
1566 # delay each initiation in each thread by 20ms
1567 delay = 20
1568 # enable the fake kernel interface to
1569 # avoid SA conflicts
1570 fake_kernel = yes
1571 }
1572 }
1573 }
1574 .EE
1575 .PP
1576 This will initiate 4000 IKE_SAs within 20 seconds. You may increase the delay
1577 value if your box can not handle that much load, or decrease it to put more
1578 load on it. If the daemon starts retransmitting messages your box probably can
1579 not handle all connection attempts.
1580 .PP
1581 The plugin also allows one to test against a remote host. This might help to
1582 test against a real world configuration. A connection setup to do stress
1583 testing of a gateway might look like this:
1584 .PP
1585 .EX
1586 charon {
1587 reuse_ikesa = no
1588 threads = 32
1589
1590 plugins {
1591 load-tester {
1592 enable = yes
1593 # 10000 connections, ten in parallel
1594 initiators = 10
1595 iterations = 1000
1596 # use a delay of 100ms, overall time is:
1597 # iterations * delay = 100s
1598 delay = 100
1599 # address of the gateway
1600 remote = 1.2.3.4
1601 # IKE-proposal to use
1602 proposal = aes128-sha1-modp1024
1603 # use faster PSK authentication instead
1604 # of 1024bit RSA
1605 initiator_auth = psk
1606 responder_auth = psk
1607 # request a virtual IP using configuration
1608 # payloads
1609 request_virtual_ip = yes
1610 # enable CHILD_SA every 60s
1611 child_rekey = 60
1612 }
1613 }
1614 }
1615 .EE
1616
1617 .SH IKEv2 RETRANSMISSION
1618 Retransmission timeouts in the IKEv2 daemon charon can be configured globally
1619 using the three keys listed below:
1620 .PP
1621 .RS
1622 .nf
1623 .BR charon.retransmit_base " [1.8]"
1624 .BR charon.retransmit_timeout " [4.0]"
1625 .BR charon.retransmit_tries " [5]"
1626 .fi
1627 .RE
1628 .PP
1629 The following algorithm is used to calculate the timeout:
1630 .PP
1631 .EX
1632 relative timeout = retransmit_timeout * retransmit_base ^ (n-1)
1633 .EE
1634 .PP
1635 Where
1636 .I n
1637 is the current retransmission count.
1638 .PP
1639 Using the default values, packets are retransmitted in:
1640
1641 .TS
1642 l r r
1643 ---
1644 lB r r.
1645 Retransmission Relative Timeout Absolute Timeout
1646 1 4s 4s
1647 2 7s 11s
1648 3 13s 24s
1649 4 23s 47s
1650 5 42s 89s
1651 giving up 76s 165s
1652 .TE
1653
1654 .SH FILES
1655 /etc/strongswan.conf
1656
1657 .SH SEE ALSO
1658 \fBipsec.conf\fR(5), \fBipsec.secrets\fR(5), \fBipsec\fR(8), \fBcharon-cmd\fR(8)
1659
1660 .SH HISTORY
1661 Written for the
1662 .UR http://www.strongswan.org
1663 strongSwan project
1664 .UE
1665 by Tobias Brunner, Andreas Steffen and Martin Willi.