1 .TH STRONGSWAN.CONF 5 "2012-05-01" "@IPSEC_VERSION@" "strongSwan"
3 strongswan.conf \- strongSwan configuration file
7 configuration file is well suited to define IPsec related configuration
8 parameters, it is not useful for other strongSwan applications to read options
10 The file is hard to parse and only
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.
19 The format of the strongswan.conf file consists of hierarchical
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
28 settings := (section|keyvalue)*
29 section := name { settings }
30 keyvalue := key = value\\n
33 Values must be terminated by a newline.
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.
38 Section names and keys may contain any printable character except:
44 An example file in this format might look like this:
61 Indentation is optional, you may use tabs or spaces.
66 statement it is possible to include other files into strongswan.conf, e.g.
69 include /some/path/*.conf
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
76 Also, such inclusions can be nested.
78 Sections loaded from included files
80 previously loaded sections; already existing values are
82 It is important to note that settings are added relative to the section the
83 include statement is in.
85 As an example, the following three files result in the same final
86 config as the one given above:
91 somevalue = before include
97 # settings loaded from this file are added to section-one
98 # the following replaces the previous value
106 # this extends section-one and subsection
109 # this replaces the previous value
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
126 The following keys are currently defined (using dot notation). The default
127 value (if any) is listed in brackets after the key.
132 Path to database with file measurement information
135 Plugins to load in ipsec attest tool
138 .BR charon.block_threshold " [5]"
139 Maximum number of half-open IKE_SAs for a single peer IP
141 .BR charon.cisco_unity " [no]
142 Send Cisco Unity vendor ID payload (IKEv1 only)
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
147 .BR charon.cookie_threshold " [10]"
148 Number of half-open IKE_SAs that activate the cookie mechanism
153 DNS servers assigned to peer via configuration payload (CP)
155 .BR charon.dos_protection " [yes]"
156 Enable Denial of Service protection using cookies and aggressiveness checks
159 Section to define file loggers, see LOGGER CONFIGURATION
161 .BR charon.flush_auth_cfg " [no]"
164 .BR charon.half_open_timeout " [30]"
165 Timeout in seconds for connecting IKE_SAs (also see IKE_SA_INIT DROPPING).
167 .BR charon.hash_and_url " [no]"
168 Enable hash and URL support
170 .BR charon.i_dont_care_about_security_and_use_aggressive_mode_psk " [no]"
171 If enabled responders are allowed to use IKEv1 Aggressive Mode with pre-shared
172 keys, which is discouraged due to security concerns (offline attacks on the
173 openly transmitted hash of the PSK)
175 .BR charon.ignore_routing_tables
176 A list of routing tables to be excluded from route lookup
178 .BR charon.ikesa_table_segments " [1]"
179 Number of exclusively locked segments in the hash table
181 .BR charon.ikesa_table_size " [1]"
182 Size of the IKE_SA hash table
184 .BR charon.inactivity_close_ike " [no]"
185 Whether to close IKE_SA if the only CHILD_SA closed due to inactivity
187 .BR charon.init_limit_half_open " [0]"
188 Limit new connections based on the current number of half open IKE_SAs (see
189 IKE_SA_INIT DROPPING).
191 .BR charon.init_limit_job_load " [0]"
192 Limit new connections based on the number of jobs currently queued for
193 processing (see IKE_SA_INIT DROPPING).
195 .BR charon.install_routes " [yes]"
196 Install routes into a separate routing table for established IPsec tunnels
198 .BR charon.install_virtual_ip " [yes]"
199 Install virtual IP addresses
201 .BR charon.keep_alive " [20s]"
202 NAT keep alive interval
205 Plugins to load in the IKEv2 daemon charon
207 .BR charon.max_packet " [10000]"
208 Maximum packet size accepted by charon
210 .BR charon.multiple_authentication " [yes]"
211 Enable multiple authentication exchanges (RFC 4739)
216 WINS servers assigned to peer via configuration payload (CP)
218 .BR charon.port " [500]"
219 UDP port used locally. If set to 0 a random port will be allocated.
221 .BR charon.port_nat_t " [4500]"
222 UDP port used locally in case of NAT-T. If set to 0 a random port will be
223 allocated. Has to be different from
225 otherwise a random port will be allocated.
227 .BR charon.process_route " [yes]"
228 Process RTM_NEWROUTE and RTM_DELROUTE events
230 .BR charon.receive_delay " [0]"
231 Delay for receiving packets, to simulate larger RTT
233 .BR charon.receive_delay_response " [yes]"
234 Delay response messages
236 .BR charon.receive_delay_request " [yes]"
237 Delay request messages
239 .BR charon.receive_delay_type " [0]"
240 Specific IKEv2 message type to delay, 0 for any
242 .BR charon.replay_window " [32]"
243 Size of the AH/ESP replay window, in packets.
245 .BR charon.retransmit_base " [1.8]"
246 Base to use for calculating exponential back off, see IKEv2 RETRANSMISSION
248 .BR charon.retransmit_timeout " [4.0]
249 Timeout in seconds before sending first retransmit
251 .BR charon.retransmit_tries " [5]"
252 Number of times to retransmit a packet before giving up
254 .BR charon.retry_initiate_interval " [0]"
255 Interval to use when retrying to initiate an IKE_SA (e.g. if DNS resolution
256 failed), 0 to disable retries.
258 .BR charon.reuse_ikesa " [yes]
259 Initiate CHILD_SA within existing IKE_SAs
261 .BR charon.routing_table
262 Numerical routing table to install routes to
264 .BR charon.routing_table_prio
265 Priority of the routing table
267 .BR charon.send_delay " [0]"
268 Delay for sending packets, to simulate larger RTT
270 .BR charon.send_delay_response " [yes]"
271 Delay response messages
273 .BR charon.send_delay_request " [yes]"
274 Delay request messages
276 .BR charon.send_delay_type " [0]"
277 Specific IKEv2 message type to delay, 0 for any
279 .BR charon.send_vendor_id " [no]
280 Send strongSwan vendor ID payload
283 Section to define syslog loggers, see LOGGER CONFIGURATION
285 .BR charon.threads " [16]"
286 Number of worker threads in charon
287 .SS charon.plugins subsection
289 .BR charon.plugins.android_log.loglevel " [1]"
290 Loglevel for logging to Android specific logger
292 .BR charon.plugins.attr
293 Section to specify arbitrary attributes that are assigned to a peer via
294 configuration payload (CP)
296 .BR charon.plugins.certexpire.csv.cron
297 Cron style string specifying CSV export times
299 .BR charon.plugins.certexpire.csv.local
300 strftime(3) format string for the CSV file name to export local certificates to
302 .BR charon.plugins.certexpire.csv.remote
303 strftime(3) format string for the CSV file name to export remote certificates to
305 .BR charon.plugins.certexpire.csv.separator " [,]"
308 .BR charon.plugins.certexpire.csv.empty_string
309 String to use in empty intermediate CA fields
311 .BR charon.plugins.certexpire.csv.format " [%d:%m:%Y]"
312 strftime(3) format string to export expiration dates as
314 .BR charon.plugins.certexpire.csv.fixed_fields " [yes]"
315 Use a fixed intermediate CA field count
317 .BR charon.plugins.coupling.file
318 File to store coupling list to
320 .BR charon.plugins.coupling.hash " [sha1]"
321 Hashing algorithm to fingerprint coupled certificates
323 .BR charon.plugins.coupling.max " [1]"
324 Maximum number of coupling entries to create
326 .BR charon.plugins.dhcp.identity_lease " [no]"
327 Derive user-defined MAC address from hash of IKEv2 identity
329 .BR charon.plugins.dhcp.server " [255.255.255.255]"
330 DHCP server unicast or broadcast IP address
332 .BR charon.plugins.duplicheck.enable " [yes]"
333 Enable duplicheck plugin (if loaded)
335 .BR charon.plugins.eap-aka.request_identity " [yes]"
338 .BR charon.plugins.eap-aka-3ggp2.seq_check
341 .BR charon.plugins.eap-dynamic.preferred
342 The preferred EAP method(s) to be used. If it is not given the first
343 registered method will be used initially. If a comma separated list is given
344 the methods are tried in the given order before trying the rest of the
347 .BR charon.plugins.eap-dynamic.prefer_user " [no]"
348 If enabled the EAP methods proposed in an EAP-Nak message sent by the peer are
349 preferred over the methods registered locally.
351 .BR charon.plugins.eap-gtc.backend " [pam]"
352 XAuth backend to be used for credential verification
354 .BR charon.plugins.eap-peap.fragment_size " [1024]"
355 Maximum size of an EAP-PEAP packet
357 .BR charon.plugins.eap-peap.max_message_count " [32]"
358 Maximum number of processed EAP-PEAP packets (0 = no limit)
360 .BR charon.plugins.eap-peap.include_length " [no]"
361 Include length in non-fragmented EAP-PEAP packets
363 .BR charon.plugins.eap-peap.phase2_method " [mschapv2]"
364 Phase2 EAP client authentication method
366 .BR charon.plugins.eap-peap.phase2_piggyback " [no]"
367 Phase2 EAP Identity request piggybacked by server onto TLS Finished message
369 .BR charon.plugins.eap-peap.phase2_tnc " [no]"
370 Start phase2 EAP TNC protocol after successful client authentication
372 .BR charon.plugins.eap-peap.request_peer_auth " [no]"
373 Request peer authentication based on a client certificate
376 .BR charon.plugins.eap-radius.accounting " [no]"
377 Send RADIUS accounting information to RADIUS servers.
379 .BR charon.plugins.eap-radius.class_group " [no]"
382 attribute sent in the RADIUS-Accept message as group membership information that
383 is compared to the groups specified in the
388 .BR charon.plugins.eap-radius.dae.enable " [no]"
389 Enables support for the Dynamic Authorization Extension (RFC 5176)
391 .BR charon.plugins.eap-radius.dae.listen " [0.0.0.0]"
392 Address to listen for DAE messages from the RADIUS server
394 .BR charon.plugins.eap-radius.dae.port " [3799]"
395 Port to listen for DAE requests
397 .BR charon.plugins.eap-radius.dae.secret
398 Shared secret used to verify/sign DAE messages
400 .BR charon.plugins.eap-radius.eap_start " [no]"
401 Send EAP-Start instead of EAP-Identity to start RADIUS conversation
403 .BR charon.plugins.eap-radius.filter_id " [no]"
410 attribute sent in the RADIUS-Accept message as group membership information that
411 is compared to the groups specified in the
416 .BR charon.plugins.eap-radius.forward.ike_to_radius
417 RADIUS attributes to be forwarded from IKEv2 to RADIUS (can be defined by
418 name or attribute number, a colon can be used to specify vendor-specific
419 attributes, e.g. Reply-Message, or 11, or 36906:12).
421 .BR charon.plugins.eap-radius.forward.radius_to_ike
422 Same as charon.plugins.eap-radius.forward.ike_to_radius but from RADIUS to
423 IKEv2, a strongSwan specific private notify (40969) is used to transmit the
426 .BR charon.plugins.eap-radius.id_prefix
427 Prefix to EAP-Identity, some AAA servers use a IMSI prefix to select the
430 .BR charon.plugins.eap-radius.nas_identifier " [strongSwan]"
431 NAS-Identifier to include in RADIUS messages
433 .BR charon.plugins.eap-radius.port " [1812]"
434 Port of RADIUS server (authentication)
436 .BR charon.plugins.eap-radius.secret
437 Shared secret between RADIUS and NAS
439 .BR charon.plugins.eap-radius.server
440 IP/Hostname of RADIUS server
442 .BR charon.plugins.eap-radius.servers
443 Section to specify multiple RADIUS servers. The
449 options can be specified for each server. A server's IP/Hostname can be
452 option. For each RADIUS server a priority can be specified using the
453 .BR preference " [0]"
456 .BR charon.plugins.eap-radius.sockets " [1]"
457 Number of sockets (ports) to use, increase for high load
459 .BR charon.plugins.eap-sim.request_identity " [yes]"
462 .BR charon.plugins.eap-simaka-sql.database
465 .BR charon.plugins.eap-simaka-sql.remove_used " [no]"
468 .BR charon.plugins.eap-tls.fragment_size " [1024]"
469 Maximum size of an EAP-TLS packet
471 .BR charon.plugins.eap-tls.max_message_count " [32]"
472 Maximum number of processed EAP-TLS packets (0 = no limit)
474 .BR charon.plugins.eap-tls.include_length " [yes]"
475 Include length in non-fragmented EAP-TLS packets
477 .BR charon.plugins.eap-tnc.max_message_count " [10]"
478 Maximum number of processed EAP-TNC packets (0 = no limit)
480 .BR charon.plugins.eap-tnc.protocol " [tnccs-1.1]"
481 IF-TNCCS protocol version to be used (tnccs-1.1, tnccs-2.0, tnccs-dynamic)
483 .BR charon.plugins.eap-ttls.fragment_size " [1024]"
484 Maximum size of an EAP-TTLS packet
486 .BR charon.plugins.eap-ttls.max_message_count " [32]"
487 Maximum number of processed EAP-TTLS packets (0 = no limit)
489 .BR charon.plugins.eap-ttls.include_length " [yes]"
490 Include length in non-fragmented EAP-TTLS packets
492 .BR charon.plugins.eap-ttls.phase2_method " [md5]"
493 Phase2 EAP client authentication method
495 .BR charon.plugins.eap-ttls.phase2_piggyback " [no]"
496 Phase2 EAP Identity request piggybacked by server onto TLS Finished message
498 .BR charon.plugins.eap-ttls.phase2_tnc " [no]"
499 Start phase2 EAP TNC protocol after successful client authentication
501 .BR charon.plugins.eap-ttls.request_peer_auth " [no]"
502 Request peer authentication based on a client certificate
504 .BR charon.plugins.ha.fifo_interface " [yes]"
507 .BR charon.plugins.ha.heartbeat_delay " [1000]"
510 .BR charon.plugins.ha.heartbeat_timeout " [2100]"
513 .BR charon.plugins.ha.local
516 .BR charon.plugins.ha.monitor " [yes]"
519 .BR charon.plugins.ha.pools
522 .BR charon.plugins.ha.remote
525 .BR charon.plugins.ha.resync " [yes]"
528 .BR charon.plugins.ha.secret
531 .BR charon.plugins.ha.segment_count " [1]"
534 .BR charon.plugins.led.activity_led
537 .BR charon.plugins.led.blink_time " [50]"
540 .BR charon.plugins.kernel-klips.ipsec_dev_count " [4]"
541 Number of ipsecN devices
543 .BR charon.plugins.kernel-klips.ipsec_dev_mtu " [0]"
544 Set MTU of ipsecN device
546 .BR charon.plugins.load-tester
547 Section to configure the load-tester plugin, see LOAD TESTS
549 .BR charon.plugins.radattr.dir
550 Directory where RADIUS attributes are stored in client-ID specific files.
552 .BR charon.plugins.radattr.message_id " [-1]"
553 Attributes are added to all IKE_AUTH messages by default (-1), or only to the
554 IKE_AUTH message with the given IKEv2 message ID.
556 .BR charon.plugins.resolve.file " [/etc/resolv.conf]"
557 File where to add DNS server entries
559 .BR charon.plugins.resolve.resolvconf.iface_prefix " [lo.inet.ipsec.]"
560 Prefix used for interface names sent to resolvconf(8). The nameserver address
561 is appended to this prefix to make it unique. The result has to be a valid
562 interface name according to the rules defined by resolvconf. Also, it should
563 have a high priority according to the order defined in interface-order(5).
565 .BR charon.plugins.socket-default.set_source " [yes]"
566 Set source address on outbound packets, if possible.
568 .BR charon.plugins.sql.database
569 Database URI for charons SQL plugin
571 .BR charon.plugins.sql.loglevel " [-1]"
572 Loglevel for logging to SQL database
574 .BR charon.plugins.stroke.ignore_missing_ca_basic_constraint " [no]"
575 Treat certificates in ipsec.d/cacerts and ipsec.conf ca sections as CA
576 certificates even if they don't contain a CA basic constraint.
578 .BR charon.plugins.stroke.max_concurrent " [4]"
579 Maximum number of stroke messages handled concurrently
581 .BR charon.plugins.tnccs-11.max_message_size " [45000]"
582 Maximum size of a PA-TNC message (XML & Base64 encoding)
584 .BR charon.plugins.tnccs-20.max_batch_size " [65522]"
585 Maximum size of a PB-TNC batch (upper limit via PT-EAP = 65529)
587 .BR charon.plugins.tnccs-20.max_message_size " [65490]"
588 Maximum size of a PA-TNC message (upper limit via PT-EAP = 65497)
590 .BR charon.plugins.tnc-ifmap.device_name
591 Unique name of strongSwan as a PEP and/or PDP device
593 .BR charon.plugins.tnc-ifmap.key_file
594 Concatenated client certificate and private key
596 .BR charon.plugins.tnc-ifmap.password
597 Authentication password of strongSwan MAP client
599 .BR charon.plugins.tnc-ifmap.server_cert
600 Certificate of MAP server
602 .BR charon.plugins.tnc-ifmap.ssl_passphrase
603 Passphrase protecting the private key
605 .BR charon.plugins.tnc-ifmap.username
606 Authentication username of strongSwan MAP client
608 .BR charon.plugins.tnc-imc.preferred_language " [en]"
609 Preferred language for TNC recommendations
611 .BR charon.plugins.tnc-pdp.method " [ttls]"
612 EAP tunnel method to be used
614 .BR charon.plugins.tnc-pdp.port " [1812]"
615 RADIUS server port the strongSwan PDP is listening on
617 .BR charon.plugins.tnc-pdp.secret
618 Shared RADIUS secret between strongSwan PDP and NAS
620 .BR charon.plugins.tnc-pdp.server
621 Name of the strongSwan PDP as contained in the AAA certificate
623 .BR charon.plugins.updown.dns_handler " [no]"
624 Whether the updown script should handle DNS serves assigned via IKEv1 Mode
625 Config or IKEv2 Config Payloads (if enabled they can't be handled by other
626 plugins, like resolve)
628 .BR charon.plugins.whitelist.enable " [yes]"
629 Enable loaded whitelist plugin
631 .BR charon.plugins.xauth-eap.backend " [radius]"
632 EAP plugin to be used as backend for XAuth credential verification
634 .BR charon.plugins.xauth-pam.pam_service " [login]"
635 PAM service to be used for authentication
636 .SS libstrongswan section
638 .BR libstrongswan.cert_cache " [yes]"
639 Whether relations in validated certificate chains should be cached in memory
641 .BR libstrongswan.crypto_test.bench " [no]"
644 .BR libstrongswan.crypto_test.bench_size " [1024]"
647 .BR libstrongswan.crypto_test.bench_time " [50]"
650 .BR libstrongswan.crypto_test.on_add " [no]"
651 Test crypto algorithms during registration
653 .BR libstrongswan.crypto_test.on_create " [no]"
654 Test crypto algorithms on each crypto primitive instantiation
656 .BR libstrongswan.crypto_test.required " [no]"
657 Strictly require at least one test vector to enable an algorithm
659 .BR libstrongswan.crypto_test.rng_true " [no]"
660 Whether to test RNG with TRUE quality; requires a lot of entropy
662 .BR libstrongswan.dh_exponent_ansi_x9_42 " [yes]"
663 Use ANSI X9.42 DH exponent size or optimum size matched to cryptographical
666 .BR libstrongswan.ecp_x_coordinate_only " [yes]"
667 Compliance with the errata for RFC 4753
669 .BR libstrongswan.integrity_test " [no]"
670 Check daemon, libstrongswan and plugin integrity at startup
672 .BR libstrongswan.leak_detective.detailed " [yes]"
673 Includes source file names and line numbers in leak detective output
675 .BR libstrongswan.leak_detective.usage_threshold " [10240]"
676 Threshold in bytes for leaks to be reported (0 to report all)
678 .BR libstrongswan.processor.priority_threads
679 Subsection to configure the number of reserved threads per priority class
680 see JOB PRIORITY MANAGEMENT
682 .BR libstrongswan.x509.enforce_critical " [yes]"
683 Discard certificates with unsupported or unknown critical extensions
684 .SS libstrongswan.plugins subsection
686 .BR libstrongswan.plugins.attr-sql.database
687 Database URI for attr-sql plugin used by charon
689 .BR libstrongswan.plugins.attr-sql.lease_history " [yes]"
690 Enable logging of SQL IP pool leases
692 .BR libstrongswan.plugins.gcrypt.quick_random " [no]"
693 Use faster random numbers in gcrypt; for testing only, produces weak keys!
695 .BR libstrongswan.plugins.openssl.engine_id " [pkcs11]"
696 ENGINE ID to use in the OpenSSL plugin
698 .BR libstrongswan.plugins.pkcs11.modules
699 List of available PKCS#11 modules
701 .BR libstrongswan.plugins.pkcs11.use_dh " [no]"
702 Whether the PKCS#11 modules should be used for DH and ECDH (see use_ecc option)
704 .BR libstrongswan.plugins.pkcs11.use_ecc " [no]"
705 Whether the PKCS#11 modules should be used for ECDH and ECDSA public key
706 operations. ECDSA private keys can be used regardless of this option
708 .BR libstrongswan.plugins.pkcs11.use_hasher " [no]"
709 Whether the PKCS#11 modules should be used to hash data
711 .BR libstrongswan.plugins.pkcs11.use_pubkey " [no]"
712 Whether the PKCS#11 modules should be used for public key operations, even for
713 keys not stored on tokens
715 .BR libstrongswan.plugins.pkcs11.use_rng " [no]"
716 Whether the PKCS#11 modules should be used as RNG
718 .BR libstrongswan.plugins.random.random " [@DEV_RANDOM@]"
719 File to read random bytes from, instead of @DEV_RANDOM@
721 .BR libstrongswan.plugins.random.urandom " [@DEV_URANDOM@]"
722 File to read pseudo random bytes from, instead of @DEV_URANDOM@
725 .BR libtnccs.tnc_config " [/etc/tnc_config]"
726 TNC IMC/IMV configuration directory
729 .BR libimcv.assessment_result " [yes]"
730 Whether IMVs send a standard IETF Assessment Result attribute
732 .BR libimcv.debug_level " [1]"
733 Debug level for a stand-alone libimcv library
735 .BR libimcv.stderr_quiet " [no]"
736 Disable output to stderr with a stand-alone libimcv library
737 .SS libimcv plugins section
739 .BR libimcv.plugins.imc-attestation.platform_info
740 Information on operating system and hardware platform
742 .BR libimcv.plugins.imc-attestation.aik_blob
743 AIK encrypted private key blob file
745 .BR libimcv.plugins.imc-attestation.aik_cert
748 .BR libimcv.plugins.imc-attestation.aik_key
751 .BR libimcv.plugins.imv-attestation.nonce_len " [20]"
754 .BR libimcv.plugins.imv-attestation.use_quote2 " [yes]"
755 Use Quote2 AIK signature instead of Quote signature
757 .BR libimcv.plugins.imv-attestation.cadir
758 Path to directory with AIK cacerts
760 .BR libimcv.plugins.imv-attestation.database
761 Path to database with file measurement information
763 .BR libimcv.plugins.imv-attestation.dh_group " [ecp256]"
764 Preferred Diffie-Hellman group
766 .BR libimcv.plugins.imv-attestation.hash_algorithm " [sha256]"
767 Preferred measurement hash algorithm
769 .BR libimcv.plugins.imv-attestation.min_nonce_len " [0]"
770 DH minimum nonce length
772 .BR libimcv.plugins.imv-attestation.platform_info
773 Information on operating system and hardware platform
775 .BR libimcv.plugins.imv-scanner.closed_port_policy " [yes]"
776 By default all ports must be closed (yes) or can be open (no)
778 .BR libimcv.plugins.imv-scanner.tcp_ports
779 List of TCP ports that can be open or must be closed
781 .BR libimcv.plugins.imv-scanner.udp_ports
782 List of UDP ports that can be open or must be closed
784 .BR libimcv.plugins.imc-test.additional_ids " [0]"
785 Number of additional IMC IDs
787 .BR libimcv.plugins.imc-test.command " [none]"
788 Command to be sent to the Test IMV
790 .BR libimcv.plugins.imc-test.dummy_size " [0]"
791 Size of dummy attribute to be sent to the Test IMV (0 = disabled)
793 .BR libimcv.plugins.imc-test.retry " [no]"
796 .BR libimcv.plugins.imc-test.retry_command
797 Command to be sent to the Test IMV in the handshake retry
799 .BR libimcv.plugins.imv-test.rounds " [0]"
800 Number of IMC-IMV retry rounds
804 List of TLS encryption ciphers
806 .BR libtls.key_exchange
807 List of TLS key exchange methods
810 List of TLS MAC algorithms
813 List of TLS cipher suites
817 Credential database URI for manager
819 .BR manager.debug " [no]"
820 Enable debugging in manager
823 Plugins to load in manager
826 FastCGI socket of manager, to run it statically
828 .BR manager.threads " [10]"
829 Threads to use for request handling
831 .BR manager.timeout " [15m]"
832 Session timeout for manager
833 .SS mediation client section
836 Mediation client database URI
838 .BR medcli.dpd " [5m]"
839 DPD timeout to use in mediation client plugin
841 .BR medcli.rekey " [20m]"
842 Rekeying time on mediation connections in mediation client plugin
843 .SS mediation server section
846 Mediation server database URI
848 .BR medsrv.debug " [no]"
849 Debugging in mediation server web application
851 .BR medsrv.dpd " [5m]"
852 DPD timeout to use in mediation server plugin
855 Plugins to load in mediation server plugin
857 .BR medsrv.password_length " [6]"
858 Minimum password length required for mediation server user accounts
860 .BR medsrv.rekey " [20m]"
861 Rekeying time on mediation connections in mediation server plugin
864 Run Mediation server web application statically on socket
866 .BR medsrv.threads " [5]"
867 Number of thread for mediation service web application
869 .BR medsrv.timeout " [15m]"
870 Session timeout for mediation service
874 Plugins to load in ipsec openac tool
878 Plugins to load in ipsec pki tool
882 Plugins to load in ipsec pool tool
883 .SS scepclient section
886 Plugins to load in ipsec scepclient tool
890 Plugins to load in starter
892 .BR starter.load_warning " [yes]"
893 Disable charon plugin load option warning
895 .SH LOGGER CONFIGURATION
896 The options described below provide a much more flexible way to configure
897 loggers for the IKEv2 daemon charon than using the
903 that if any loggers are specified in strongswan.conf,
905 does not have any effect.
907 There are currently two types of loggers defined:
910 Log directly to a file and are defined by specifying the full path to the
911 file as subsection in the
913 section. To log to the console the two special filenames
914 .BR stdout " and " stderr
918 Log into a syslog facility and are defined by specifying the facility to log to
919 as the name of a subsection in the
921 section. The following facilities are currently supported:
922 .BR daemon " and " auth .
924 Multiple loggers can be defined for each type with different log verbosity for
925 the different subsystems of the daemon.
928 .BR charon.filelog.<filename>.default " [1]"
930 .BR charon.syslog.<facility>.default
931 Specifies the default loglevel to be used for subsystems for which no specific
934 .BR charon.filelog.<filename>.<subsystem> " [<default>]"
936 .BR charon.syslog.<facility>.<subsystem>
937 Specifies the loglevel for the given subsystem.
939 .BR charon.filelog.<filename>.append " [yes]"
940 If this option is enabled log entries are appended to the existing file.
942 .BR charon.filelog.<filename>.flush_line " [no]"
943 Enabling this option disables block buffering and enables line buffering.
945 .BR charon.filelog.<filename>.ike_name " [no]"
947 .BR charon.syslog.<facility>.ike_name
948 Prefix each log entry with the connection name and a unique numerical
949 identifier for each IKE_SA.
951 .BR charon.filelog.<filename>.time_format
952 Prefix each log entry with a timestamp. The option accepts a format string as
956 .BR charon.syslog.identifier
957 Global identifier used for an
959 call, prepended to each log message by syslog. If not configured,
961 is not called, so the value will depend on system defaults (often the program
967 Main daemon setup/cleanup/signal handling
970 IKE_SA manager, handling synchronization for IKE_SA access
979 Jobs queueing/processing and thread pool management
982 Configuration management and plugins
985 IPsec/Networking kernel interface
988 IKE network communication
991 Low-level encoding/decoding (ASN.1, X.509 etc.)
994 Packet encoding/decoding encryption/decryption operations
997 libtls library messages
1000 libipsec library messages
1003 libstrongwan library messages
1006 Trusted Network Connect
1009 Integrity Measurement Collector
1012 Integrity Measurement Verifier
1015 Platform Trust Service
1022 Very basic auditing logs, (e.g. SA up/SA down)
1025 Generic control flow with errors, a good default to see whats going on
1028 More detailed debugging control flow
1031 Including RAW data dumps in Hex
1034 Also include sensitive material in dumps, e.g. keys
1040 /var/log/charon.log {
1041 time_format = %b %e %T
1052 # enable logging to LOG_DAEMON, use defaults
1055 # minimalistic IKE auditing logging to LOG_AUTHPRIV
1064 .SH JOB PRIORITY MANAGEMENT
1065 Some operations in the IKEv2 daemon charon are currently implemented
1066 synchronously and blocking. Two examples for such operations are communication
1067 with a RADIUS server via EAP-RADIUS, or fetching CRL/OCSP information during
1068 certificate chain verification. Under high load conditions, the thread pool may
1069 run out of available threads, and some more important jobs, such as liveness
1070 checking, may not get executed in time.
1072 To prevent thread starvation in such situations job priorities were introduced.
1073 The job processor will reserve some threads for higher priority jobs, these
1074 threads are not available for lower priority, locking jobs.
1076 Currently 4 priorities have been defined, and they are used in charon as
1080 Priority for long-running dispatcher jobs.
1083 INFORMATIONAL exchanges, as used by liveness checking (DPD).
1086 Everything not HIGH/LOW, including IKE_SA_INIT processing.
1089 IKE_AUTH message processing. RADIUS and CRL fetching block here
1091 Although IKE_SA_INIT processing is computationally expensive, it is explicitly
1092 assigned to the MEDIUM class. This allows charon to do the DH exchange while
1093 other threads are blocked in IKE_AUTH. To prevent the daemon from accepting more
1094 IKE_SA_INIT requests than it can handle, use IKE_SA_INIT DROPPING.
1096 The thread pool processes jobs strictly by priority, meaning it will consume all
1097 higher priority jobs before looking for ones with lower priority. Further, it
1098 reserves threads for certain priorities. A priority class having reserved
1100 threads will always have
1102 threads available for this class (either currently processing a job, or waiting
1105 To ensure that there are always enough threads available for higher priority
1106 tasks, threads must be reserved for each priority class.
1108 .BR libstrongswan.processor.priority_threads.critical " [0]"
1109 Threads reserved for CRITICAL priority class jobs
1111 .BR libstrongswan.processor.priority_threads.high " [0]"
1112 Threads reserved for HIGH priority class jobs
1114 .BR libstrongswan.processor.priority_threads.medium " [0]"
1115 Threads reserved for MEDIUM priority class jobs
1117 .BR libstrongswan.processor.priority_threads.low " [0]"
1118 Threads reserved for LOW priority class jobs
1120 Let's consider the following configuration:
1133 With this configuration, one thread is reserved for HIGH priority tasks. As
1134 currently only liveness checking and stroke message processing is done with
1135 high priority, one or two threads should be sufficient.
1137 The MEDIUM class mostly processes non-blocking jobs. Unless your setup is
1138 experiencing many blocks in locks while accessing shared resources, threads for
1139 one or two times the number of CPU cores is fine.
1141 It is usually not required to reserve threads for CRITICAL jobs. Jobs in this
1142 class rarely return and do not release their thread to the pool.
1144 The remaining threads are available for LOW priority jobs. Reserving threads
1145 does not make sense (until we have an even lower priority).
1147 To see what the threads are actually doing, invoke
1148 .IR "ipsec statusall" .
1149 Under high load, something like this will show up:
1152 worker threads: 2 or 32 idle, 5/1/2/22 working,
1153 job queue: 0/0/1/149, scheduled: 198
1156 From 32 worker threads,
1160 are running CRITICAL priority jobs (dispatching from sockets, etc.).
1162 is currently handling a HIGH priority job. This is actually the thread currently
1163 providing this information via stroke.
1165 are handling MEDIUM priority jobs, likely IKE_SA_INIT or CREATE_CHILD_SA
1168 are handling LOW priority jobs, probably waiting for an EAP-RADIUS response
1169 while processing IKE_AUTH messages.
1171 The job queue load shows how many jobs are queued for each priority, ready for
1172 execution. The single MEDIUM priority job will get executed immediately, as
1173 we have two spare threads reserved for MEDIUM class jobs.
1175 .SH IKE_SA_INIT DROPPING
1176 If a responder receives more connection requests per seconds than it can handle,
1177 it does not make sense to accept more IKE_SA_INIT messages. And if they are
1178 queued but can't get processed in time, an answer might be sent after the
1179 client has already given up and restarted its connection setup. This
1180 additionally increases the load on the responder.
1182 To limit the responder load resulting from new connection attempts, the daemon
1183 can drop IKE_SA_INIT messages just after reception. There are two mechanisms to
1184 decide if this should happen, configured with the following options:
1186 .BR charon.init_limit_half_open " [0]"
1187 Limit based on the number of half open IKE_SAs. Half open IKE_SAs are SAs in
1188 connecting state, but not yet established.
1190 .BR charon.init_limit_job_load " [0]"
1191 Limit based on the number of jobs currently queued for processing (sum over all
1194 The second limit includes load from other jobs, such as rekeying. Choosing a
1195 good value is difficult and depends on the hardware and expected load.
1197 The first limit is simpler to calculate, but includes the load from new
1198 connections only. If your responder is capable of negotiating 100 tunnels/s, you
1199 might set this limit to 1000. The daemon will then drop new connection attempts
1200 if generating a response would require more than 10 seconds. If you are
1201 allowing for a maximum response time of more than 30 seconds, consider adjusting
1202 the timeout for connecting IKE_SAs
1203 .RB ( charon.half_open_timeout ).
1204 A responder, by default, deletes an IKE_SA if the initiator does not establish
1205 it within 30 seconds. Under high load, a higher value might be required.
1208 To do stability testing and performance optimizations, the IKEv2 daemon charon
1209 provides the load-tester plugin. This plugin allows one to setup thousands of
1210 tunnels concurrently against the daemon itself or a remote host.
1213 Never enable the load-testing plugin on productive systems. It provides
1214 preconfigured credentials and allows an attacker to authenticate as any user.
1217 .BR charon.plugins.load-tester.child_rekey " [600]"
1218 Seconds to start CHILD_SA rekeying after setup
1220 .BR charon.plugins.load-tester.delay " [0]"
1221 Delay between initiatons for each thread
1223 .BR charon.plugins.load-tester.delete_after_established " [no]"
1224 Delete an IKE_SA as soon as it has been established
1226 .BR charon.plugins.load-tester.dpd_delay " [0]"
1227 DPD delay to use in load test
1229 .BR charon.plugins.load-tester.dynamic_port " [0]"
1230 Base port to be used for requests (each client uses a different port)
1232 .BR charon.plugins.load-tester.eap_password " [default-pwd]"
1233 EAP secret to use in load test
1235 .BR charon.plugins.load-tester.enable " [no]"
1236 Enable the load testing plugin
1238 .BR charon.plugins.load-tester.fake_kernel " [no]"
1239 Fake the kernel interface to allow load-testing against self
1241 .BR charon.plugins.load-tester.ike_rekey " [0]"
1242 Seconds to start IKE_SA rekeying after setup
1244 .BR charon.plugins.load-tester.init_limit " [0]"
1245 Global limit of concurrently established SAs during load test
1247 .BR charon.plugins.load-tester.initiators " [0]"
1248 Number of concurrent initiator threads to use in load test
1250 .BR charon.plugins.load-tester.initiator_auth " [pubkey]"
1251 Authentication method(s) the intiator uses
1253 .BR charon.plugins.load-tester.initiator_id
1254 Initiator ID used in load test
1256 .BR charon.plugins.load-tester.iterations " [1]"
1257 Number of IKE_SAs to initate by each initiator in load test
1259 .BR charon.plugins.load-tester.pool
1260 Provide INTERNAL_IPV4_ADDRs from a named pool
1262 .BR charon.plugins.load-tester.preshared_key " [default-psk]"
1263 Preshared key to use in load test
1265 .BR charon.plugins.load-tester.proposal " [aes128-sha1-modp768]"
1266 IKE proposal to use in load test
1268 .BR charon.plugins.load-tester.remote " [127.0.0.1]"
1269 Address to initiation connections to
1271 .BR charon.plugins.load-tester.responder_auth " [pubkey]"
1272 Authentication method(s) the responder uses
1274 .BR charon.plugins.load-tester.responder_id
1275 Responder ID used in load test
1277 .BR charon.plugins.load-tester.request_virtual_ip " [no]"
1278 Request an INTERNAL_IPV4_ADDR from the server
1280 .BR charon.plugins.load-tester.shutdown_when_complete " [no]"
1281 Shutdown the daemon after all IKE_SAs have been established
1282 .SS Configuration details
1283 For public key authentication, the responder uses the
1284 .B \(dqCN=srv, OU=load-test, O=strongSwan\(dq
1285 identity. For the initiator, each connection attempt uses a different identity
1287 .BR "\(dqCN=c1-r1, OU=load-test, O=strongSwan\(dq" ,
1288 where the first number inidicates the client number, the second the
1289 authentication round (if multiple authentication is used).
1291 For PSK authentication, FQDN identities are used. The server uses
1292 .BR srv.strongswan.org ,
1293 the client uses an identity in the form
1294 .BR c1-r1.strongswan.org .
1296 For EAP authentication, the client uses a NAI in the form
1297 .BR 100000000010001@strongswan.org .
1299 To configure multiple authentication, concatenate multiple methods using, e.g.
1301 initiator_auth = pubkey|psk|eap-md5|eap-aka
1304 The responder uses a hardcoded certificate based on a 1024-bit RSA key.
1305 This certificate additionally serves as CA certificate. A peer uses the same
1306 private key, but generates client certificates on demand signed by the CA
1307 certificate. Install the Responder/CA certificate on the remote host to
1308 authenticate all clients.
1310 To speed up testing, the load tester plugin implements a special Diffie-Hellman
1311 implementation called modpnull. By setting
1313 proposal = aes128-sha1-modpnull
1315 this wicked fast DH implementation is used. It does not provide any security
1316 at all, but allows one to run tests without DH calculation overhead.
1319 In the simplest case, the daemon initiates IKE_SAs against itself using the
1320 loopback interface. This will actually establish double the number of IKE_SAs,
1321 as the daemon is initiator and responder for each IKE_SA at the same time.
1322 Installation of IPsec SAs would fails, as each SA gets installed twice. To
1323 simulate the correct behavior, a fake kernel interface can be enabled which does
1324 not install the IPsec SAs at the kernel level.
1326 A simple loopback configuration might look like this:
1330 # create new IKE_SAs for each CHILD_SA to simulate
1333 # turn off denial of service protection
1340 # use 4 threads to initiate connections
1343 # each thread initiates 1000 connections
1345 # delay each initiation in each thread by 20ms
1347 # enable the fake kernel interface to
1348 # avoid SA conflicts
1355 This will initiate 4000 IKE_SAs within 20 seconds. You may increase the delay
1356 value if your box can not handle that much load, or decrease it to put more
1357 load on it. If the daemon starts retransmitting messages your box probably can
1358 not handle all connection attempts.
1360 The plugin also allows one to test against a remote host. This might help to
1361 test against a real world configuration. A connection setup to do stress
1362 testing of a gateway might look like this:
1372 # 10000 connections, ten in parallel
1375 # use a delay of 100ms, overall time is:
1376 # iterations * delay = 100s
1378 # address of the gateway
1380 # IKE-proposal to use
1381 proposal = aes128-sha1-modp1024
1382 # use faster PSK authentication instead
1384 initiator_auth = psk
1385 responder_auth = psk
1386 # request a virtual IP using configuration
1388 request_virtual_ip = yes
1389 # enable CHILD_SA every 60s
1396 .SH IKEv2 RETRANSMISSION
1397 Retransmission timeouts in the IKEv2 daemon charon can be configured globally
1398 using the three keys listed below:
1402 .BR charon.retransmit_base " [1.8]"
1403 .BR charon.retransmit_timeout " [4.0]"
1404 .BR charon.retransmit_tries " [5]"
1408 The following algorithm is used to calculate the timeout:
1411 relative timeout = retransmit_timeout * retransmit_base ^ (n-1)
1416 is the current retransmission count.
1418 Using the default values, packets are retransmitted in:
1424 Retransmission Relative Timeout Absolute Timeout
1434 /etc/strongswan.conf
1437 ipsec.conf(5), ipsec.secrets(5), ipsec(8)
1440 .UR http://www.strongswan.org
1443 by Tobias Brunner, Andreas Steffen and Martin Willi.