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