1 .TH IPSEC.CONF 5 "2012-06-26" "@PACKAGE_VERSION@" "strongSwan"
3 ipsec.conf \- IPsec configuration and connections
8 specifies most configuration and control information for the
9 strongSwan IPsec subsystem.
10 The major exception is secrets for authentication;
12 .IR ipsec.secrets (5).
13 Its contents are not security-sensitive.
15 The file is a text file, consisting of one or more
17 White space followed by
19 followed by anything to the end of the line
20 is a comment and is ignored,
21 as are empty lines which are not within a section.
25 and a file name, separated by white space,
26 is replaced by the contents of that file,
27 preceded and followed by empty lines.
28 If the file name is not a full pathname,
29 it is considered to be relative to the directory containing the
31 Such inclusions can be nested.
32 Only a single filename may be supplied, and it may not contain white space,
33 but it may include shell wildcards (see
40 The intention of the include facility is mostly to permit keeping
41 information on connections, or sets of connections,
42 separate from the main configuration file.
43 This permits such connection descriptions to be changed,
44 copied to the other security gateways involved, etc.,
45 without having to constantly extract them from the configuration
46 file and then insert them back into it.
49 parameter (described below) which permits splitting a single logical
50 section (e.g. a connection description) into several actual sections.
53 begins with a line of the form:
60 indicates what type of section follows, and
62 is an arbitrary name which distinguishes the section from others
64 Names must start with a letter and may contain only
65 letters, digits, periods, underscores, and hyphens.
66 All subsequent non-empty lines
67 which begin with white space are part of the section;
68 comments within a section must begin with white space too.
69 There may be only one section of a given type with a given name.
71 Lines within the section are generally of the form
73 \ \ \ \ \ \fIparameter\fB=\fIvalue\fR
75 (note the mandatory preceding white space).
76 There can be white space on either side of the
78 Parameter names follow the same syntax as section names,
79 and are specific to a section type.
80 Unless otherwise explicitly specified,
81 no parameter name may appear more than once in a section.
85 stands for the system default value (if any) of the parameter,
86 i.e. it is roughly equivalent to omitting the parameter line entirely.
89 may contain white space only if the entire
91 is enclosed in double quotes (\fB"\fR);
94 cannot itself contain a double quote,
95 nor may it be continued across more than one line.
97 Numeric values are specified to be either an ``integer''
98 (a sequence of digits) or a ``decimal number''
99 (sequence of digits optionally followed by `.' and another sequence of digits).
101 There is currently one parameter which is available in any type of
105 the value is a section name;
106 the parameters of that section are appended to this section,
107 as if they had been written as part of it.
108 The specified section must exist, must follow the current one,
109 and must have the same section type.
110 (Nesting is permitted,
111 and there may be more than one
114 although it is forbidden to append the same section more than once.)
118 specifies defaults for sections of the same type.
119 For each parameter in it,
120 any section of that type which does not have a parameter of the same name
121 gets a copy of the one from the
124 There may be multiple
126 sections of a given type,
127 but only one default may be supplied for any specific parameter name,
130 sections of a given type must precede all non-\c
132 sections of that type.
134 sections may not contain the
138 Currently there are three types of sections:
141 section specifies general configuration information for IPsec, a
143 section specifies an IPsec connection, while a
145 section specifies special properties of a certification authority.
150 .IR "connection specification" ,
151 defining a network connection to be made using IPsec.
152 The name given is arbitrary, and is used to identify the connection.
153 Here's a simple example:
161 leftsubnet=10.1.0.0/16
163 rightsubnet=10.1.0.0/16
169 A note on terminology: There are two kinds of communications going on:
170 transmission of user IP packets, and gateway-to-gateway negotiations for
171 keying, rekeying, and general control.
172 The path to control the connection is called 'ISAKMP SA' in IKEv1
173 and 'IKE SA' in the IKEv2 protocol. That what is being negotiated, the kernel
174 level data path, is called 'IPsec SA' or 'Child SA'.
175 strongSwan previously used two separate keying daemons, \fIpluto\fP and
176 \fIcharon\fP. This manual does not discuss \fIpluto\fP options anymore, but
177 only \fIcharon\fP that since strongSwan 5.0 supports both IKEv1 and IKEv2.
179 To avoid trivial editing of the configuration file to suit it to each system
180 involved in a connection,
181 connection specifications are written in terms of
186 rather than in terms of local and remote.
187 Which participant is considered
192 for every connection description an attempt is made to figure out whether
193 the local endpoint should act as the
197 endpoint. This is done by matching the IP addresses defined for both endpoints
198 with the IP addresses assigned to local network interfaces. If a match is found
199 then the role (left or right) that matches is going to be considered local.
200 If no match is found during startup,
203 This permits using identical connection specifications on both ends.
204 There are cases where there is no symmetry; a good convention is to
207 for the local side and
209 for the remote side (the first letters are a good mnemonic).
211 Many of the parameters relate to one participant or the other;
214 are listed here, but every parameter whose name begins with
219 whose description is the same but with
225 Parameters are optional unless marked '(required)'.
226 .SS "CONN PARAMETERS"
227 Unless otherwise noted, for a connection to work,
228 in general it is necessary for the two ends to agree exactly
229 on the values of these parameters.
231 .BR aaa_identity " = <id>"
232 defines the identity of the AAA backend used during IKEv2 EAP authentication.
233 This is required if the EAP client uses a method that verifies the server
234 identity (such as EAP-TLS), but it does not match the IKEv2 gateway identity.
236 .BR aggressive " = yes | " no
237 whether to use IKEv1 Aggressive or Main Mode (the default).
239 .BR ah " = <cipher suites>"
240 comma-separated list of AH algorithms to be used for the connection, e.g.
241 .BR sha1-sha256-modp1024 .
243 .BR integrity[-dhgroup] .
244 For IKEv2, multiple algorithms (separated by -) of the same type can be included
245 in a single proposal. IKEv1 only includes the first algorithm in a proposal.
250 keyword may be used, AH+ESP bundles are not supported.
252 There is no default, by default ESP is used.
253 The daemon adds its extensive default proposal to the configured value. To
254 restrict it to the configured proposal an
257 can be added at the end.
261 is specified, CHILD_SA/Quick Mode setup and rekeying include a separate
262 Diffie-Hellman exchange.
265 includes conn section
268 .BR auth " = <value>"
271 IKEv1 daemon to use AH integrity protection for ESP encrypted packets, but is
272 not supported in charon. The
274 keyword specifies algorithms to use for integrity protection with AH, but
275 without encryption. AH+ESP bundles are not supported.
277 .BR authby " = " pubkey " | rsasig | ecdsasig | psk | secret | never | xauthpsk | xauthrsasig"
278 how the two security gateways should authenticate each other;
279 acceptable values are
283 for pre-shared secrets,
285 (the default) for public key signatures as well as the synonyms
287 for RSA digital signatures and
289 for Elliptic Curve DSA signatures.
291 can be used if negotiation is never to be attempted or accepted (useful for
293 Digital signatures are superior in every way to shared secrets.
294 IKEv1 additionally supports the values
298 that will enable eXtended AUTHentication (XAUTH) in addition to IKEv1 main mode
299 based on shared secrets or digital RSA signatures, respectively.
300 This parameter is deprecated, as two peers do not need to agree on an
301 authentication method in IKEv2. Use the
303 parameter instead to define authentication methods.
305 .BR auto " = " ignore " | add | route | start"
306 what operation, if any, should be done automatically at IPsec startup;
307 currently-accepted values are
315 loads a connection without starting it.
317 loads a connection and installs kernel traps. If traffic is detected between
321 a connection is established.
323 loads a connection and brings it up immediately.
325 ignores the connection. This is equal to deleting a connection from the config
327 Relevant only locally, other end need not agree on it.
329 .BR closeaction " = " none " | clear | hold | restart"
330 defines the action to take if the remote peer unexpectedly closes a CHILD_SA
333 for meaning of values).
335 .B closeaction should not be
336 used if the peer uses reauthentication or uniquids checking, as these events
337 might trigger the defined action when not desired.
339 .BR compress " = yes | " no
340 whether IPComp compression of content is proposed on the connection
341 (link-level compression does not work on encrypted data,
342 so to be effective, compression must be done \fIbefore\fR encryption);
343 acceptable values are
347 (the default). A value of
349 causes the daemon to propose both compressed and uncompressed,
350 and prefer compressed.
353 prevents the daemon from proposing or accepting compression.
355 .BR dpdaction " = " none " | clear | hold | restart"
356 controls the use of the Dead Peer Detection protocol (DPD, RFC 3706) where
357 R_U_THERE notification messages (IKEv1) or empty INFORMATIONAL messages (IKEv2)
358 are periodically sent in order to check the
359 liveliness of the IPsec peer. The values
364 all activate DPD. If no activity is detected, all connections with a dead peer
365 are stopped and unrouted
367 put in the hold state
373 which disables the active sending of DPD messages.
375 .BR dpddelay " = " 30s " | <time>"
376 defines the period time interval with which R_U_THERE messages/INFORMATIONAL
377 exchanges are sent to the peer. These are only sent if no other traffic is
378 received. In IKEv2, a value of 0 sends no additional INFORMATIONAL
379 messages and uses only standard messages (such as those to rekey) to detect
382 .BR dpdtimeout " = " 150s " | <time>
383 defines the timeout interval, after which all connections to a peer are deleted
384 in case of inactivity. This only applies to IKEv1, in IKEv2 the default
385 retransmission timeout applies, as every exchange is used to detect dead peers.
387 .BR inactivity " = <time>"
388 defines the timeout interval, after which a CHILD_SA is closed if it did
389 not send or receive any traffic. The inactivity counter is reset during CHILD_SA
390 rekeying. This means that the inactivity timeout must be smaller than the
391 rekeying interval to have any effect.
393 .BR eap_identity " = <id>"
394 defines the identity the client uses to reply to an EAP Identity request.
395 If defined on the EAP server, the defined identity will be used as peer
396 identity during EAP authentication. The special value
398 uses the EAP Identity method to ask the client for an EAP identity. If not
399 defined, the IKEv2 identity will be used as EAP identity.
401 .BR esp " = <cipher suites>"
402 comma-separated list of ESP encryption/authentication algorithms to be used
403 for the connection, e.g.
406 .BR encryption-integrity[-dhgroup][-esnmode] .
407 For IKEv2, multiple algorithms (separated by -) of the same type can be included
408 in a single proposal. IKEv1 only includes the first algorithm in a proposal.
413 keyword may be used, AH+ESP bundles are not supported.
416 .BR aes128-sha1,3des-sha1 .
417 The daemon adds its extensive default proposal to this default
418 or the configured value. To restrict it to the configured proposal an
421 can be added at the end.
424 As a responder the daemon accepts the first supported proposal received from
425 the peer. In order to restrict a responder to only accept specific cipher
426 suites, the strict flag
428 exclamation mark) can be used, e.g: aes256-sha512-modp4096!
432 is specified, CHILD_SA/Quick Mode setup and rekeying include a separate
433 Diffie-Hellman exchange. Valid values for
439 Specifying both negotiates Extended Sequence Number support with the peer,
443 .BR forceencaps " = yes | " no
444 force UDP encapsulation for ESP packets even if no NAT situation is detected.
445 This may help to surmount restrictive firewalls. In order to force the peer to
446 encapsulate packets, NAT detection payloads are faked.
448 .BR fragmentation " = yes | force | " no
449 whether to use IKE fragmentation (proprietary IKEv1 extension). Acceptable
455 (the default). Fragmented messages sent by a peer are always accepted
456 irrespective of the value of this option. If set to
458 and the peer supports it, larger IKE messages will be sent in fragments.
461 the initial IKE message will already be fragmented if required.
463 .BR ike " = <cipher suites>"
464 comma-separated list of IKE/ISAKMP SA encryption/authentication algorithms
466 .BR aes128-sha1-modp2048 .
468 .BR encryption-integrity[-prf]-dhgroup .
469 If no PRF is given, the algorithms defined for integrity are used for the PRF.
470 The prf keywords are the same as the integrity algorithms, but have a
478 In IKEv2, multiple algorithms and proposals may be included, such as
479 .BR aes128-aes256-sha1-modp1536-modp2048,3des-sha1-md5-modp1024 .
482 .BR aes128-sha1-modp2048,3des-sha1-modp1536 .
483 The daemon adds its extensive default proposal to this
484 default or the configured value. To restrict it to the configured proposal an
487 can be added at the end.
490 As a responder the daemon accepts the first supported proposal received from
491 the peer. In order to restrict a responder to only accept specific cipher
492 suites, the strict flag
494 exclamation mark) can be used, e.g:
495 .BR aes256-sha512-modp4096!
497 .BR ikedscp " = " 000000 " | <DSCP field>"
498 Differentiated Services Field Codepoint to set on outgoing IKE packets sent
499 from this connection. The value is a six digit binary encoded string defining
500 the Codepoint to set, as defined in RFC 2474.
502 .BR ikelifetime " = " 3h " | <time>"
503 how long the keying channel of a connection (ISAKMP or IKE SA)
504 should last before being renegotiated. Also see EXPIRY/REKEY below.
506 .BR installpolicy " = " yes " | no"
507 decides whether IPsec policies are installed in the kernel by the charon daemon
508 for a given connection. Allows peaceful cooperation e.g. with
509 the Mobile IPv6 daemon mip6d who wants to control the kernel policies.
510 Acceptable values are
515 .BR keyexchange " = " ike " | ikev1 | ikev2"
516 which key exchange protocol should be used to initiate the connection.
517 Connections marked with
519 use IKEv2 when initiating, but accept any protocol version when responding.
521 .BR keyingtries " = " 3 " | <number> | %forever"
522 how many attempts (a whole number or \fB%forever\fP) should be made to
523 negotiate a connection, or a replacement for one, before giving up
526 The value \fB%forever\fP
527 means 'never give up'.
528 Relevant only locally, other end need not agree on it.
534 .BR left " = <ip address> | <fqdn> | " %any " | <range> | <subnet> "
535 The IP address of the left participant's public-network interface
536 or one of several magic values.
539 (the default) for the local endpoint signifies an address to be filled in (by
540 automatic keying) during negotiation. If the local peer initiates the
541 connection setup the routing table will be queried to determine the correct
543 In case the local peer is responding to a connection setup then any IP address
544 that is assigned to a local interface will be accepted.
548 in front of a fully-qualified domain name or an IP address will implicitly set
549 .BR leftallowany =yes.
553 is used for the remote endpoint it literally means any IP address.
555 To limit the connection to a specific range of hosts, a range (
556 .BR 10.1.0.0-10.2.255.255
559 ) can be specified, and multiple addresses, ranges and subnets can be separated
560 by commas. While one can freely combine these items, to initiate the connection
561 at least one non-range/subnet is required.
563 Please note that with the usage of wildcards multiple connection descriptions
564 might match a given incoming connection attempt. The most specific description
565 is used in that case.
567 .BR leftallowany " = yes | " no
572 although a concrete IP address or domain name has been assigned.
574 .BR leftauth " = <auth method>"
575 Authentication method to use locally (left) or require from the remote (right)
577 Acceptable values are
579 for public key authentication (RSA/ECDSA),
581 for pre-shared key authentication,
583 to (require the) use of the Extensible Authentication Protocol in IKEv2, and
585 for IKEv1 eXtended Authentication.
586 To require a trustchain public key strength for the remote side, specify the
587 key type followed by the minimum strength in bits (for example
590 .BR rsa-2048-ecdsa-256 ).
591 To limit the acceptable set of hashing algorithms for trustchain validation,
592 append hash algorithms to
594 or a key strength definition (for example
595 .BR pubkey-sha1-sha256
597 .BR rsa-2048-ecdsa-256-sha256-sha384-sha512 ).
600 an optional EAP method can be appended. Currently defined methods are
612 Alternatively, IANA assigned EAP method numbers are accepted. Vendor specific
613 EAP methods are defined in the form
615 .RB "(e.g. " eap-7-12345 ).
618 an XAuth authentication backend can be specified, such as
624 Hybrid authentication is used. For traditional XAuth authentication, define
628 .BR leftauth2 " = <auth method>"
631 but defines an additional authentication exchange. In IKEv1, only XAuth can be
632 used in the second authentication round. IKEv2 supports multiple complete
633 authentication rounds using "Multiple Authentication Exchanges" defined
634 in RFC 4739. This allows, for example, separated authentication
637 .BR leftca " = <issuer dn> | %same"
638 the distinguished name of a certificate authority which is required to
639 lie in the trust path going from the left participant's certificate up
640 to the root certification authority.
642 means that the value configured for the right participant should be reused.
644 .BR leftca2 " = <issuer dn> | %same"
647 but for the second authentication round (IKEv2 only).
649 .BR leftcert " = <path>"
650 the path to the left participant's X.509 certificate. The file can be encoded
651 either in PEM or DER format. OpenPGP certificates are supported as well.
652 Both absolute paths or paths relative to \fI/etc/ipsec.d/certs\fP
653 are accepted. By default
657 to the distinguished name of the certificate's subject.
658 The left participant's ID can be overridden by specifying a
660 value which must be certified by the certificate, though.
663 .B %smartcard[<slot nr>[@<module>]]:<keyid>
664 defines a specific certificate to load from a PKCS#11 backend for this
665 connection. See ipsec.secrets(5) for details about smartcard definitions.
667 is required only if selecting the certificate with
669 is not sufficient, for example if multiple certificates use the same subject.
671 Multiple certificate paths or PKCS#11 backends can be specified in a comma
672 separated list. The daemon chooses the certificate based on the received
673 certificate requests if possible before enforcing the first.
675 .BR leftcert2 " = <path>"
678 but for the second authentication round (IKEv2 only).
680 .BR leftcertpolicy " = <OIDs>"
681 Comma separated list of certificate policy OIDs the peer's certificate must
683 OIDs are specified using the numerical dotted representation.
685 .BR leftdns " = <servers>"
686 Comma separated list of DNS server addresses to exchange as configuration
687 attributes. On the initiator, a server is a fixed IPv4/IPv6 address, or
688 .BR %config4 / %config6
689 to request attributes without an address. On the responder,
690 only fixed IPv4/IPv6 addresses are allowed and define DNS servers assigned
693 .BR leftfirewall " = yes | " no
694 whether the left participant is doing forwarding-firewalling
695 (including masquerading) using iptables for traffic from \fIleftsubnet\fR,
696 which should be turned off (for traffic to the other subnet)
697 once the connection is established;
698 acceptable values are
703 May not be used in the same connection description with
705 Implemented as a parameter to the default \fBipsec _updown\fR script.
707 Relevant only locally, other end need not agree on it.
709 If one or both security gateways are doing forwarding firewalling
710 (possibly including masquerading),
711 and this is specified using the firewall parameters,
712 tunnels established with IPsec are exempted from it
713 so that packets can flow unchanged through the tunnels.
714 (This means that all subnets connected in this manner must have
715 distinct, non-overlapping subnet address blocks.)
716 This is done by the default \fBipsec _updown\fR script.
718 In situations calling for more control,
719 it may be preferable for the user to supply his own
722 which makes the appropriate adjustments for his system.
724 .BR leftgroups " = <group list>"
725 a comma separated list of group names. If the
727 parameter is present then the peer must be a member of at least one
728 of the groups defined by the parameter.
730 .BR leftgroups2 " = <group list>"
733 but for the second authentication round defined with
736 .BR lefthostaccess " = yes | " no
737 inserts a pair of INPUT and OUTPUT iptables rules using the default
738 \fBipsec _updown\fR script, thus allowing access to the host itself
739 in the case where the host's internal interface is part of the
740 negotiated client subnet.
741 Acceptable values are
748 how the left participant should be identified for authentication;
751 or the subject of the certificate configured with
755 is configured the identity has to be confirmed by the certificate.
757 Can be an IP address, a fully-qualified domain name, an email address or a
758 Distinguished Name for which the ID type is determined automatically and the
759 string is converted to the appropriate encoding. To enforce a specific identity
760 type, a prefix may be used, followed by a colon (:). If the number sign (#)
761 follows the colon, the remaining data is interpreted as hex encoding, otherwise
762 the string is used as-is as the identification data. Note that this implies
763 that no conversion is performed for non-string identities. For example,
764 \fIipv4:10.0.0.1\fP does not create a valid ID_IPV4_ADDR IKE identity, as it
765 does not get converted to binary 0x0a000001. Instead, one could use
766 \fIipv4:#0a000001\fP to get a valid identity, but just using the implicit type
767 with automatic conversion is usually simpler. The same applies to the ASN1
768 encoded types. The following prefixes are known:
780 Custom type prefixes may be specified by surrounding the numerical type value by
787 in front of the identity prevents the daemon from sending IDr in its IKE_AUTH
788 request and will allow it to verify the configured identity against the subject
789 and subjectAltNames contained in the responder's certificate (otherwise it is
790 only compared with the IDr returned by the responder). The IDr sent by the
791 initiator might otherwise prevent the responder from finding a config if it
792 has configured a different value for
795 .BR leftid2 " = <id>"
796 identity to use for a second authentication for the left participant
797 (IKEv2 only); defaults to
800 .BR leftikeport " = <port>"
801 UDP port the left participant uses for IKE communication.
802 If unspecified, port 500 is used with the port floating
803 to 4500 if a NAT is detected or MOBIKE is enabled. Specifying a local IKE port
804 different from the default additionally requires a socket implementation that
805 listens on this port.
807 .BR leftprotoport " = <protocol>/<port>"
808 restrict the traffic selector to a single protocol and/or port. This option
809 is now deprecated, protocol/port information can be defined for each subnet
813 .BR leftsigkey " = <raw public key> | <path to public key>"
814 the left participant's public key for public key signature authentication,
815 in PKCS#1 format using hex (0x prefix) or base64 (0s prefix) encoding. With the
820 prefix in front of 0x or 0s, the public key is expected to be in either
821 the RFC 3110 (not the full RR, only RSA key part) or RFC 4253 public key format,
823 Also accepted is the path to a file containing the public key in PEM, DER or SSH
824 encoding. Both absolute paths or paths relative to \fI/etc/ipsec.d/certs\fP
827 .BR leftsendcert " = never | no | " ifasked " | always | yes"
836 .BR ifasked " (the default),"
837 the latter meaning that the peer must send a certificate request payload in
838 order to get a certificate in return.
840 .BR leftsourceip " = %config4 | %config6 | <ip address>"
841 Comma separated list of internal source IPs to use in a tunnel, also known as
842 virtual IP. If the value is one of the synonyms
848 an address (from the tunnel address family) is requested from the peer. With
852 an address of the given address family will be requested explicitly.
853 If an IP address is configured, it will be requested from the responder,
854 which is free to respond with a different address.
856 .BR rightsourceip " = %config | <network>/<netmask> | %poolname"
857 Comma separated list of internal source IPs to use in a tunnel for the remote
858 peer. If the value is
860 on the responder side, the initiator must propose an address which is then
861 echoed back. Also supported are address pools expressed as
862 \fInetwork\fB/\fInetmask\fR
863 or the use of an external IP address pool using %\fIpoolname\fR,
864 where \fIpoolname\fR is the name of the IP address pool used for the lookup.
866 .BR leftsubnet " = <ip subnet>[[<proto/port>]][,...]"
867 private subnet behind the left participant, expressed as
868 \fInetwork\fB/\fInetmask\fR;
869 if omitted, essentially assumed to be \fIleft\fB/32\fR,
870 signifying that the left end of the connection goes to the left participant
871 only. Configured subnets of the peers may differ, the protocol narrows it to
872 the greatest common subnet. In IKEv1, this may lead to problems with other
873 implementations, make sure to configure identical subnets in such
874 configurations. IKEv2 supports multiple subnets separated by commas. IKEv1 only
875 interprets the first subnet of such a definition, unless the Cisco Unity
876 extension plugin is enabled.
878 The optional part after each subnet enclosed in square brackets specifies a
879 protocol/port to restrict the selector for that subnet.
882 .BR leftsubnet=10.0.0.1[tcp/http],10.0.0.2[6/80] " or"
883 .BR leftsubnet=fec1::1[udp],10.0.0.0/16[/53] .
884 Instead of omitting either value
886 can be used to the same effect, e.g.
887 .BR leftsubnet=fec1::1[udp/%any],10.0.0.0/16[%any/53] .
893 the port is interpreted as ICMP message type if it is less than 256 or as type
894 and code if it is greater or equal to 256, with the type in the most significant
895 8 bits and the code in the least significant 8 bits.
897 The port value can alternatively take the value
899 for RFC 4301 OPAQUE selectors, or a numerical range in the form
901 None of the kernel backends currently supports opaque or port ranges and uses
903 for policy installation instead.
905 Instead of specifying a subnet,
907 can be used to replace it with the IKE address, having the same effect
912 can be used to define multiple dynamic selectors, each having a potentially
913 different protocol/port definition.
916 .BR leftupdown " = <path>"
917 what ``updown'' script to run to adjust routing and/or firewalling
918 when the status of the connection
920 .BR "ipsec _updown" ).
921 May include positional parameters separated by white space
922 (although this requires enclosing the whole string in quotes);
923 including shell metacharacters is unwise.
924 Relevant only locally, other end need not agree on it. Charon uses the updown
925 script to insert firewall rules only, since routing has been implemented
926 directly into the daemon.
928 .BR lifebytes " = <number>"
929 the number of bytes transmitted over an IPsec SA before it expires.
931 .BR lifepackets " = <number>"
932 the number of packets transmitted over an IPsec SA before it expires.
934 .BR lifetime " = " 1h " | <time>"
935 how long a particular instance of a connection
936 (a set of encryption/authentication keys for user packets) should last,
937 from successful negotiation to expiry;
938 acceptable values are an integer optionally followed by
941 or a decimal number followed by
947 in minutes, hours, or days respectively)
952 Normally, the connection is renegotiated (via the keying channel)
953 before it expires (see
955 The two ends need not exactly agree on
957 although if they do not,
958 there will be some clutter of superseded connections on the end
959 which thinks the lifetime is longer. Also see EXPIRY/REKEY below.
961 .BR marginbytes " = <number>"
962 how many bytes before IPsec SA expiry (see
964 should attempts to negotiate a replacement begin.
966 .BR marginpackets " = <number>"
967 how many packets before IPsec SA expiry (see
969 should attempts to negotiate a replacement begin.
971 .BR margintime " = " 9m " | <time>"
972 how long before connection expiry or keying-channel expiry
974 negotiate a replacement
975 begin; acceptable values as for
979 Relevant only locally, other end need not agree on it. Also see EXPIRY/REKEY
982 .BR mark " = <value>[/<mask>]"
983 sets an XFRM mark in the inbound and outbound
984 IPsec SAs and policies. If the mask is missing then a default
989 .BR mark_in " = <value>[/<mask>]"
990 sets an XFRM mark in the inbound IPsec SA and
991 policy. If the mask is missing then a default mask of
995 .BR mark_out " = <value>[/<mask>]"
996 sets an XFRM mark in the outbound IPsec SA and
997 policy. If the mask is missing then a default mask of
1001 .BR mobike " = " yes " | no"
1002 enables the IKEv2 MOBIKE protocol defined by RFC 4555. Accepted values are
1008 the charon daemon will not actively propose MOBIKE as initiator and
1009 ignore the MOBIKE_SUPPORTED notify as responder.
1011 .BR modeconfig " = push | " pull
1012 defines which mode is used to assign a virtual IP.
1018 Push mode is currently not supported with IKEv2.
1020 .BR reauth " = " yes " | no"
1021 whether rekeying of an IKE_SA should also reauthenticate the peer. In IKEv1,
1022 reauthentication is always done. In IKEv2, a value of
1024 rekeys without uninstalling the IPsec SAs, a value of
1026 (the default) creates a new IKE_SA from scratch and tries to recreate
1029 .BR rekey " = " yes " | no"
1030 whether a connection should be renegotiated when it is about to expire;
1031 acceptable values are
1036 The two ends need not agree, but while a value of
1038 prevents charon from requesting renegotiation,
1039 it does not prevent responding to renegotiation requested from the other end,
1042 will be largely ineffective unless both ends agree on it. Also see
1045 .BR rekeyfuzz " = " 100% " | <percentage>"
1046 maximum percentage by which
1051 should be randomly increased to randomize rekeying intervals
1052 (important for hosts with many connections);
1053 acceptable values are an integer,
1054 which may exceed 100,
1060 after this random increase,
1063 (where TYPE is one of
1070 will suppress randomization.
1071 Relevant only locally, other end need not agree on it. Also see EXPIRY/REKEY
1078 .BR replay_window " = " \-1 " | <number>"
1079 The IPsec replay window size for this connection. With the default of \-1
1080 the value configured with
1081 .I charon.replay_window
1083 .BR strongswan.conf (5)
1084 is used. Larger values than 32 are supported using the Netlink backend only,
1085 a value of 0 disables IPsec replay protection.
1087 .BR reqid " = <number>"
1088 sets the reqid for a given connection to a pre-configured fixed value.
1090 .BR tfc " = <value>"
1091 number of bytes to pad ESP payload data to. Traffic Flow Confidentiality
1092 is currently supported in IKEv2 and applies to outgoing packets only. The
1095 fills up ESP packets with padding to have the size of the MTU.
1097 .BR type " = " tunnel " | transport | transport_proxy | passthrough | drop"
1098 the type of the connection; currently the accepted values
1102 signifying a host-to-host, host-to-subnet, or subnet-to-subnet tunnel;
1104 signifying host-to-host transport mode;
1105 .BR transport_proxy ,
1106 signifying the special Mobile IPv6 transport proxy mode;
1108 signifying that no IPsec processing should be done at all;
1110 signifying that packets should be discarded.
1112 .BR xauth " = " client " | server"
1113 specifies the role in the XAuth protocol if activated by
1116 .B authby=xauthrsasig.
1123 .BR xauth_identity " = <id>"
1124 defines the identity/username the client uses to reply to an XAuth request.
1125 If not defined, the IKEv1 identity will be used as XAuth identity.
1127 .SS "CONN PARAMETERS: IKEv2 MEDIATION EXTENSION"
1128 The following parameters are relevant to IKEv2 Mediation Extension
1131 .BR mediation " = yes | " no
1132 whether this connection is a mediation connection, ie. whether this
1133 connection is used to mediate other connections. Mediation connections
1134 create no child SA. Acceptable values are
1139 .BR mediated_by " = <name>"
1140 the name of the connection to mediate this connection through. If given,
1141 the connection will be mediated through the named mediation connection.
1142 The mediation connection must set
1145 .BR me_peerid " = <id>"
1146 ID as which the peer is known to the mediation server, ie. which the other
1147 end of this connection uses as its
1149 on its connection to the mediation server. This is the ID we request the
1150 mediation server to mediate us with. If
1154 of this connection will be used as peer ID.
1157 These are optional sections that can be used to assign special
1158 parameters to a Certification Authority (CA). Because the daemons
1159 automatically import CA certificates from \fI/etc/ipsec.d/cacerts\fP,
1160 there is no need to explicitly add them with a CA section, unless you
1161 want to assign special parameters (like a CRL) to a CA.
1163 .BR also " = <name>"
1167 .BR auto " = " ignore " | add"
1168 currently can have either the value
1173 .BR cacert " = <path>"
1174 defines a path to the CA certificate either relative to
1175 \fI/etc/ipsec.d/cacerts\fP or as an absolute path.
1178 .B %smartcard[<slot nr>[@<module>]]:<keyid>
1179 defines a specific CA certificate to load from a PKCS#11 backend for this CA.
1180 See ipsec.secrets(5) for details about smartcard definitions.
1182 .BR crluri " = <uri>"
1183 defines a CRL distribution point (ldap, http, or file URI)
1189 .BR crluri2 " = <uri>"
1190 defines an alternative CRL distribution point (ldap, http, or file URI)
1193 .BR ocspuri " = <uri>"
1194 defines an OCSP URI.
1200 .BR ocspuri2 " = <uri>"
1201 defines an alternative OCSP URI.
1203 .BR certuribase " = <uri>"
1204 defines the base URI for the Hash and URL feature supported by IKEv2.
1205 Instead of exchanging complete certificates, IKEv2 allows one to send an URI
1206 that resolves to the DER encoded certificate. The certificate URIs are built
1207 by appending the SHA1 hash of the DER encoded certificates to this base URI.
1208 .SH "CONFIG SECTIONS"
1209 At present, the only
1211 section known to the IPsec software is the one named
1213 which contains information used when the software is being started.
1214 The currently-accepted
1221 .BR cachecrls " = yes | " no
1222 if enabled, certificate revocation lists (CRLs) fetched via HTTP or LDAP will
1224 .I /etc/ipsec.d/crls/
1225 under a unique file name derived from the certification authority's public key.
1227 .BR charondebug " = <debug list>"
1228 how much charon debugging output should be logged.
1229 A comma separated list containing type/level-pairs may
1231 .B dmn 3, ike 1, net -1.
1232 Acceptable values for types are
1233 .B dmn, mgr, ike, chd, job, cfg, knl, net, asn, enc, lib, esp, tls,
1234 .B tnc, imc, imv, pts
1235 and the level is one of
1236 .B -1, 0, 1, 2, 3, 4
1237 (for silent, audit, control, controlmore, raw, private). By default, the level
1240 for all types. For more flexibility see LOGGER CONFIGURATION in
1241 .IR strongswan.conf (5).
1243 .BR strictcrlpolicy " = yes | ifuri | " no
1244 defines if a fresh CRL must be available in order for the peer authentication
1245 based on RSA signatures to succeed.
1246 IKEv2 additionally recognizes
1250 if at least one CRL URI is defined and to
1254 .BR uniqueids " = " yes " | no | never | replace | keep"
1255 whether a particular participant ID should be kept unique,
1256 with any new IKE_SA using an ID deemed to replace all old ones using that ID;
1257 acceptable values are
1263 Participant IDs normally \fIare\fR unique, so a new IKE_SA using the same ID is
1264 almost invariably intended to replace an old one. The difference between
1268 is that the daemon will replace old IKE_SAs when receiving an INITIAL_CONTACT
1269 notify if the option is
1271 but will ignore these notifies if
1274 The daemon also accepts the value
1276 which is identical to
1280 to reject new IKE_SA setups and keep the duplicate established earlier.
1283 The IKE SAs and IPsec SAs negotiated by the daemon can be configured to expire
1284 after a specific amount of time. For IPsec SAs this can also happen after a
1285 specified number of transmitted packets or transmitted bytes. The following
1286 settings can be used to configure this:
1288 l r l r,- - - -,lB s lB s,a r a r.
1289 Setting Default Setting Default
1291 ikelifetime 3h lifebytes -
1296 IKE SAs as well as IPsec SAs can be rekeyed before they expire. This can be
1297 configured using the following settings:
1299 l r l r,- - - -,lB s lB s,a r a r.
1300 Setting Default Setting Default
1301 IKE and IPsec SA IPsec SA
1302 margintime 9m marginbytes -
1306 To avoid collisions the specified margins are increased randomly before
1307 subtracting them from the expiration limits (see formula below). This is
1318 Randomization can be disabled by setting
1319 .BR rekeyfuzz " to " 0% .
1321 The following formula is used to calculate the rekey time of IPsec SAs:
1324 rekeytime = lifetime - (margintime + random(0, margintime * rekeyfuzz))
1327 It applies equally to IKE SAs and byte and packet limits for IPsec SAs.
1329 Let's consider the default configuration:
1337 From the formula above follows that the rekey time lies between:
1340 rekeytime_min = 1h - (9m + 9m) = 42m
1341 rekeytime_max = 1h - (9m + 0m) = 51m
1344 Thus, the daemon will attempt to rekey the IPsec SA at a random time
1345 between 42 and 51 minutes after establishing the SA. Or, in other words,
1346 between 9 and 18 minutes before the SA expires.
1349 Since the rekeying of an SA needs some time, the margin values must not be
1353 .B margin... + margin... * rekeyfuzz
1354 must not exceed the original limit. For example, specifying
1356 in the default configuration is a bad idea as there is a chance that the rekey
1357 time equals zero and, thus, rekeying gets disabled.
1361 /etc/ipsec.d/aacerts
1363 /etc/ipsec.d/cacerts
1368 strongswan.conf(5), ipsec.secrets(5), ipsec(8)
1370 Originally written for the FreeS/WAN project by Henry Spencer.
1371 Updated and extended for the strongSwan project <http://www.strongswan.org> by
1372 Tobias Brunner, Andreas Steffen and Martin Willi.