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.ignore_routing_tables
171 A list of routing tables to be excluded from route lookup
173 .BR charon.ikesa_table_segments " [1]"
174 Number of exclusively locked segments in the hash table
176 .BR charon.ikesa_table_size " [1]"
177 Size of the IKE_SA hash table
179 .BR charon.inactivity_close_ike " [no]"
180 Whether to close IKE_SA if the only CHILD_SA closed due to inactivity
182 .BR charon.init_limit_half_open " [0]"
183 Limit new connections based on the current number of half open IKE_SAs (see
184 IKE_SA_INIT DROPPING).
186 .BR charon.init_limit_job_load " [0]"
187 Limit new connections based on the number of jobs currently queued for
188 processing (see IKE_SA_INIT DROPPING).
190 .BR charon.install_routes " [yes]"
191 Install routes into a separate routing table for established IPsec tunnels
193 .BR charon.install_virtual_ip " [yes]"
194 Install virtual IP addresses
196 .BR charon.keep_alive " [20s]"
197 NAT keep alive interval
200 Plugins to load in the IKEv2 daemon charon
202 .BR charon.max_packet " [10000]"
203 Maximum packet size accepted by charon
205 .BR charon.multiple_authentication " [yes]"
206 Enable multiple authentication exchanges (RFC 4739)
211 WINS servers assigned to peer via configuration payload (CP)
213 .BR charon.process_route " [yes]"
214 Process RTM_NEWROUTE and RTM_DELROUTE events
216 .BR charon.receive_delay " [0]"
217 Delay for receiving packets, to simulate larger RTT
219 .BR charon.receive_delay_response " [yes]"
220 Delay response messages
222 .BR charon.receive_delay_request " [yes]"
223 Delay request messages
225 .BR charon.receive_delay_type " [0]"
226 Specific IKEv2 message type to delay, 0 for any
228 .BR charon.replay_window " [32]"
229 Size of the AH/ESP replay window, in packets.
231 .BR charon.retransmit_base " [1.8]"
232 Base to use for calculating exponential back off, see IKEv2 RETRANSMISSION
234 .BR charon.retransmit_timeout " [4.0]
235 Timeout in seconds before sending first retransmit
237 .BR charon.retransmit_tries " [5]"
238 Number of times to retransmit a packet before giving up
240 .BR charon.retry_initiate_interval " [0]"
241 Interval to use when retrying to initiate an IKE_SA (e.g. if DNS resolution
242 failed), 0 to disable retries.
244 .BR charon.reuse_ikesa " [yes]
245 Initiate CHILD_SA within existing IKE_SAs
247 .BR charon.routing_table
248 Numerical routing table to install routes to
250 .BR charon.routing_table_prio
251 Priority of the routing table
253 .BR charon.send_delay " [0]"
254 Delay for sending packets, to simulate larger RTT
256 .BR charon.send_delay_response " [yes]"
257 Delay response messages
259 .BR charon.send_delay_request " [yes]"
260 Delay request messages
262 .BR charon.send_delay_type " [0]"
263 Specific IKEv2 message type to delay, 0 for any
265 .BR charon.send_vendor_id " [no]
266 Send strongSwan vendor ID payload
269 Section to define syslog loggers, see LOGGER CONFIGURATION
271 .BR charon.threads " [16]"
272 Number of worker threads in charon
273 .SS charon.plugins subsection
275 .BR charon.plugins.android_log.loglevel " [1]"
276 Loglevel for logging to Android specific logger
278 .BR charon.plugins.attr
279 Section to specify arbitrary attributes that are assigned to a peer via
280 configuration payload (CP)
282 .BR charon.plugins.dhcp.identity_lease " [no]"
283 Derive user-defined MAC address from hash of IKEv2 identity
285 .BR charon.plugins.dhcp.server " [255.255.255.255]"
286 DHCP server unicast or broadcast IP address
288 .BR charon.plugins.duplicheck.enable " [yes]"
289 enable loaded duplicheck plugin
291 .BR charon.plugins.eap-aka.request_identity " [yes]"
294 .BR charon.plugins.eap-aka-3ggp2.seq_check
297 .BR charon.plugins.eap-gtc.pam_service " [login]"
298 PAM service to be used for authentication
301 .BR charon.plugins.eap-peap.fragment_size " [1024]"
302 Maximum size of an EAP-PEAP packet
304 .BR charon.plugins.eap-peap.max_message_count " [32]"
305 Maximum number of processed EAP-PEAP packets (0 = no limit)
307 .BR charon.plugins.eap-peap.include_length " [no]"
308 Include length in non-fragmented EAP-PEAP packets
310 .BR charon.plugins.eap-peap.phase2_method " [mschapv2]"
311 Phase2 EAP client authentication method
313 .BR charon.plugins.eap-peap.phase2_piggyback " [no]"
314 Phase2 EAP Identity request piggybacked by server onto TLS Finished message
316 .BR charon.plugins.eap-peap.phase2_tnc " [no]"
317 Start phase2 EAP TNC protocol after successful client authentication
319 .BR charon.plugins.eap-peap.request_peer_auth " [no]"
320 Request peer authentication based on a client certificate
323 .BR charon.plugins.eap-radius.accounting " [no]"
324 Send RADIUS accounting information to RADIUS servers.
326 .BR charon.plugins.eap-radius.class_group " [no]"
329 attribute sent in the RADIUS-Accept message as group membership information that
330 is compared to the groups specified in the
335 .BR charon.plugins.eap-radius.eap_start " [no]"
336 Send EAP-Start instead of EAP-Identity to start RADIUS conversation
338 .BR charon.plugins.eap-radius.filter_id " [no]"
345 attribute sent in the RADIUS-Accept message as group membership information that
346 is compared to the groups specified in the
351 .BR charon.plugins.eap-radius.id_prefix
352 Prefix to EAP-Identity, some AAA servers use a IMSI prefix to select the
355 .BR charon.plugins.eap-radius.nas_identifier " [strongSwan]"
356 NAS-Identifier to include in RADIUS messages
358 .BR charon.plugins.eap-radius.port " [1812]"
359 Port of RADIUS server (authentication)
361 .BR charon.plugins.eap-radius.secret
362 Shared secret between RADIUS and NAS
364 .BR charon.plugins.eap-radius.server
365 IP/Hostname of RADIUS server
367 .BR charon.plugins.eap-radius.servers
368 Section to specify multiple RADIUS servers. The
374 options can be specified for each server. A server's IP/Hostname can be
377 option. For each RADIUS server a priority can be specified using the
378 .BR preference " [0]"
381 .BR charon.plugins.eap-radius.sockets " [1]"
382 Number of sockets (ports) to use, increase for high load
384 .BR charon.plugins.eap-sim.request_identity " [yes]"
387 .BR charon.plugins.eap-simaka-sql.database
390 .BR charon.plugins.eap-simaka-sql.remove_used
393 .BR charon.plugins.eap-tls.fragment_size " [1024]"
394 Maximum size of an EAP-TLS packet
396 .BR charon.plugins.eap-tls.max_message_count " [32]"
397 Maximum number of processed EAP-TLS packets (0 = no limit)
399 .BR charon.plugins.eap-tls.include_length " [yes]"
400 Include length in non-fragmented EAP-TLS packets
402 .BR charon.plugins.eap-tnc.max_message_count " [10]"
403 Maximum number of processed EAP-TNC packets (0 = no limit)
405 .BR charon.plugins.eap-tnc.protocol " [tnccs-1.1]"
406 IF-TNCCS protocol version to be used (tnccs-1.1, tnccs-2.0, tnccs-dynamic)
408 .BR charon.plugins.eap-ttls.fragment_size " [1024]"
409 Maximum size of an EAP-TTLS packet
411 .BR charon.plugins.eap-ttls.max_message_count " [32]"
412 Maximum number of processed EAP-TTLS packets (0 = no limit)
414 .BR charon.plugins.eap-ttls.include_length " [yes]"
415 Include length in non-fragmented EAP-TTLS packets
417 .BR charon.plugins.eap-ttls.phase2_method " [md5]"
418 Phase2 EAP client authentication method
420 .BR charon.plugins.eap-ttls.phase2_piggyback " [no]"
421 Phase2 EAP Identity request piggybacked by server onto TLS Finished message
423 .BR charon.plugins.eap-ttls.phase2_tnc " [no]"
424 Start phase2 EAP TNC protocol after successful client authentication
426 .BR charon.plugins.eap-ttls.request_peer_auth " [no]"
427 Request peer authentication based on a client certificate
429 .BR charon.plugins.ha.fifo_interface " [yes]"
432 .BR charon.plugins.ha.heartbeat_delay " [1000]"
435 .BR charon.plugins.ha.heartbeat_timeout " [2100]"
438 .BR charon.plugins.ha.local
441 .BR charon.plugins.ha.monitor " [yes]"
444 .BR charon.plugins.ha.pools
447 .BR charon.plugins.ha.remote
450 .BR charon.plugins.ha.resync " [yes]"
453 .BR charon.plugins.ha.secret
456 .BR charon.plugins.ha.segment_count " [1]"
459 .BR charon.plugins.led.activity_led
462 .BR charon.plugins.led.blink_time " [50]"
465 .BR charon.plugins.kernel-klips.ipsec_dev_count " [4]"
466 Number of ipsecN devices
468 .BR charon.plugins.kernel-klips.ipsec_dev_mtu " [0]"
469 Set MTU of ipsecN device
471 .BR charon.plugins.load-tester
472 Section to configure the load-tester plugin, see LOAD TESTS
474 .BR charon.plugins.radattr.dir
475 Directory where RADIUS attributes are stored in client-ID specific files.
477 .BR charon.plugins.radattr.message_id " [-1]"
478 Attributes are added to all IKE_AUTH messages by default (-1), or only to the
479 IKE_AUTH message with the given IKEv2 message ID.
481 .BR charon.plugins.resolve.file " [/etc/resolv.conf]"
482 File where to add DNS server entries
484 .BR charon.plugins.resolve.resolvconf.iface_prefix " [lo.inet.ipsec.]"
485 Prefix used for interface names sent to resolvconf(8). The nameserver address
486 is appended to this prefix to make it unique. The result has to be a valid
487 interface name according to the rules defined by resolvconf. Also, it should
488 have a high priority according to the order defined in interface-order(5).
490 .BR charon.plugins.sql.database
491 Database URI for charons SQL plugin
493 .BR charon.plugins.sql.loglevel " [-1]"
494 Loglevel for logging to SQL database
496 .BR charon.plugins.stroke.ignore_missing_ca_basic_constraint " [no]"
497 Treat certificates in ipsec.d/cacerts and ipsec.conf ca sections as CA
498 certificates even if they don't contain a CA basic constraint.
500 .BR charon.plugins.stroke.max_concurrent " [4]"
501 Maximum number of stroke messages handled concurrently
503 .BR charon.plugins.tnccs-11.max_msg_size " [45000]"
504 Maximum size of a PA-TNC message (XML & Base64 encoding)
506 .BR charon.plugins.tnccs-20.max_batch_size " [65522]"
507 Maximum size of a PB-TNC batch (upper limit via PT-EAP = 65529)
509 .BR charon.plugins.tnccs-20.max_msg_size " [65490]"
510 Maximum size of a PA-TNC message (upper limit via PT-EAP = 65497)
512 .BR charon.plugins.tnc-ifmap.device_name
513 Unique name of strongSwan as a PEP and/or PDP device
515 .BR charon.plugins.tnc-ifmap.key_file
516 Concatenated client certificate and private key
518 .BR charon.plugins.tnc-ifmap.password
519 Authentication password of strongSwan MAP client
521 .BR charon.plugins.tnc-ifmap.server_cert
522 Certificate of MAP server
524 .BR charon.plugins.tnc-ifmap.ssl_passphrase
525 Passphrase protecting the private key
527 .BR charon.plugins.tnc-ifmap.username
528 Authentication username of strongSwan MAP client
530 .BR charon.plugins.tnc-imc.preferred_language " [en]"
531 Preferred language for TNC recommendations
533 .BR charon.plugins.tnc-pdp.method " [ttls]"
534 EAP tunnel method to be used
536 .BR charon.plugins.tnc-pdp.port " [1812]"
537 RADIUS server port the strongSwan PDP is listening on
539 .BR charon.plugins.tnc-pdp.secret
540 Shared RADIUS secret between strongSwan PDP and NAS
542 .BR charon.plugins.tnc-pdp.server
543 name of the strongSwan PDP as contained in the AAA certificate
545 .BR charon.plugins.whitelist.enable " [yes]"
546 enable loaded whitelist plugin
547 .SS libstrongswan section
549 .BR libstrongswan.crypto_test.bench " [no]"
552 .BR libstrongswan.crypto_test.bench_size " [1024]"
555 .BR libstrongswan.crypto_test.bench_time " [50]"
558 .BR libstrongswan.crypto_test.on_add " [no]"
559 Test crypto algorithms during registration
561 .BR libstrongswan.crypto_test.on_create " [no]"
562 Test crypto algorithms on each crypto primitive instantiation
564 .BR libstrongswan.crypto_test.required " [no]"
565 Strictly require at least one test vector to enable an algorithm
567 .BR libstrongswan.crypto_test.rng_true " [no]"
568 Whether to test RNG with TRUE quality; requires a lot of entropy
570 .BR libstrongswan.dh_exponent_ansi_x9_42 " [yes]"
571 Use ANSI X9.42 DH exponent size or optimum size matched to cryptographical
574 .BR libstrongswan.ecp_x_coordinate_only " [yes]"
575 Compliance with the errata for RFC 4753
577 .BR libstrongswan.integrity_test " [no]"
578 Check daemon, libstrongswan and plugin integrity at startup
580 .BR libstrongswan.leak_detective.detailed " [yes]"
581 Includes source file names and line numbers in leak detective output
583 .BR libstrongswan.processor.priority_threads
584 Subsection to configure the number of reserved threads per priority class
585 see JOB PRIORITY MANAGEMENT
587 .BR libstrongswan.x509.enforce_critical " [yes]"
588 Discard certificates with unsupported or unknown critical extensions
589 .SS libstrongswan.plugins subsection
591 .BR libstrongswan.plugins.attr-sql.database
592 Database URI for attr-sql plugin used by charon and pluto
594 .BR libstrongswan.plugins.attr-sql.lease_history " [yes]"
595 Enable logging of SQL IP pool leases
597 .BR libstrongswan.plugins.gcrypt.quick_random " [no]"
598 Use faster random numbers in gcrypt; for testing only, produces weak keys!
600 .BR libstrongswan.plugins.openssl.engine_id " [pkcs11]"
601 ENGINE ID to use in the OpenSSL plugin
603 .BR libstrongswan.plugins.pkcs11.modules
604 List of available PKCS#11 modules
606 .BR libstrongswan.plugins.pkcs11.use_dh " [no]"
607 Whether the PKCS#11 modules should be used for DH and ECDH (see use_ecc option)
609 .BR libstrongswan.plugins.pkcs11.use_ecc " [no]"
610 Whether the PKCS#11 modules should be used for ECDH and ECDSA public key
611 operations. ECDSA private keys can be used regardless of this option
613 .BR libstrongswan.plugins.pkcs11.use_hasher " [no]"
614 Whether the PKCS#11 modules should be used to hash data
616 .BR libstrongswan.plugins.pkcs11.use_pubkey " [no]"
617 Whether the PKCS#11 modules should be used for public key operations, even for
618 keys not stored on tokens
620 .BR libstrongswan.plugins.pkcs11.use_rng " [no]"
621 Whether the PKCS#11 modules should be used as RNG
624 .BR libtnccs.tnc_config " [/etc/tnc_config]"
625 TNC IMC/IMV configuration directory
628 .BR libimcv.debug_level " [1]"
629 Debug level for a stand-alone libimcv library
631 .BR libimcv.stderr_quiet " [no]"
632 Disable output to stderr with a stand-alone libimcv library
633 .SS libimcv plugins section
635 .BR libimcv.plugins.imc-attestation.platform_info
636 Information on operating system and hardware platform
638 .BR libimcv.plugins.imc-attestation.aik_blob
639 AIK encrypted private key blob file
641 .BR libimcv.plugins.imc-attestation.aik_cert
644 .BR libimcv.plugins.imc-attestation.aik_key
647 .BR libimcv.plugins.imv-attestation.nonce_len " [20]"
650 .BR libimcv.plugins.imv-attestation.use_quote2 " [yes]"
651 Use Quote2 AIK signature instead of Quote signature
653 .BR libimcv.plugins.imv-attestation.cadir
654 Path to directory with AIK cacerts
656 .BR libimcv.plugins.imv-attestation.database
657 Path to database with file measurement information
659 .BR libimcv.plugins.imv-attestation.dh_group " [ecp256]"
660 Preferred Diffie-Hellman group
662 .BR libimcv.plugins.imv-attestation.hash_algorithm " [sha256]"
663 Preferred measurement hash algorithm
665 .BR libimcv.plugins.imv-attestation.min_nonce_len " [0]"
666 DH minimum nonce length
668 .BR libimcv.plugins.imv-attestation.platform_info
669 Information on operating system and hardware platform
671 .BR libimcv.plugins.imv-scanner.closed_port_policy " [yes]"
672 By default all ports must be closed (yes) or can be open (no)
674 .BR libimcv.plugins.imv-scanner.tcp_ports
675 List of TCP ports that can be open or must be closed
677 .BR libimcv.plugins.imv-scanner.udp_ports
678 List of UDP ports that can be open or must be closed
680 .BR libimcv.plugins.imc-test.additional_ids " [0]"
681 Number of additional IMC IDs
683 .BR libimcv.plugins.imc-test.command " [none]"
684 Command to be sent to the Test IMV
686 .BR libimcv.plugins.imc-test.dummy_size " [0]"
687 Size of dummy attribute to be sent to the Test IMV (0 = disabled)
689 .BR libimcv.plugins.imc-test.retry " [no]"
692 .BR libimcv.plugins.imc-test.retry_command
693 Command to be sent to the Test IMV in the handshake retry
695 .BR libimcv.plugins.imv-test.rounds " [0]"
696 Number of IMC-IMV retry rounds
700 List of TLS encryption ciphers
702 .BR libtls.key_exchange
703 List of TLS key exchange methods
706 List of TLS MAC algorithms
709 List of TLS cipher suites
713 Credential database URI for manager
715 .BR manager.debug " [no]"
716 Enable debugging in manager
719 Plugins to load in manager
722 FastCGI socket of manager, to run it statically
724 .BR manager.threads " [10]"
725 Threads to use for request handling
727 .BR manager.timeout " [15m]"
728 Session timeout for manager
729 .SS mediation client section
732 Mediation client database URI
734 .BR medcli.dpd " [5m]"
735 DPD timeout to use in mediation client plugin
737 .BR medcli.rekey " [20m]"
738 Rekeying time on mediation connections in mediation client plugin
739 .SS mediation server section
742 Mediation server database URI
744 .BR medsrv.debug " [no]"
745 Debugging in mediation server web application
747 .BR medsrv.dpd " [5m]"
748 DPD timeout to use in mediation server plugin
751 Plugins to load in mediation server plugin
753 .BR medsrv.password_length " [6]"
754 Minimum password length required for mediation server user accounts
756 .BR medsrv.rekey " [20m]"
757 Rekeying time on mediation connections in mediation server plugin
760 Run Mediation server web application statically on socket
762 .BR medsrv.threads " [5]"
763 Number of thread for mediation service web application
765 .BR medsrv.timeout " [15m]"
766 Session timeout for mediation service
770 Plugins to load in ipsec openac tool
774 Plugins to load in ipsec pki tool
780 DNS servers assigned to peer via Mode Config
783 Plugins to load in IKEv1 pluto daemon
788 WINS servers assigned to peer via Mode Config
790 .BR pluto.threads " [4]"
791 Number of worker threads in pluto
792 .SS pluto.plugins section
794 .BR pluto.plugins.attr
795 Section to specify arbitrary attributes that are assigned to a peer via
798 .BR charon.plugins.kernel-klips.ipsec_dev_count " [4]"
799 Number of ipsecN devices
801 .BR charon.plugins.kernel-klips.ipsec_dev_mtu " [0]"
802 Set MTU of ipsecN device
806 Plugins to load in ipsec pool tool
807 .SS scepclient section
810 Plugins to load in ipsec scepclient tool
814 Plugins to load in starter
816 .BR starter.load_warning " [yes]"
817 Disable charon/pluto plugin load option warning
819 .SH LOGGER CONFIGURATION
820 The options described below provide a much more flexible way to configure
821 loggers for the IKEv2 daemon charon than using the
827 that if any loggers are specified in strongswan.conf,
829 does not have any effect.
831 There are currently two types of loggers defined:
834 Log directly to a file and are defined by specifying the full path to the
835 file as subsection in the
837 section. To log to the console the two special filenames
838 .BR stdout " and " stderr
842 Log into a syslog facility and are defined by specifying the facility to log to
843 as the name of a subsection in the
845 section. The following facilities are currently supported:
846 .BR daemon " and " auth .
848 Multiple loggers can be defined for each type with different log verbosity for
849 the different subsystems of the daemon.
852 .BR charon.filelog.<filename>.default " [1]"
854 .BR charon.syslog.<facility>.default
855 Specifies the default loglevel to be used for subsystems for which no specific
858 .BR charon.filelog.<filename>.<subsystem> " [<default>]"
860 .BR charon.syslog.<facility>.<subsystem>
861 Specifies the loglevel for the given subsystem.
863 .BR charon.filelog.<filename>.append " [yes]"
864 If this option is enabled log entries are appended to the existing file.
866 .BR charon.filelog.<filename>.flush_line " [no]"
867 Enabling this option disables block buffering and enables line buffering.
869 .BR charon.filelog.<filename>.ike_name " [no]"
871 .BR charon.syslog.<facility>.ike_name
872 Prefix each log entry with the connection name and a unique numerical
873 identifier for each IKE_SA.
875 .BR charon.filelog.<filename>.time_format
876 Prefix each log entry with a timestamp. The option accepts a format string as
880 .BR charon.syslog.identifier
881 Global identifier used for an
883 call, prepended to each log message by syslog. If not configured,
885 is not called, so the value will depend on system defaults (often the program
891 Main daemon setup/cleanup/signal handling
894 IKE_SA manager, handling synchronization for IKE_SA access
903 Jobs queueing/processing and thread pool management
906 Configuration management and plugins
909 IPsec/Networking kernel interface
912 IKE network communication
915 Low-level encoding/decoding (ASN.1, X.509 etc.)
918 Packet encoding/decoding encryption/decryption operations
921 libtls library messages
924 libipsec library messages
927 libstrongwan library messages
930 Trusted Network Connect
933 Integrity Measurement Collector
936 Integrity Measurement Verifier
939 Platform Trust Service
946 Very basic auditing logs, (e.g. SA up/SA down)
949 Generic control flow with errors, a good default to see whats going on
952 More detailed debugging control flow
955 Including RAW data dumps in Hex
958 Also include sensitive material in dumps, e.g. keys
964 /var/log/charon.log {
965 time_format = %b %e %T
976 # enable logging to LOG_DAEMON, use defaults
979 # minimalistic IKE auditing logging to LOG_AUTHPRIV
988 .SH JOB PRIORITY MANAGEMENT
989 Some operations in the IKEv2 daemon charon are currently implemented
990 synchronously and blocking. Two examples for such operations are communication
991 with a RADIUS server via EAP-RADIUS, or fetching CRL/OCSP information during
992 certificate chain verification. Under high load conditions, the thread pool may
993 run out of available threads, and some more important jobs, such as liveness
994 checking, may not get executed in time.
996 To prevent thread starvation in such situations job priorities were introduced.
997 The job processor will reserve some threads for higher priority jobs, these
998 threads are not available for lower priority, locking jobs.
1000 Currently 4 priorities have been defined, and they are used in charon as
1004 Priority for long-running dispatcher jobs.
1007 INFORMATIONAL exchanges, as used by liveness checking (DPD).
1010 Everything not HIGH/LOW, including IKE_SA_INIT processing.
1013 IKE_AUTH message processing. RADIUS and CRL fetching block here
1015 Although IKE_SA_INIT processing is computationally expensive, it is explicitly
1016 assigned to the MEDIUM class. This allows charon to do the DH exchange while
1017 other threads are blocked in IKE_AUTH. To prevent the daemon from accepting more
1018 IKE_SA_INIT requests than it can handle, use IKE_SA_INIT DROPPING.
1020 The thread pool processes jobs strictly by priority, meaning it will consume all
1021 higher priority jobs before looking for ones with lower priority. Further, it
1022 reserves threads for certain priorities. A priority class having reserved
1024 threads will always have
1026 threads available for this class (either currently processing a job, or waiting
1029 To ensure that there are always enough threads available for higher priority
1030 tasks, threads must be reserved for each priority class.
1032 .BR libstrongswan.processor.priority_threads.critical " [0]"
1033 Threads reserved for CRITICAL priority class jobs
1035 .BR libstrongswan.processor.priority_threads.high " [0]"
1036 Threads reserved for HIGH priority class jobs
1038 .BR libstrongswan.processor.priority_threads.medium " [0]"
1039 Threads reserved for MEDIUM priority class jobs
1041 .BR libstrongswan.processor.priority_threads.low " [0]"
1042 Threads reserved for LOW priority class jobs
1044 Let's consider the following configuration:
1057 With this configuration, one thread is reserved for HIGH priority tasks. As
1058 currently only liveness checking and stroke message processing is done with
1059 high priority, one or two threads should be sufficient.
1061 The MEDIUM class mostly processes non-blocking jobs. Unless your setup is
1062 experiencing many blocks in locks while accessing shared resources, threads for
1063 one or two times the number of CPU cores is fine.
1065 It is usually not required to reserve threads for CRITICAL jobs. Jobs in this
1066 class rarely return and do not release their thread to the pool.
1068 The remaining threads are available for LOW priority jobs. Reserving threads
1069 does not make sense (until we have an even lower priority).
1071 To see what the threads are actually doing, invoke
1072 .IR "ipsec statusall" .
1073 Under high load, something like this will show up:
1076 worker threads: 2 or 32 idle, 5/1/2/22 working,
1077 job queue: 0/0/1/149, scheduled: 198
1080 From 32 worker threads,
1084 are running CRITICAL priority jobs (dispatching from sockets, etc.).
1086 is currently handling a HIGH priority job. This is actually the thread currently
1087 providing this information via stroke.
1089 are handling MEDIUM priority jobs, likely IKE_SA_INIT or CREATE_CHILD_SA
1092 are handling LOW priority jobs, probably waiting for an EAP-RADIUS response
1093 while processing IKE_AUTH messages.
1095 The job queue load shows how many jobs are queued for each priority, ready for
1096 execution. The single MEDIUM priority job will get executed immediately, as
1097 we have two spare threads reserved for MEDIUM class jobs.
1099 .SH IKE_SA_INIT DROPPING
1100 If a responder receives more connection requests per seconds than it can handle,
1101 it does not make sense to accept more IKE_SA_INIT messages. And if they are
1102 queued but can't get processed in time, an answer might be sent after the
1103 client has already given up and restarted its connection setup. This
1104 additionally increases the load on the responder.
1106 To limit the responder load resulting from new connection attempts, the daemon
1107 can drop IKE_SA_INIT messages just after reception. There are two mechanisms to
1108 decide if this should happen, configured with the following options:
1110 .BR charon.init_limit_half_open " [0]"
1111 Limit based on the number of half open IKE_SAs. Half open IKE_SAs are SAs in
1112 connecting state, but not yet established.
1114 .BR charon.init_limit_job_load " [0]"
1115 Limit based on the number of jobs currently queued for processing (sum over all
1118 The second limit includes load from other jobs, such as rekeying. Choosing a
1119 good value is difficult and depends on the hardware and expected load.
1121 The first limit is simpler to calculate, but includes the load from new
1122 connections only. If your responder is capable of negotiating 100 tunnels/s, you
1123 might set this limit to 1000. The daemon will then drop new connection attempts
1124 if generating a response would require more than 10 seconds. If you are
1125 allowing for a maximum response time of more than 30 seconds, consider adjusting
1126 the timeout for connecting IKE_SAs
1127 .RB ( charon.half_open_timeout ).
1128 A responder, by default, deletes an IKE_SA if the initiator does not establish
1129 it within 30 seconds. Under high load, a higher value might be required.
1132 To do stability testing and performance optimizations, the IKEv2 daemon charon
1133 provides the load-tester plugin. This plugin allows to setup thousands of
1134 tunnels concurrently against the daemon itself or a remote host.
1137 Never enable the load-testing plugin on productive systems. It provides
1138 preconfigured credentials and allows an attacker to authenticate as any user.
1141 .BR charon.plugins.load-tester.child_rekey " [600]"
1142 Seconds to start CHILD_SA rekeying after setup
1144 .BR charon.plugins.load-tester.delay " [0]"
1145 Delay between initiatons for each thread
1147 .BR charon.plugins.load-tester.delete_after_established " [no]"
1148 Delete an IKE_SA as soon as it has been established
1150 .BR charon.plugins.load-tester.dpd_delay " [0]"
1151 DPD delay to use in load test
1153 .BR charon.plugins.load-tester.dynamic_port " [0]"
1154 Base port to be used for requests (each client uses a different port)
1156 .BR charon.plugins.load-tester.eap_password " [default-pwd]"
1157 EAP secret to use in load test
1159 .BR charon.plugins.load-tester.enable " [no]"
1160 Enable the load testing plugin
1162 .BR charon.plugins.load-tester.fake_kernel " [no]"
1163 Fake the kernel interface to allow load-testing against self
1165 .BR charon.plugins.load-tester.ike_rekey " [0]"
1166 Seconds to start IKE_SA rekeying after setup
1168 .BR charon.plugins.load-tester.init_limit " [0]"
1169 Global limit of concurrently established SAs during load test
1171 .BR charon.plugins.load-tester.initiators " [0]"
1172 Number of concurrent initiator threads to use in load test
1174 .BR charon.plugins.load-tester.initiator_auth " [pubkey]"
1175 Authentication method(s) the intiator uses
1177 .BR charon.plugins.load-tester.initiator_id
1178 Initiator ID used in load test
1180 .BR charon.plugins.load-tester.iterations " [1]"
1181 Number of IKE_SAs to initate by each initiator in load test
1183 .BR charon.plugins.load-tester.pool
1184 Provide INTERNAL_IPV4_ADDRs from a named pool
1186 .BR charon.plugins.load-tester.preshared_key " [default-psk]"
1187 Preshared key to use in load test
1189 .BR charon.plugins.load-tester.proposal " [aes128-sha1-modp768]"
1190 IKE proposal to use in load test
1192 .BR charon.plugins.load-tester.remote " [127.0.0.1]"
1193 Address to initiation connections to
1195 .BR charon.plugins.load-tester.responder_auth " [pubkey]"
1196 Authentication method(s) the responder uses
1198 .BR charon.plugins.load-tester.responder_id
1199 Responder ID used in load test
1201 .BR charon.plugins.load-tester.request_virtual_ip " [no]"
1202 Request an INTERNAL_IPV4_ADDR from the server
1204 .BR charon.plugins.load-tester.shutdown_when_complete " [no]"
1205 Shutdown the daemon after all IKE_SAs have been established
1206 .SS Configuration details
1207 For public key authentication, the responder uses the
1208 .B \(dqCN=srv, OU=load-test, O=strongSwan\(dq
1209 identity. For the initiator, each connection attempt uses a different identity
1211 .BR "\(dqCN=c1-r1, OU=load-test, O=strongSwan\(dq" ,
1212 where the first number inidicates the client number, the second the
1213 authentication round (if multiple authentication is used).
1215 For PSK authentication, FQDN identities are used. The server uses
1216 .BR srv.strongswan.org ,
1217 the client uses an identity in the form
1218 .BR c1-r1.strongswan.org .
1220 For EAP authentication, the client uses a NAI in the form
1221 .BR 100000000010001@strongswan.org .
1223 To configure multiple authentication, concatenate multiple methods using, e.g.
1225 initiator_auth = pubkey|psk|eap-md5|eap-aka
1228 The responder uses a hardcoded certificate based on a 1024-bit RSA key.
1229 This certificate additionally serves as CA certificate. A peer uses the same
1230 private key, but generates client certificates on demand signed by the CA
1231 certificate. Install the Responder/CA certificate on the remote host to
1232 authenticate all clients.
1234 To speed up testing, the load tester plugin implements a special Diffie-Hellman
1235 implementation called modpnull. By setting
1237 proposal = aes128-sha1-modpnull
1239 this wicked fast DH implementation is used. It does not provide any security
1240 at all, but allows to run tests without DH calculation overhead.
1243 In the simplest case, the daemon initiates IKE_SAs against itself using the
1244 loopback interface. This will actually establish double the number of IKE_SAs,
1245 as the daemon is initiator and responder for each IKE_SA at the same time.
1246 Installation of IPsec SAs would fails, as each SA gets installed twice. To
1247 simulate the correct behavior, a fake kernel interface can be enabled which does
1248 not install the IPsec SAs at the kernel level.
1250 A simple loopback configuration might look like this:
1254 # create new IKE_SAs for each CHILD_SA to simulate
1257 # turn off denial of service protection
1264 # use 4 threads to initiate connections
1267 # each thread initiates 1000 connections
1269 # delay each initiation in each thread by 20ms
1271 # enable the fake kernel interface to
1272 # avoid SA conflicts
1279 This will initiate 4000 IKE_SAs within 20 seconds. You may increase the delay
1280 value if your box can not handle that much load, or decrease it to put more
1281 load on it. If the daemon starts retransmitting messages your box probably can
1282 not handle all connection attempts.
1284 The plugin also allows to test against a remote host. This might help to test
1285 against a real world configuration. A connection setup to do stress testing of
1286 a gateway might look like this:
1296 # 10000 connections, ten in parallel
1299 # use a delay of 100ms, overall time is:
1300 # iterations * delay = 100s
1302 # address of the gateway
1304 # IKE-proposal to use
1305 proposal = aes128-sha1-modp1024
1306 # use faster PSK authentication instead
1308 initiator_auth = psk
1309 responder_auth = psk
1310 # request a virtual IP using configuration
1312 request_virtual_ip = yes
1313 # enable CHILD_SA every 60s
1320 .SH IKEv2 RETRANSMISSION
1321 Retransmission timeouts in the IKEv2 daemon charon can be configured globally
1322 using the three keys listed below:
1326 .BR charon.retransmit_base " [1.8]"
1327 .BR charon.retransmit_timeout " [4.0]"
1328 .BR charon.retransmit_tries " [5]"
1332 The following algorithm is used to calculate the timeout:
1335 relative timeout = retransmit_timeout * retransmit_base ^ (n-1)
1340 is the current retransmission count.
1342 Using the default values, packets are retransmitted in:
1348 Retransmission Relative Timeout Absolute Timeout
1358 /etc/strongswan.conf
1361 ipsec.conf(5), ipsec.secrets(5), ipsec(8)
1364 .UR http://www.strongswan.org
1367 by Tobias Brunner, Andreas Steffen and Martin Willi.