1 .TH IPSEC.CONF 5 "2011-12-14" "@IPSEC_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 currently uses two separate keying daemons. \fIpluto\fP handles
176 all IKEv1 connections, \fIcharon\fP is the daemon handling the 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.
237 includes conn section
240 .BR auth " = " esp " | ah"
241 whether authentication should be done as part of
242 ESP encryption, or separately using the AH protocol;
243 acceptable values are
248 The IKEv2 daemon currently supports ESP only.
250 .BR authby " = " pubkey " | rsasig | ecdsasig | psk | eap | never | xauth..."
251 how the two security gateways should authenticate each other;
252 acceptable values are
256 for pre-shared secrets,
258 (the default) for public key signatures as well as the synonyms
260 for RSA digital signatures and
262 for Elliptic Curve DSA signatures.
264 can be used if negotiation is never to be attempted or accepted (useful for
266 Digital signatures are superior in every way to shared secrets.
267 IKEv1 additionally supports the values
271 that will enable eXtended Authentication (XAuth) in addition to IKEv1 main mode
272 based on shared secrets or digital RSA signatures, respectively.
273 IKEv2 additionally supports the value
275 which indicates an initiator to request EAP authentication. The EAP method
276 to use is selected by the server (see
278 This parameter is deprecated for IKEv2 connections, as two peers do not need
279 to agree on an authentication method. Use the
281 parameter instead to define authentication methods in IKEv2.
283 .BR auto " = " ignore " | add | route | start"
284 what operation, if any, should be done automatically at IPsec startup;
285 currently-accepted values are
293 loads a connection without starting it.
295 loads a connection and installs kernel traps. If traffic is detected between
299 , a connection is established.
301 loads a connection and brings it up immediately.
303 ignores the connection. This is equal to delete a connection from the config
305 Relevant only locally, other end need not agree on it
306 (but in general, for an intended-to-be-permanent connection,
309 to ensure that any reboot causes immediate renegotiation).
311 .BR compress " = yes | " no
312 whether IPComp compression of content is proposed on the connection
313 (link-level compression does not work on encrypted data,
314 so to be effective, compression must be done \fIbefore\fR encryption);
315 acceptable values are
319 (the default). A value of
321 causes IPsec to propose both compressed and uncompressed,
322 and prefer compressed.
325 prevents IPsec from proposing compression;
326 a proposal to compress will still be accepted.
328 .BR dpdaction " = " none " | clear | hold | restart"
329 controls the use of the Dead Peer Detection protocol (DPD, RFC 3706) where
330 R_U_THERE notification messages (IKEv1) or empty INFORMATIONAL messages (IKEv2)
331 are periodically sent in order to check the
332 liveliness of the IPsec peer. The values
337 all activate DPD. If no activity is detected, all connections with a dead peer
338 are stopped and unrouted
340 put in the hold state
344 For IKEv1, the default is
346 which disables the active sending of R_U_THERE notifications.
347 Nevertheless pluto will always send the DPD Vendor ID during connection set up
348 in order to signal the readiness to act passively as a responder if the peer
349 wants to use DPD. For IKEv2,
351 does't make sense, since all messages are used to detect dead peers. If specified,
352 it has the same meaning as the default
355 .BR dpddelay " = " 30s " | <time>"
356 defines the period time interval with which R_U_THERE messages/INFORMATIONAL
357 exchanges are sent to the peer. These are only sent if no other traffic is
358 received. In IKEv2, a value of 0 sends no additional INFORMATIONAL
359 messages and uses only standard messages (such as those to rekey) to detect
362 .BR dpdtimeout " = " 150s " | <time>"
363 defines the timeout interval, after which all connections to a peer are deleted
364 in case of inactivity. This only applies to IKEv1, in IKEv2 the default
365 retransmission timeout applies, as every exchange is used to detect dead peers.
367 .IR strongswan.conf (5)
368 for a description of the IKEv2 retransmission timeout.
370 .BR closeaction " = " none " | clear | hold | restart"
371 defines the action to take if the remote peer unexpectedly closes a CHILD_SA
372 (IKEv2 only, see dpdaction for meaning of values). A closeaction should not be
373 used if the peer uses reauthentication or uniquids checking, as these events
374 might trigger a closeaction when not desired.
376 .BR inactivity " = <time>"
377 defines the timeout interval, after which a CHILD_SA is closed if it did
378 not send or receive any traffic. Currently supported in IKEv2 connections only.
380 .BR eap " = aka | ... | radius | ... | <type> | <type>-<vendor>
381 defines the EAP type to propose as server if the client requests EAP
382 authentication. Currently supported values are
394 for the EAP-RADIUS proxy,
401 Additionally, IANA assigned EAP method numbers are accepted, or a
402 definition in the form
404 (e.g. eap=7-12345) can be used to specify vendor specific EAP types.
405 This parameter is deprecated in the favour of
408 To forward EAP authentication to a RADIUS server using the EAP-RADIUS plugin,
412 .BR eap_identity " = <id>"
413 defines the identity the client uses to reply to a EAP Identity request.
414 If defined on the EAP server, the defined identity will be used as peer
415 identity during EAP authentication. The special value
417 uses the EAP Identity method to ask the client for an EAP identity. If not
418 defined, the IKEv2 identity will be used as EAP identity.
420 .BR esp " = <cipher suites>"
421 comma-separated list of ESP encryption/authentication algorithms to be used
422 for the connection, e.g.
425 .BR encryption-integrity[-dhgroup][-esnmode] .
428 .BR aes128-sha1,3des-sha1
429 for IKEv1. The IKEv2 daemon adds its extensive default proposal to this default
430 or the configured value. To restrict it to the configured proposal an
433 can be added at the end.
436 As a responder both daemons accept the first supported proposal received from
437 the peer. In order to restrict a responder to only accept specific cipher
438 suites, the strict flag
440 exclamation mark) can be used, e.g: aes256-sha512-modp4096!
444 is specified, CHILD_SA setup and rekeying include a separate Diffie-Hellman
445 exchange (IKEv2 only). Valid values for
451 Specifying both negotiates Extended Sequence Number support with the peer,
455 .BR forceencaps " = yes | " no
456 force UDP encapsulation for ESP packets even if no NAT situation is detected.
457 This may help to surmount restrictive firewalls. In order to force the peer to
458 encapsulate packets, NAT detection payloads are faked (IKEv2 only).
460 .BR ike " = <cipher suites>"
461 comma-separated list of IKE/ISAKMP SA encryption/authentication algorithms
463 .BR aes128-sha1-modp2048 .
465 .BR encryption-integrity-dhgroup .
466 In IKEv2, multiple algorithms and proposals may be included, such as
467 aes128-aes256-sha1-modp1536-modp2048,3des-sha1-md5-modp1024.
470 .B aes128-sha1-modp2048,3des-sha1-modp1536
471 for IKEv1. The IKEv2 daemon adds its extensive default proposal to this
472 default or the configured value. To restrict it to the configured proposal an
475 can be added at the end.
478 As a responder both daemons accept the first supported proposal received from
479 the peer. In order to restrict a responder to only accept specific cipher
480 suites, the strict flag
482 exclamation mark) can be used, e.g: aes256-sha512-modp4096!
484 .BR ikelifetime " = " 3h " | <time>"
485 how long the keying channel of a connection (ISAKMP or IKE SA)
486 should last before being renegotiated. Also see EXPIRY/REKEY below.
488 .BR installpolicy " = " yes " | no"
489 decides whether IPsec policies are installed in the kernel by the IKEv2
490 charon daemon for a given connection. Allows peaceful cooperation e.g. with
491 the Mobile IPv6 daemon mip6d who wants to control the kernel policies.
492 Acceptable values are
497 .BR keyexchange " = " ike " | ikev1 | ikev2"
498 method of key exchange;
499 which protocol should be used to initialize the connection. Connections marked with
501 are initiated with pluto, those marked with
503 with charon. An incoming request from the remote peer is handled by the correct
504 daemon, unaffected from the
506 setting. Starting with strongSwan 4.5 the default value
510 whereas in older strongSwan releases
514 .BR keyingtries " = " 3 " | <number> | %forever"
515 how many attempts (a whole number or \fB%forever\fP) should be made to
516 negotiate a connection, or a replacement for one, before giving up
519 The value \fB%forever\fP
520 means 'never give up'.
521 Relevant only locally, other end need not agree on it.
527 .BR left " = <ip address> | <fqdn> | %defaultroute | " %any
529 the IP address of the left participant's public-network interface
530 or one of several magic values.
534 will be filled in automatically with the local address
535 of the default-route interface (as determined at IPsec startup time and
536 during configuration update).
546 in front of a fully-qualified domain name or an IP address will implicitly set
548 If the domain name cannot be resolved into an IP address at IPsec startup or
555 In case of an IKEv2 connection, the value
557 for the local endpoint signifies an address to be filled in (by automatic
558 keying) during negotiation. If the local peer initiates the connection setup
559 the routing table will be queried to determine the correct local IP address.
560 In case the local peer is responding to a connection setup then any IP address
561 that is assigned to a local interface will be accepted.
565 for the local endpoint is not supported by the IKEv1 pluto daemon.
569 is used for the remote endpoint it literally means any IP address.
571 Please note that with the usage of wildcards multiple connection descriptions
572 might match a given incoming connection attempt. The most specific description
573 is used in that case.
575 .BR leftallowany " = yes | " no
578 , making it behave as
580 although a concrete IP address has been assigned.
581 Recommended for dynamic IP addresses that can be resolved by DynDNS at IPsec
582 startup or update time.
583 Acceptable values are
589 .BR leftauth " = <auth method>"
590 Authentication method to use locally (left) or require from the remote (right)
592 This parameter is supported in IKEv2 only. Acceptable values are
594 for public key authentication (RSA/ECDSA),
596 for pre-shared key authentication and
598 to (require the) use of the Extensible Authentication Protocol.
599 To require a trustchain public key strength for the remote side, specify the
600 key type followed by the strength in bits (for example
606 an optional EAP method can be appended. Currently defined methods are
616 Alternatively, IANA assigned EAP method numbers are accepted. Vendor specific
617 EAP methods are defined in the form
619 .RB "(e.g. " eap-7-12345 ).
621 .BR leftauth2 " = <auth method>"
624 but defines an additional authentication exchange. IKEv2 supports multiple
625 authentication rounds using "Multiple Authentication Exchanges" defined
626 in RFC4739. This allows, for example, separated authentication
627 of host and user (IKEv2 only).
629 .BR leftca " = <issuer dn> | %same"
630 the distinguished name of a certificate authority which is required to
631 lie in the trust path going from the left participant's certificate up
632 to the root certification authority.
634 .BR leftca2 " = <issuer dn> | %same"
637 but for the second authentication round (IKEv2 only).
639 .BR leftcert " = <path>"
640 the path to the left participant's X.509 certificate. The file can be encoded
641 either in PEM or DER format. OpenPGP certificates are supported as well.
642 Both absolute paths or paths relative to \fI/etc/ipsec.d/certs\fP
643 are accepted. By default
647 to the distinguished name of the certificate's subject and
649 to the distinguished name of the certificate's issuer.
650 The left participant's ID can be overridden by specifying a
652 value which must be certified by the certificate, though.
654 .BR leftcert2 " = <path>"
657 but for the second authentication round (IKEv2 only).
659 .BR leftcertpolicy " = <OIDs>"
660 Comma separated list of certificate policy OIDs the peers certificate must have.
661 OIDs are specified using the numerical dotted representation (IKEv2 only).
663 .BR leftfirewall " = yes | " no
664 whether the left participant is doing forwarding-firewalling
665 (including masquerading) using iptables for traffic from \fIleftsubnet\fR,
666 which should be turned off (for traffic to the other subnet)
667 once the connection is established;
668 acceptable values are
673 May not be used in the same connection description with
675 Implemented as a parameter to the default \fBipsec _updown\fR script.
677 Relevant only locally, other end need not agree on it.
679 If one or both security gateways are doing forwarding firewalling
680 (possibly including masquerading),
681 and this is specified using the firewall parameters,
682 tunnels established with IPsec are exempted from it
683 so that packets can flow unchanged through the tunnels.
684 (This means that all subnets connected in this manner must have
685 distinct, non-overlapping subnet address blocks.)
686 This is done by the default \fBipsec _updown\fR script (see
689 In situations calling for more control,
690 it may be preferable for the user to supply his own
693 which makes the appropriate adjustments for his system.
695 .BR leftgroups " = <group list>"
696 a comma separated list of group names. If the
698 parameter is present then the peer must be a member of at least one
699 of the groups defined by the parameter. Group membership must be certified
700 by a valid attribute certificate stored in \fI/etc/ipsec.d/acerts/\fP thas has
701 been issued to the peer by a trusted Authorization Authority stored in
702 \fI/etc/ipsec.d/aacerts/\fP.
704 Attribute certificates are not supported in IKEv2 yet.
706 .BR lefthostaccess " = yes | " no
707 inserts a pair of INPUT and OUTPUT iptables rules using the default
708 \fBipsec _updown\fR script, thus allowing access to the host itself
709 in the case where the host's internal interface is part of the
710 negotiated client subnet.
711 Acceptable values are
718 how the left participant should be identified for authentication;
721 Can be an IP address or a fully-qualified domain name preceded by
723 (which is used as a literal string and not resolved).
725 .BR leftid2 " = <id>"
726 identity to use for a second authentication for the left participant
727 (IKEv2 only); defaults to
730 .BR leftikeport " = <port>"
731 UDP port the left participant uses for IKE communication. Currently supported in
732 IKEv2 connections only. If unspecified, port 500 is used with the port floating
733 to 4500 if a NAT is detected or MOBIKE is enabled. Specifying a local IKE port
734 different from the default additionally requires a socket implementation that
735 listens to this port.
737 .BR leftnexthop " = %direct | %defaultroute | <ip address> | <fqdn>"
738 this parameter is usually not needed any more because the NETKEY IPsec stack
739 does not require explicit routing entries for the traffic to be tunneled. If
741 is used with IKEv1 then
743 must still be set in order for the source routes to work properly.
745 .BR leftprotoport " = <protocol>/<port>"
746 restrict the traffic selector to a single protocol and/or port.
748 .B leftprotoport=tcp/http
750 .B leftprotoport=6/80
754 .BR leftrsasigkey " = " %cert " | <raw rsa public key>"
755 the left participant's
756 public key for RSA signature authentication,
757 in RFC 2537 format using
762 means the same as not specifying a value (useful to override a default).
766 means that the key is extracted from a certificate.
767 The identity used for the left participant
768 must be a specific host, not
770 or another magic value.
772 if two connection descriptions
773 specify different public keys for the same
775 confusion and madness will ensue.
777 .BR leftsendcert " = never | no | " ifasked " | always | yes"
786 .BR ifasked " (the default),"
787 the latter meaning that the peer must send a certificate request payload in
788 order to get a certificate in return.
790 .BR leftsourceip " = %config | %cfg | %modeconfig | %modecfg | <ip address>"
791 The internal source IP to use in a tunnel, also known as virtual IP. If the
792 value is one of the synonyms
798 an address is requested from the peer. In IKEv2, a statically defined address
799 is also requested, since the server may change it.
801 .BR rightsourceip " = %config | <network>/<netmask> | %poolname"
802 The internal source IP to use in a tunnel for the remote peer. If the
805 on the responder side, the initiator must propose an address which is then
806 echoed back. Also supported are address pools expressed as
807 \fInetwork\fB/\fInetmask\fR
808 or the use of an external IP address pool using %\fIpoolname\fR,
809 where \fIpoolname\fR is the name of the IP address pool used for the lookup.
811 .BR leftsubnet " = <ip subnet>"
812 private subnet behind the left participant, expressed as
813 \fInetwork\fB/\fInetmask\fR;
814 if omitted, essentially assumed to be \fIleft\fB/32\fR,
815 signifying that the left end of the connection goes to the left participant
816 only. When using IKEv2, the configured subnet of the peers may differ, the
817 protocol narrows it to the greatest common subnet. Further, IKEv2 supports
818 multiple subnets separated by commas. IKEv1 only interprets the first subnet
819 of such a definition.
821 .BR leftsubnetwithin " = <ip subnet>"
822 the peer can propose any subnet or single IP address that fits within the
824 .BR leftsubnetwithin.
825 Not relevant for IKEv2, as subnets are narrowed.
827 .BR leftupdown " = <path>"
828 what ``updown'' script to run to adjust routing and/or firewalling
829 when the status of the connection
831 .BR "ipsec _updown" ).
832 May include positional parameters separated by white space
833 (although this requires enclosing the whole string in quotes);
834 including shell metacharacters is unwise.
838 Relevant only locally, other end need not agree on it. IKEv2 uses the updown
839 script to insert firewall rules only, since routing has been implemented
840 directly into charon.
842 .BR lifebytes " = <number>"
843 the number of bytes transmitted over an IPsec SA before it expires (IKEv2
846 .BR lifepackets " = <number>"
847 the number of packets transmitted over an IPsec SA before it expires (IKEv2
850 .BR lifetime " = " 1h " | <time>"
851 how long a particular instance of a connection
852 (a set of encryption/authentication keys for user packets) should last,
853 from successful negotiation to expiry;
854 acceptable values are an integer optionally followed by
857 or a decimal number followed by
863 in minutes, hours, or days respectively)
868 Normally, the connection is renegotiated (via the keying channel)
869 before it expires (see
871 The two ends need not exactly agree on
873 although if they do not,
874 there will be some clutter of superseded connections on the end
875 which thinks the lifetime is longer. Also see EXPIRY/REKEY below.
877 .BR marginbytes " = <number>"
878 how many bytes before IPsec SA expiry (see
880 should attempts to negotiate a replacement begin (IKEv2 only).
882 .BR marginpackets " = <number>"
883 how many packets before IPsec SA expiry (see
885 should attempts to negotiate a replacement begin (IKEv2 only).
887 .BR margintime " = " 9m " | <time>"
888 how long before connection expiry or keying-channel expiry
890 negotiate a replacement
891 begin; acceptable values as for
895 Relevant only locally, other end need not agree on it. Also see EXPIRY/REKEY
898 .BR mark " = <value>[/<mask>]"
899 sets an XFRM mark in the inbound and outbound
900 IPsec SAs and policies. If the mask is missing then a default
905 .BR mark_in " = <value>[/<mask>]"
906 sets an XFRM mark in the inbound IPsec SA and
907 policy. If the mask is missing then a default mask of
911 .BR mark_out " = <value>[/<mask>]"
912 sets an XFRM mark in the outbound IPsec SA and
913 policy. If the mask is missing then a default mask of
917 .BR mobike " = " yes " | no"
918 enables the IKEv2 MOBIKE protocol defined by RFC 4555. Accepted values are
924 the IKEv2 charon daemon will not actively propose MOBIKE as initiator and
925 ignore the MOBIKE_SUPPORTED notify as responder.
927 .BR modeconfig " = push | " pull
928 defines which mode is used to assign a virtual IP.
934 Currently relevant for IKEv1 only since IKEv2 always uses the configuration
935 payload in pull mode. Cisco VPN gateways usually operate in
939 .BR pfs " = " yes " | no"
940 whether Perfect Forward Secrecy of keys is desired on the connection's
942 (with PFS, penetration of the key-exchange protocol
943 does not compromise keys negotiated earlier);
944 acceptable values are
949 IKEv2 always uses PFS for IKE_SA rekeying whereas for CHILD_SA rekeying
950 PFS is enforced by defining a Diffie-Hellman modp group in the
954 .BR pfsgroup " = <modp group>"
955 defines a Diffie-Hellman group for perfect forward secrecy in IKEv1 Quick Mode
956 differing from the DH group used for IKEv1 Main Mode (IKEv1 only).
958 .BR reauth " = " yes " | no"
959 whether rekeying of an IKE_SA should also reauthenticate the peer. In IKEv1,
960 reauthentication is always done. In IKEv2, a value of
962 rekeys without uninstalling the IPsec SAs, a value of
964 (the default) creates a new IKE_SA from scratch and tries to recreate
967 .BR rekey " = " yes " | no"
968 whether a connection should be renegotiated when it is about to expire;
969 acceptable values are
974 The two ends need not agree, but while a value of
976 prevents pluto/charon from requesting renegotiation,
977 it does not prevent responding to renegotiation requested from the other end,
980 will be largely ineffective unless both ends agree on it.
982 .BR rekeyfuzz " = " 100% " | <percentage>"
983 maximum percentage by which
988 should be randomly increased to randomize rekeying intervals
989 (important for hosts with many connections);
990 acceptable values are an integer,
991 which may exceed 100,
997 after this random increase,
1000 (where TYPE is one of
1007 will suppress randomization.
1008 Relevant only locally, other end need not agree on it. Also see EXPIRY/REKEY
1015 .BR reqid " = <number>"
1016 sets the reqid for a given connection to a pre-configured fixed value.
1018 .BR tfc " = <value>"
1019 number of bytes to pad ESP payload data to. Traffic Flow Confidentiality
1020 is currently supported in IKEv2 and applies to outgoing packets only. The
1023 fills up ESP packets with padding to have the size of the MTU.
1025 .BR type " = " tunnel " | transport | transport_proxy | passthrough | drop"
1026 the type of the connection; currently the accepted values
1030 signifying a host-to-host, host-to-subnet, or subnet-to-subnet tunnel;
1032 signifying host-to-host transport mode;
1033 .BR transport_proxy ,
1034 signifying the special Mobile IPv6 transport proxy mode;
1036 signifying that no IPsec processing should be done at all;
1038 signifying that packets should be discarded; and
1040 signifying that packets should be discarded and a diagnostic ICMP returned
1042 is currently not supported by the NETKEY stack of the Linux 2.6 kernel).
1044 .BR xauth " = " client " | server"
1045 specifies the role in the XAuth protocol if activated by
1048 .B authby=xauthrsasig.
1055 .BR xauth_identity " = <id>"
1056 defines the identity/username the client uses to reply to an XAuth request.
1057 If not defined, the IKEv1 identity will be used as XAuth identity.
1059 .SS "CONN PARAMETERS: IKEv2 MEDIATION EXTENSION"
1060 The following parameters are relevant to IKEv2 Mediation Extension
1063 .BR mediation " = yes | " no
1064 whether this connection is a mediation connection, ie. whether this
1065 connection is used to mediate other connections. Mediation connections
1066 create no child SA. Acceptable values are
1071 .BR mediated_by " = <name>"
1072 the name of the connection to mediate this connection through. If given,
1073 the connection will be mediated through the named mediation connection.
1074 The mediation connection must set
1077 .BR me_peerid " = <id>"
1078 ID as which the peer is known to the mediation server, ie. which the other
1079 end of this connection uses as its
1081 on its connection to the mediation server. This is the ID we request the
1082 mediation server to mediate us with. If
1086 of this connection will be used as peer ID.
1089 These are optional sections that can be used to assign special
1090 parameters to a Certification Authority (CA). Because the daemons
1091 automatically import CA certificates from \fI/etc/ipsec.d/cacerts\fP,
1092 there is no need to explicitly add them with a CA section, unless you
1093 want to assign special parameters (like a CRL) to a CA.
1095 .BR also " = <name>"
1099 .BR auto " = " ignore " | add"
1100 currently can have either the value
1105 .BR cacert " = <path>"
1106 defines a path to the CA certificate either relative to
1107 \fI/etc/ipsec.d/cacerts\fP or as an absolute path.
1109 .BR crluri " = <uri>"
1110 defines a CRL distribution point (ldap, http, or file URI)
1116 .BR crluri2 " = <uri>"
1117 defines an alternative CRL distribution point (ldap, http, or file URI)
1119 .BR ldaphost " = <hostname>"
1120 defines an ldap host. Currently used by IKEv1 only.
1122 .BR ocspuri " = <uri>"
1123 defines an OCSP URI.
1129 .BR ocspuri2 " = <uri>"
1130 defines an alternative OCSP URI. Currently used by IKEv2 only.
1132 .BR certuribase " = <uri>"
1133 defines the base URI for the Hash and URL feature supported by IKEv2.
1134 Instead of exchanging complete certificates, IKEv2 allows to send an URI
1135 that resolves to the DER encoded certificate. The certificate URIs are built
1136 by appending the SHA1 hash of the DER encoded certificates to this base URI.
1137 .SH "CONFIG SECTIONS"
1138 At present, the only
1140 section known to the IPsec software is the one named
1142 which contains information used when the software is being started.
1151 crlcheckinterval=10m
1156 Parameters are optional unless marked ``(required)''.
1157 The currently-accepted
1162 section affecting both daemons are:
1164 .BR cachecrls " = yes | " no
1165 certificate revocation lists (CRLs) fetched via http or ldap will be cached in
1166 \fI/etc/ipsec.d/crls/\fR under a unique file name derived from the certification
1167 authority's public key.
1172 (the default). Only relevant for IKEv1, as CRLs are always cached in IKEv2.
1174 .BR charonstart " = " yes " | no"
1175 whether to start the IKEv2 charon daemon or not.
1178 if starter was compiled with IKEv2 support.
1180 .BR plutostart " = " yes " | no"
1181 whether to start the IKEv1 pluto daemon or not.
1184 if starter was compiled with IKEv1 support.
1186 .BR strictcrlpolicy " = yes | ifuri | " no
1187 defines if a fresh CRL must be available in order for the peer authentication
1188 based on RSA signatures to succeed.
1189 IKEv2 additionally recognizes
1193 if at least one CRL URI is defined and to
1197 .BR uniqueids " = " yes " | no | replace | keep"
1198 whether a particular participant ID should be kept unique,
1199 with any new (automatically keyed)
1200 connection using an ID from a different IP address
1201 deemed to replace all old ones using that ID;
1202 acceptable values are
1207 Participant IDs normally \fIare\fR unique,
1208 so a new (automatically-keyed) connection using the same ID is
1209 almost invariably intended to replace an old one.
1210 The IKEv2 daemon also accepts the value
1212 which is identical to
1216 to reject new IKE_SA setups and keep the duplicate established earlier.
1220 parameters are used by the IKEv1 Pluto daemon only:
1222 .BR crlcheckinterval " = " 0s " | <time>"
1223 interval in seconds. CRL fetching is enabled if the value is greater than zero.
1224 Asynchronous, periodic checking for fresh CRLs is currently done by the
1225 IKEv1 Pluto daemon only.
1227 .BR keep_alive " = " 20s " | <time>"
1228 interval in seconds between NAT keep alive packets, the default being 20 seconds.
1230 .BR nat_traversal " = yes | " no
1231 activates NAT traversal by accepting source ISAKMP ports different from udp/500 and
1232 being able of floating to udp/4500 if a NAT situation is detected.
1238 Used by IKEv1 only, NAT traversal is always being active in IKEv2.
1240 .BR nocrsend " = yes | " no
1241 no certificate request payloads will be sent.
1243 .BR pkcs11initargs " = <args>"
1244 non-standard argument string for PKCS#11 C_Initialize() function;
1245 required by NSS softoken.
1247 .BR pkcs11module " = <args>"
1248 defines the path to a dynamically loadable PKCS #11 library.
1250 .BR pkcs11keepstate " = yes | " no
1251 PKCS #11 login sessions will be kept during the whole lifetime of the keying
1252 daemon. Useful with pin-pad smart card readers.
1259 .BR pkcs11proxy " = yes | " no
1260 Pluto will act as a PKCS #11 proxy accessible via the whack interface.
1267 .BR plutodebug " = " none " | <debug list> | all"
1268 how much pluto debugging output should be logged.
1272 means no debugging output (the default).
1276 Otherwise only the specified types of output
1277 (a quoted list, names without the
1280 separated by white space) are enabled;
1281 for details on available debugging types, see
1284 .BR plutostderrlog " = <file>"
1285 Pluto will not use syslog, but rather log to stderr, and redirect stderr
1288 .BR postpluto " = <command>"
1289 shell command to run after starting pluto
1290 (e.g., to remove a decrypted copy of the
1293 It's run in a very simple way;
1294 complexities like I/O redirection are best hidden within a script.
1295 Any output is redirected for logging,
1296 so running interactive commands is difficult unless they use
1298 or equivalent for their interaction.
1301 .BR prepluto " = <command>"
1302 shell command to run before starting pluto
1303 (e.g., to decrypt an encrypted copy of the
1306 It's run in a very simple way;
1307 complexities like I/O redirection are best hidden within a script.
1308 Any output is redirected for logging,
1309 so running interactive commands is difficult unless they use
1311 or equivalent for their interaction.
1314 .BR virtual_private " = <networks>"
1315 defines private networks using a wildcard notation.
1319 parameters are used by the IKEv2 charon daemon only:
1321 .BR charondebug " = <debug list>"
1322 how much charon debugging output should be logged.
1323 A comma separated list containing type/level-pairs may
1325 .B dmn 3, ike 1, net -1.
1326 Acceptable values for types are
1327 .B dmn, mgr, ike, chd, job, cfg, knl, net, asn, enc, lib, tls, tnc, imc, imv, pts
1328 and the level is one of
1329 .B -1, 0, 1, 2, 3, 4
1330 (for silent, audit, control, controlmore, raw, private). By default, the level
1333 for all types. For more flexibility see LOGGER CONFIGURATION in
1334 .IR strongswan.conf (5).
1336 .SH IKEv2 EXPIRY/REKEY
1337 The IKE SAs and IPsec SAs negotiated by the daemon can be configured to expire
1338 after a specific amount of time. For IPsec SAs this can also happen after a
1339 specified number of transmitted packets or transmitted bytes. The following
1340 settings can be used to configure this:
1342 l r l r,- - - -,lB s lB s,a r a r.
1343 Setting Default Setting Default
1345 ikelifetime 3h lifebytes -
1350 IKE SAs as well as IPsec SAs can be rekeyed before they expire. This can be
1351 configured using the following settings:
1353 l r l r,- - - -,lB s lB s,a r a r.
1354 Setting Default Setting Default
1355 IKE and IPsec SA IPsec SA
1356 margintime 9m marginbytes -
1360 To avoid collisions the specified margins are increased randomly before
1361 subtracting them from the expiration limits (see formula below). This is
1372 Randomization can be disabled by setting
1373 .BR rekeyfuzz " to " 0% .
1375 The following formula is used to calculate the rekey time of IPsec SAs:
1378 rekeytime = lifetime - (margintime + random(0, margintime * rekeyfuzz))
1381 It applies equally to IKE SAs and byte and packet limits for IPsec SAs.
1383 Let's consider the default configuration:
1391 From the formula above follows that the rekey time lies between:
1394 rekeytime_min = 1h - (9m + 9m) = 42m
1395 rekeytime_max = 1h - (9m + 0m) = 51m
1398 Thus, the daemon will attempt to rekey the IPsec SA at a random time
1399 between 42 and 51 minutes after establishing the SA. Or, in other words,
1400 between 9 and 18 minutes before the SA expires.
1403 Since the rekeying of an SA needs some time, the margin values must not be
1407 .B margin... + margin... * rekeyfuzz
1408 must not exceed the original limit. For example, specifying
1410 in the default configuration is a bad idea as there is a chance that the rekey
1411 time equals zero and, thus, rekeying gets disabled.
1415 /etc/ipsec.d/aacerts
1417 /etc/ipsec.d/cacerts
1422 strongswan.conf(5), ipsec.secrets(5), ipsec(8), pluto(8)
1424 Originally written for the FreeS/WAN project by Henry Spencer.
1425 Updated and extended for the strongSwan project <http://www.strongswan.org> by
1426 Tobias Brunner, Andreas Steffen and Martin Willi.
1429 If conns are to be added before DNS is available, \fBleft=\fP\fIFQDN\fP