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