]> git.ipfire.org Git - people/ms/strongswan.git/blame - src/starter/ipsec.conf.5.in
Show mallinfo() data in statusall, if available
[people/ms/strongswan.git] / src / starter / ipsec.conf.5.in
CommitLineData
8f76653a 1.TH IPSEC.CONF 5 "2010-05-30" "@IPSEC_VERSION@" "strongSwan"
fea5e716
MW
2.SH NAME
3ipsec.conf \- IPsec configuration and connections
4.SH DESCRIPTION
5The optional
6.I ipsec.conf
7file
8specifies most configuration and control information for the
9strongSwan IPsec subsystem.
f115838b 10The major exception is secrets for authentication;
fea5e716 11see
f115838b 12.IR ipsec.secrets (5).
532f2347 13Its contents are not security-sensitive.
fea5e716
MW
14.PP
15The file is a text file, consisting of one or more
16.IR sections .
17White space followed by
18.B #
19followed by anything to the end of the line
20is a comment and is ignored,
21as are empty lines which are not within a section.
22.PP
23A line which contains
24.B include
25and a file name, separated by white space,
26is replaced by the contents of that file,
27preceded and followed by empty lines.
28If the file name is not a full pathname,
29it is considered to be relative to the directory containing the
30including file.
31Such inclusions can be nested.
32Only a single filename may be supplied, and it may not contain white space,
33but it may include shell wildcards (see
34.IR sh (1));
35for example:
36.PP
37.B include
38.B "ipsec.*.conf"
39.PP
40The intention of the include facility is mostly to permit keeping
41information on connections, or sets of connections,
42separate from the main configuration file.
43This permits such connection descriptions to be changed,
44copied to the other security gateways involved, etc.,
45without having to constantly extract them from the configuration
46file and then insert them back into it.
47Note also the
48.B also
49parameter (described below) which permits splitting a single logical
50section (e.g. a connection description) into several actual sections.
51.PP
fea5e716
MW
52A section
53begins with a line of the form:
54.PP
55.I type
56.I name
57.PP
58where
59.I type
60indicates what type of section follows, and
61.I name
62is an arbitrary name which distinguishes the section from others
63of the same type.
f115838b
TB
64Names must start with a letter and may contain only
65letters, digits, periods, underscores, and hyphens.
fea5e716
MW
66All subsequent non-empty lines
67which begin with white space are part of the section;
68comments within a section must begin with white space too.
69There may be only one section of a given type with a given name.
70.PP
71Lines within the section are generally of the form
72.PP
73\ \ \ \ \ \fIparameter\fB=\fIvalue\fR
74.PP
75(note the mandatory preceding white space).
76There can be white space on either side of the
77.BR = .
78Parameter names follow the same syntax as section names,
79and are specific to a section type.
80Unless otherwise explicitly specified,
81no parameter name may appear more than once in a section.
82.PP
83An empty
84.I value
85stands for the system default value (if any) of the parameter,
86i.e. it is roughly equivalent to omitting the parameter line entirely.
87A
88.I value
89may contain white space only if the entire
90.I value
91is enclosed in double quotes (\fB"\fR);
92a
93.I value
94cannot itself contain a double quote,
95nor may it be continued across more than one line.
96.PP
97Numeric 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).
100.PP
101There is currently one parameter which is available in any type of
102section:
103.TP
104.B also
105the value is a section name;
106the parameters of that section are appended to this section,
107as if they had been written as part of it.
108The specified section must exist, must follow the current one,
109and must have the same section type.
110(Nesting is permitted,
111and there may be more than one
112.B also
113in a single section,
114although it is forbidden to append the same section more than once.)
fea5e716
MW
115.PP
116A section with name
117.B %default
118specifies defaults for sections of the same type.
119For each parameter in it,
120any section of that type which does not have a parameter of the same name
121gets a copy of the one from the
122.B %default
123section.
124There may be multiple
125.B %default
126sections of a given type,
127but only one default may be supplied for any specific parameter name,
128and all
129.B %default
130sections of a given type must precede all non-\c
131.B %default
132sections of that type.
133.B %default
134sections may not contain the
135.B also
136parameter.
137.PP
138Currently there are three types of sections:
139a
140.B config
141section specifies general configuration information for IPsec, a
142.B conn
143section specifies an IPsec connection, while a
144.B ca
7900ab1b 145section specifies special properties of a certification authority.
fea5e716
MW
146.SH "CONN SECTIONS"
147A
148.B conn
149section contains a
150.IR "connection specification" ,
151defining a network connection to be made using IPsec.
532f2347 152The name given is arbitrary, and is used to identify the connection.
fea5e716
MW
153Here's a simple example:
154.PP
155.ne 10
156.nf
157.ft B
158.ta 1c
159conn snt
7900ab1b
AS
160 left=192.168.0.1
161 leftsubnet=10.1.0.0/16
162 right=192.168.0.2
163 rightsubnet=10.1.0.0/16
fea5e716 164 keyingtries=%forever
7900ab1b 165 auto=add
fea5e716
MW
166.ft
167.fi
168.PP
532f2347 169A note on terminology: There are two kinds of communications going on:
fea5e716
MW
170transmission of user IP packets, and gateway-to-gateway negotiations for
171keying, rekeying, and general control.
f115838b
TB
172The path to control the connection is called 'ISAKMP SA' in IKEv1
173and 'IKE SA' in the IKEv2 protocol. That what is being negotiated, the kernel
174level data path, is called 'IPsec SA' or 'Child SA'.
175strongSwan currently uses two separate keying daemons. \fIpluto\fP handles
176all IKEv1 connections, \fIcharon\fP is the daemon handling the IKEv2
177protocol.
fea5e716
MW
178.PP
179To avoid trivial editing of the configuration file to suit it to each system
180involved in a connection,
181connection specifications are written in terms of
182.I left
183and
184.I right
185participants,
186rather than in terms of local and remote.
187Which participant is considered
188.I left
189or
190.I right
191is arbitrary;
f115838b
TB
192for every connection description an attempt is made to figure out whether
193the local endpoint should act as the
194.I left
195or
196.I right
197endpoint. This is done by matching the IP addresses defined for both endpoints
198with the IP addresses assigned to local network interfaces. If a match is found
199then the role (left or right) that matches is going to be considered local.
200If no match is found during startup,
201.I left
202is considered local.
fea5e716
MW
203This permits using identical connection specifications on both ends.
204There are cases where there is no symmetry; a good convention is to
205use
206.I left
207for the local side and
208.I right
209for the remote side (the first letters are a good mnemonic).
210.PP
211Many of the parameters relate to one participant or the other;
212only the ones for
213.I left
214are listed here, but every parameter whose name begins with
215.B left
216has a
217.B right
218counterpart,
219whose description is the same but with
220.B left
221and
222.B right
223reversed.
224.PP
532f2347
MW
225Parameters are optional unless marked '(required)'.
226.SS "CONN PARAMETERS"
227Unless otherwise noted, for a connection to work,
fea5e716
MW
228in general it is necessary for the two ends to agree exactly
229on the values of these parameters.
230.TP 14
c2bc2b27
AS
231.B ah
232AH authentication algorithm to be used
233for the connection, e.g.
234.B hmac-md5.
fea5e716
MW
235.TP
236.B auth
237whether authentication should be done as part of
238ESP encryption, or separately using the AH protocol;
239acceptable values are
240.B esp
241(the default) and
242.BR ah .
f115838b
TB
243.br
244The IKEv2 daemon currently supports ESP only.
fea5e716
MW
245.TP
246.B authby
247how the two security gateways should authenticate each other;
248acceptable values are
249.B secret
7900ab1b
AS
250or
251.B psk
c7f76958
AS
252for pre-shared secrets,
253.B pubkey
254(the default) for public key signatures as well as the synonyms
fea5e716 255.B rsasig
c7f76958
AS
256for RSA digital signatures and
257.B ecdsasig
258for Elliptic Curve DSA signatures.
fea5e716 259.B never
c7f76958
AS
260can be used if negotiation is never to be attempted or accepted (useful for
261shunt-only conns).
8015c91c 262Digital signatures are superior in every way to shared secrets.
7900ab1b
AS
263IKEv1 additionally supports the values
264.B xauthpsk
265and
266.B xauthrsasig
267that will enable eXtended AUTHentication (XAUTH) in addition to IKEv1 main mode
268based on shared secrets or digital RSA signatures, respectively.
f115838b
TB
269IKEv2 additionally supports the value
270.BR eap ,
271which indicates an initiator to request EAP authentication. The EAP method
272to use is selected by the server (see
273.BR eap ).
a44bb934 274This parameter is deprecated for IKEv2 connections, as two peers do not need
8015c91c 275to agree on an authentication method. Use the
a44bb934
MW
276.B leftauth
277parameter instead to define authentication methods in IKEv2.
fea5e716 278.TP
c2bc2b27
AS
279.B auto
280what operation, if any, should be done automatically at IPsec startup;
281currently-accepted values are
f115838b
TB
282.BR add ,
283.BR route ,
c2bc2b27 284.B start
7900ab1b 285and
f115838b
TB
286.B ignore
287(the default).
c2bc2b27
AS
288.B add
289loads a connection without starting it.
290.B route
291loads a connection and installs kernel traps. If traffic is detected between
292.B leftsubnet
293and
294.B rightsubnet
295, a connection is established.
296.B start
297loads a connection and brings it up immediatly.
298.B ignore
299ignores the connection. This is equal to delete a connection from the config
8015c91c 300file.
c2bc2b27
AS
301Relevant only locally, other end need not agree on it
302(but in general, for an intended-to-be-permanent connection,
303both ends should use
304.B auto=start
305to ensure that any reboot causes immediate renegotiation).
7900ab1b 306.TP
fea5e716
MW
307.B compress
308whether IPComp compression of content is proposed on the connection
309(link-level compression does not work on encrypted data,
310so to be effective, compression must be done \fIbefore\fR encryption);
311acceptable values are
312.B yes
313and
314.B no
532f2347 315(the default). A value of
fea5e716
MW
316.B yes
317causes IPsec to propose both compressed and uncompressed,
318and prefer compressed.
319A value of
320.B no
321prevents IPsec from proposing compression;
322a proposal to compress will still be accepted.
323.TP
fea5e716
MW
324.B dpdaction
325controls the use of the Dead Peer Detection protocol (DPD, RFC 3706) where
a655f5c0
MW
326R_U_THERE notification messages (IKEv1) or empty INFORMATIONAL messages (IKEv2)
327are periodically sent in order to check the
328liveliness of the IPsec peer. The values
7900ab1b
AS
329.BR clear ,
330.BR hold ,
8015c91c 331and
7900ab1b
AS
332.B restart
333all activate DPD. If no activity is detected, all connections with a dead peer
f115838b
TB
334are stopped and unrouted
335.RB ( clear ),
336put in the hold state
337.RB ( hold )
338or restarted
339.RB ( restart ).
7900ab1b 340For IKEv1, the default is
a655f5c0
MW
341.B none
342which disables the active sending of R_U_THERE notifications.
343Nevertheless pluto will always send the DPD Vendor ID during connection set up
344in order to signal the readiness to act passively as a responder if the peer
7900ab1b
AS
345wants to use DPD. For IKEv2,
346.B none
347does't make sense, since all messages are used to detect dead peers. If specified,
f115838b
TB
348it has the same meaning as the default
349.RB ( clear ).
fea5e716
MW
350.TP
351.B dpddelay
a655f5c0
MW
352defines the period time interval with which R_U_THERE messages/INFORMATIONAL
353exchanges are sent to the peer. These are only sent if no other traffic is
354received. In IKEv2, a value of 0 sends no additional INFORMATIONAL
355messages and uses only standard messages (such as those to rekey) to detect
356dead peers.
fea5e716
MW
357.TP
358.B dpdtimeout
359defines the timeout interval, after which all connections to a peer are deleted
a655f5c0
MW
360in case of inactivity. This only applies to IKEv1, in IKEv2 the default
361retransmission timeout applies, as every exchange is used to detect dead peers.
fea5e716 362.TP
8015c91c
MW
363.B inactivity
364defines the timeout interval, after which a CHILD_SA is closed if it did
365not send or receive any traffic. Currently supported in IKEv2 connections only.
366.TP
eea626ed 367.B eap
a44bb934 368defines the EAP type to propose as server if the client requests EAP
f115838b
TB
369authentication. Currently supported values are
370.B aka
371for EAP-AKA,
372.B gtc
373for EAP-GTC,
374.B md5
375for EAP-MD5,
376.B mschapv2
377for EAP-MS-CHAPv2,
378.B radius
379for the EAP-RADIUS proxy and
380.B sim
381for EAP-SIM. Additionally, IANA assigned EAP method numbers are accepted, or a
382definition in the form
383.B eap=type-vendor
384(e.g. eap=7-12345) can be used to specify vendor specific EAP types.
385This parameter is deprecated in the favour of
a44bb934 386.B leftauth.
4a6b84a9
MW
387
388To forward EAP authentication to a RADIUS server using the EAP-RADIUS plugin,
8015c91c 389set
f115838b 390.BR eap=radius .
eea626ed 391.TP
82290106
MW
392.B eap_identity
393defines the identity the client uses to reply to a EAP Identity request.
394If defined on the EAP server, the defined identity will be used as peer
8015c91c 395identity during EAP authentication. The special value
82290106 396.B %identity
f115838b 397uses the EAP Identity method to ask the client for an EAP identity. If not
82290106
MW
398defined, the IKEv2 identity will be used as EAP identity.
399.TP
c2bc2b27 400.B esp
f115838b 401comma-separated list of ESP encryption/authentication algorithms to be used
c2bc2b27 402for the connection, e.g.
f115838b
TB
403.BR 3des-md5 .
404The notation is
405.BR encryption-integrity-[dh-group] .
406.br
407If
408.B dh-group
409is specified, CHILD_SA setup and rekeying include a separate diffe hellman
410exchange (IKEv2 only).
c2bc2b27 411.TP
5df92bba 412.B forceencaps
9dae1bed 413Force UDP encapsulation for ESP packets even if no NAT situation is detected.
f115838b 414This may help to surmount restrictive firewalls. In order to force the peer to
9dae1bed
MW
415encapsulate packets, NAT detection payloads are faked (IKEv2 only).
416.TP
c2bc2b27 417.B ike
f115838b
TB
418comma-separated list of IKE/ISAKMP SA encryption/authentication algorithms
419to be used, e.g.
420.BR aes128-sha1-modp2048 .
421The notation is
422.BR encryption-integrity-dhgroup .
423In IKEv2, multiple algorithms and proposals may be included, such as
c2bc2b27
AS
424.B aes128-aes256-sha1-modp1536-modp2048,3des-sha1-md5-modp1024.
425.TP
fea5e716 426.B ikelifetime
f115838b 427how long the keying channel of a connection (ISAKMP or IKE SA)
fea5e716
MW
428should last before being renegotiated.
429.TP
84bec926
AS
430.B installpolicy
431decides whether IPsec policies are installed in the kernel by the IKEv2
f115838b 432charon daemon for a given connection. Allows peaceful cooperation e.g. with
84bec926
AS
433the Mobile IPv6 daemon mip6d who wants to control the kernel policies.
434Acceptable values are
435.B yes
436(the default) and
437.BR no .
438.TP
fea5e716
MW
439.B keyexchange
440method of key exchange;
3572b3b6 441which protocol should be used to initialize the connection. Connections marked with
fea5e716 442.B ikev1
3572b3b6 443are initiated with pluto, those marked with
fea5e716 444.B ikev2
8015c91c
MW
445with charon. An incoming request from the remote peer is handled by the correct
446daemon, unaffected from the
fea5e716 447.B keyexchange
3572b3b6 448setting. The default value
fea5e716 449.B ike
f115838b
TB
450currently is a synonym for
451.BR ikev1 .
fea5e716 452.TP
fea5e716
MW
453.B keyingtries
454how many attempts (a whole number or \fB%forever\fP) should be made to
455negotiate a connection, or a replacement for one, before giving up
456(default
457.BR %forever ).
458The value \fB%forever\fP
532f2347 459means 'never give up'.
fea5e716
MW
460Relevant only locally, other end need not agree on it.
461.TP
462.B keylife
deddfde9
TB
463synonym for
464.BR lifetime .
fea5e716 465.TP
c2bc2b27
AS
466.B left
467(required)
f115838b 468the IP address of the left participant's public-network interface
c2bc2b27
AS
469or one of several magic values.
470If it is
471.BR %defaultroute ,
472.B left
473will be filled in automatically with the local address
f115838b
TB
474of the default-route interface (as determined at IPsec startup time and
475during configuration update).
476Either
c2bc2b27
AS
477.B left
478or
479.B right
480may be
481.BR %defaultroute ,
f115838b
TB
482but not both.
483The prefix
c2bc2b27
AS
484.B %
485in front of a fully-qualified domain name or an IP address will implicitly set
486.B leftallowany=yes.
f115838b
TB
487If the domain name cannot be resolved into an IP address at IPsec startup or
488update time then
c2bc2b27
AS
489.B left=%any
490and
491.B leftallowany=no
492will be assumed.
f115838b
TB
493
494In case of an IKEv2 connection, the value
495.B %any
496for the local endpoint signifies an address to be filled in (by automatic
497keying) during negotiation. If the local peer initiates the connection setup
498the routing table will be queried to determine the correct local IP address.
499In case the local peer is responding to a connection setup then any IP address
500that is assigned to a local interface will be accepted.
501.br
502Note that specifying
503.B %any
504for the local endpoint is not supported by the IKEv1 pluto daemon.
505
506If
507.B %any
508is used for the remote endpoint it literally means any IP address.
509
510Please note that with the usage of wildcards multiple connection descriptions
511might match a given incoming connection attempt. The most specific description
512is used in that case.
c2bc2b27
AS
513.TP
514.B leftallowany
515a modifier for
516.B left
517, making it behave as
518.B %any
519although a concrete IP address has been assigned.
f115838b
TB
520Recommended for dynamic IP addresses that can be resolved by DynDNS at IPsec
521startup or update time.
c2bc2b27
AS
522Acceptable values are
523.B yes
524and
525.B no
526(the default).
527.TP
a44bb934 528.B leftauth
f115838b
TB
529Authentication method to use locally (left) or require from the remote (right)
530side.
8015c91c 531This parameter is supported in IKEv2 only. Acceptable values are
a44bb934 532.B pubkey
8015c91c 533for public key authentication (RSA/ECDSA),
a44bb934
MW
534.B psk
535for pre-shared key authentication and
536.B eap
537to (require the) use of the Extensible Authentication Protocol. In the case
8015c91c 538of
a44bb934
MW
539.B eap,
540an optional EAP method can be appended. Currently defined methods are
f115838b
TB
541.BR eap-aka ,
542.BR eap-gtc ,
543.BR eap-md5 ,
544.B eap-mschapv2
a44bb934 545and
f115838b 546.BR eap-sim .
a44bb934
MW
547Alternatively, IANA assigned EAP method numbers are accepted. Vendor specific
548EAP methods are defined in the form
549.B eap-type-vendor
f115838b 550.RB "(e.g. " eap-7-12345 ).
a44bb934
MW
551.TP
552.B leftauth2
8015c91c 553Same as
f115838b 554.BR leftauth ,
a44bb934
MW
555but defines an additional authentication exchange. IKEv2 supports multiple
556authentication rounds using "Multiple Authentication Exchanges" defined
557in RFC4739. This allows, for example, separated authentication
558of host and user (IKEv2 only).
559.TP
fea5e716
MW
560.B leftca
561the distinguished name of a certificate authority which is required to
562lie in the trust path going from the left participant's certificate up
8015c91c 563to the root certification authority.
fea5e716 564.TP
a44bb934
MW
565.B leftca2
566Same as
567.B leftca,
568but for the second authentication round (IKEv2 only).
569.TP
fea5e716 570.B leftcert
f115838b
TB
571the path to the left participant's X.509 certificate. The file can be encoded
572either in PEM or DER format. OpenPGP certificates are supported as well.
7900ab1b 573Both absolute paths or paths relative to \fI/etc/ipsec.d/certs\fP
fea5e716
MW
574are accepted. By default
575.B leftcert
8015c91c 576sets
fea5e716
MW
577.B leftid
578to the distinguished name of the certificate's subject and
579.B leftca
580to the distinguished name of the certificate's issuer.
581The left participant's ID can be overriden by specifying a
582.B leftid
583value which must be certified by the certificate, though.
584.TP
a44bb934
MW
585.B leftcert2
586Same as
587.B leftcert,
588but for the second authentication round (IKEv2 only).
589.TP
c2bc2b27
AS
590.B leftfirewall
591whether the left participant is doing forwarding-firewalling
592(including masquerading) using iptables for traffic from \fIleftsubnet\fR,
593which should be turned off (for traffic to the other subnet)
594once the connection is established;
595acceptable values are
596.B yes
597and
598.B no
599(the default).
600May not be used in the same connection description with
601.BR leftupdown .
602Implemented as a parameter to the default \fBipsec _updown\fR script.
603See notes below.
604Relevant only locally, other end need not agree on it.
605
606If one or both security gateways are doing forwarding firewalling
607(possibly including masquerading),
608and this is specified using the firewall parameters,
609tunnels established with IPsec are exempted from it
610so that packets can flow unchanged through the tunnels.
611(This means that all subnets connected in this manner must have
612distinct, non-overlapping subnet address blocks.)
613This is done by the default \fBipsec _updown\fR script (see
614.IR pluto (8)).
615
616In situations calling for more control,
617it may be preferable for the user to supply his own
618.I updown
619script,
620which makes the appropriate adjustments for his system.
621.TP
622.B leftgroups
623a comma separated list of group names. If the
624.B leftgroups
625parameter is present then the peer must be a member of at least one
626of the groups defined by the parameter. Group membership must be certified
f115838b
TB
627by a valid attribute certificate stored in \fI/etc/ipsec.d/acerts/\fP thas has
628been issued to the peer by a trusted Authorization Authority stored in
629\fI/etc/ipsec.d/aacerts/\fP.
630.br
631Attribute certificates are not supported in IKEv2 yet.
c2bc2b27
AS
632.TP
633.B lefthostaccess
634inserts a pair of INPUT and OUTPUT iptables rules using the default
635\fBipsec _updown\fR script, thus allowing access to the host itself
636in the case where the host's internal interface is part of the
637negotiated client subnet.
638Acceptable values are
639.B yes
640and
641.B no
642(the default).
643.TP
644.B leftid
f115838b 645how the left participant should be identified for authentication;
c2bc2b27
AS
646defaults to
647.BR left .
f115838b 648Can be an IP address or a fully-qualified domain name preceded by
c2bc2b27
AS
649.B @
650(which is used as a literal string and not resolved).
651.TP
a44bb934
MW
652.B leftid2
653identity to use for a second authentication for the left participant
654(IKEv2 only); defaults to
655.BR leftid .
656.TP
667b7372
MW
657.B leftikeport
658UDP port the left participant uses for IKE communication. Currently supported in
f115838b
TB
659IKEv2 connections only. If unspecified, port 500 is used with the port floating
660to 4500 if a NAT is detected or MOBIKE is enabled. Specifying a local IKE port
667b7372
MW
661different from the default additionally requires a socket implementation that
662listens to this port.
663.TP
c2bc2b27 664.B leftnexthop
f115838b
TB
665this parameter is usually not needed any more because the NETKEY IPsec stack
666does not require explicit routing entries for the traffic to be tunneled. If
667.B leftsourceip
668is used with IKEv1 then
669.B leftnexthop
670must still be set in order for the source routes to work properly.
c2bc2b27
AS
671.TP
672.B leftprotoport
673restrict the traffic selector to a single protocol and/or port.
674Examples:
675.B leftprotoport=tcp/http
7900ab1b 676or
c2bc2b27 677.B leftprotoport=6/80
7900ab1b 678or
c2bc2b27 679.B leftprotoport=udp
7900ab1b
AS
680.TP
681.B leftrsasigkey
682the left participant's
683public key for RSA signature authentication,
684in RFC 2537 format using
685.IR ttodata (3)
686encoding.
687The magic value
688.B %none
689means the same as not specifying a value (useful to override a default).
690The value
691.B %cert
692(the default)
693means that the key is extracted from a certificate.
694The identity used for the left participant
695must be a specific host, not
696.B %any
697or another magic value.
698.B Caution:
699if two connection descriptions
700specify different public keys for the same
701.BR leftid ,
702confusion and madness will ensue.
703.TP
c2bc2b27
AS
704.B leftsendcert
705Accepted values are
706.B never
707or
708.BR no ,
709.B always
710or
711.BR yes ,
712and
f115838b
TB
713.BR ifasked ,
714the latter meaning that the peer must send a certificate request payload in
715order to get a certificate in return.
fea5e716 716.TP
fea5e716 717.B leftsourceip
9b45443d 718The internal source IP to use in a tunnel, also known as virtual IP. If the
f115838b 719value is one of the synonyms
7900ab1b
AS
720.BR %modeconfig ,
721.BR %modecfg ,
722.BR %config ,
9b45443d 723or
f115838b
TB
724.BR %cfg ,
725an address is requested from the peer. In IKEv2, a statically defined address
726is also requested, since the server may change it.
8e79d8d3 727.TP
532137e7 728.B rightsourceip
8e79d8d3
MW
729The internal source IP to use in a tunnel for the remote peer. If the
730value is
731.B %config
f115838b
TB
732on the responder side, the initiator must propose an address which is then
733echoed back. Also supported are address pools expressed as
b0103105 734\fInetwork\fB/\fInetmask\fR
f115838b
TB
735or the use of an external IP address pool using %\fIpoolname\fR,
736where \fIpoolname\fR is the name of the IP address pool used for the lookup.
fea5e716 737.TP
c2bc2b27
AS
738.B leftsubnet
739private subnet behind the left participant, expressed as
f115838b 740\fInetwork\fB/\fInetmask\fR;
c2bc2b27
AS
741if omitted, essentially assumed to be \fIleft\fB/32\fR,
742signifying that the left end of the connection goes to the left participant
743only. When using IKEv2, the configured subnet of the peers may differ, the
34443902
MW
744protocol narrows it to the greatest common subnet. Further, IKEv2 supports
745multiple subnets separated by commas. IKEv1 only interprets the first subnet
746of such a definition.
c2bc2b27
AS
747.TP
748.B leftsubnetwithin
749the peer can propose any subnet or single IP address that fits within the
750range defined by
751.BR leftsubnetwithin.
752Not relevant for IKEv2, as subnets are narrowed.
753.TP
754.B leftupdown
755what ``updown'' script to run to adjust routing and/or firewalling
756when the status of the connection
757changes (default
758.BR "ipsec _updown" ).
759May include positional parameters separated by white space
760(although this requires enclosing the whole string in quotes);
761including shell metacharacters is unwise.
762See
763.IR pluto (8)
764for details.
765Relevant only locally, other end need not agree on it. IKEv2 uses the updown
f115838b
TB
766script to insert firewall rules only, since routing has been implemented
767directly into charon.
c2bc2b27 768.TP
deddfde9
TB
769.B lifebytes
770the number of bytes transmitted over an IPsec SA before it expires (IKEv2
771only).
772.TP
773.B lifepackets
774the number of packets transmitted over an IPsec SA before it expires (IKEv2
775only).
776.TP
777.B lifetime
778how long a particular instance of a connection
779(a set of encryption/authentication keys for user packets) should last,
780from successful negotiation to expiry;
781acceptable values are an integer optionally followed by
782.BR s
783(a time in seconds)
784or a decimal number followed by
785.BR m ,
786.BR h ,
787or
788.B d
789(a time
790in minutes, hours, or days respectively)
791(default
792.BR 1h ,
793maximum
794.BR 24h ).
795Normally, the connection is renegotiated (via the keying channel)
796before it expires (see
797.BR margintime ).
798The two ends need not exactly agree on
799.BR lifetime ,
800although if they do not,
801there will be some clutter of superseded connections on the end
802which thinks the lifetime is longer.
803.TP
804.B marginbytes
805how many bytes before IPsec SA expiry (see
806.BR lifebytes )
807should attempts to negotiate a replacement begin (IKEv2 only).
808.TP
809.B marginpackets
810how many packets before IPsec SA expiry (see
811.BR lifepackets )
812should attempts to negotiate a replacement begin (IKEv2 only).
813.TP
814.B margintime
815how long before connection expiry or keying-channel expiry
816should attempts to
817negotiate a replacement
818begin; acceptable values as for
819.B lifetime
820(default
821.BR 9m ).
822Relevant only locally, other end need not agree on it.
823.TP
8c4339bd
AS
824.B mobike
825enables the IKEv2 MOBIKE protocol defined by RFC 4555. Accepted values are
826.B yes
827(the default) and
828.BR no .
829If set to
830.BR no ,
78279973
MW
831the IKEv2 charon daemon will not actively propose MOBIKE as initiator and
832ignore the MOBIKE_SUPPORTED notify as responder.
8c4339bd 833.TP
7900ab1b
AS
834.B modeconfig
835defines which mode is used to assign a virtual IP.
836Accepted values are
837.B push
838and
839.B pull
840(the default).
841Currently relevant for IKEv1 only since IKEv2 always uses the configuration
f115838b
TB
842payload in pull mode. Cisco VPN gateways usually operate in
843.B push
844mode.
7900ab1b 845.TP
fea5e716
MW
846.B pfs
847whether Perfect Forward Secrecy of keys is desired on the connection's
848keying channel
849(with PFS, penetration of the key-exchange protocol
850does not compromise keys negotiated earlier);
851acceptable values are
852.B yes
853(the default)
854and
7900ab1b
AS
855.BR no.
856IKEv2 always uses PFS for IKE_SA rekeying whereas for CHILD_SA rekeying
857PFS is enforced by defining a Diffie-Hellman modp group in the
858.B esp
859parameter.
0ef961b8 860.TP
8015c91c 861.B pfsgroup
0ef961b8
AS
862defines a Diffie-Hellman group for perfect forward secrecy in IKEv1 Quick Mode
863differing from the DH group used for IKEv1 Main Mode (IKEv1 only).
fea5e716 864.TP
c2bc2b27
AS
865.B reauth
866whether rekeying of an IKE_SA should also reauthenticate the peer. In IKEv1,
867reauthentication is always done. In IKEv2, a value of
868.B no
869rekeys without uninstalling the IPsec SAs, a value of
870.B yes
871(the default) creates a new IKE_SA from scratch and tries to recreate
872all IPsec SAs.
873.TP
fea5e716
MW
874.B rekey
875whether a connection should be renegotiated when it is about to expire;
876acceptable values are
877.B yes
878(the default)
879and
880.BR no .
7900ab1b 881The two ends need not agree, but while a value of
fea5e716 882.B no
f115838b 883prevents pluto/charon from requesting renegotiation,
fea5e716
MW
884it does not prevent responding to renegotiation requested from the other end,
885so
886.B no
887will be largely ineffective unless both ends agree on it.
888.TP
889.B rekeyfuzz
890maximum percentage by which
deddfde9
TB
891.BR marginbytes ,
892.B marginpackets
893and
894.B margintime
fea5e716
MW
895should be randomly increased to randomize rekeying intervals
896(important for hosts with many connections);
897acceptable values are an integer,
898which may exceed 100,
899followed by a `%'
deddfde9 900(defaults to
fea5e716
MW
901.BR 100% ).
902The value of
deddfde9 903.BR marginTYPE ,
fea5e716
MW
904after this random increase,
905must not exceed
deddfde9
TB
906.B lifeTYPE
907(where TYPE is one of
908.IR bytes ,
909.I packets
910or
911.IR time ).
fea5e716
MW
912The value
913.B 0%
deddfde9 914will suppress randomization.
fea5e716
MW
915Relevant only locally, other end need not agree on it.
916.TP
917.B rekeymargin
deddfde9
TB
918synonym for
919.BR margintime .
532f2347 920.TP
c2bc2b27
AS
921.B type
922the type of the connection; currently the accepted values
923are
924.B tunnel
925(the default)
926signifying a host-to-host, host-to-subnet, or subnet-to-subnet tunnel;
927.BR transport ,
928signifying host-to-host transport mode;
84bec926
AS
929.BR transport_proxy ,
930signifying the special Mobile IPv6 transport proxy mode;
c2bc2b27
AS
931.BR passthrough ,
932signifying that no IPsec processing should be done at all;
933.BR drop ,
934signifying that packets should be discarded; and
935.BR reject ,
936signifying that packets should be discarded and a diagnostic ICMP returned.
f115838b 937The IKEv2 daemon charon currently supports
84bec926
AS
938.BR tunnel ,
939.BR transport ,
c2bc2b27 940and
84bec926 941.BR tunnel_proxy
f115838b 942connection types, only.
fea5e716 943.TP
c2bc2b27
AS
944.B xauth
945specifies the role in the XAUTH protocol if activated by
946.B authby=xauthpsk
947or
948.B authby=xauthrsasig.
949Accepted values are
950.B server
951and
952.B client
953(the default).
d5cc1758 954
e74bc8e5 955.SS "CONN PARAMETERS: IKEv2 MEDIATION EXTENSION"
8015c91c 956The following parameters are relevant to IKEv2 Mediation Extension
e74bc8e5 957operation only.
d5cc1758 958.TP 14
e74bc8e5
TB
959.B mediation
960whether this connection is a mediation connection, ie. whether this
d5cc1758
TB
961connection is used to mediate other connections. Mediation connections
962create no child SA. Acceptable values are
963.B no
964(the default) and
965.BR yes .
966.TP
e74bc8e5 967.B mediated_by
d5cc1758
TB
968the name of the connection to mediate this connection through. If given,
969the connection will be mediated through the named mediation connection.
970The mediation connection must set
e74bc8e5 971.BR mediation=yes .
d5cc1758 972.TP
e74bc8e5 973.B me_peerid
d5cc1758
TB
974ID as which the peer is known to the mediation server, ie. which the other
975end of this connection uses as its
976.B leftid
977on its connection to the mediation server. This is the ID we request the
978mediation server to mediate us with. If
e74bc8e5 979.B me_peerid
d5cc1758
TB
980is not given, the
981.B rightid
982of this connection will be used as peer ID.
983
fea5e716
MW
984.SH "CA SECTIONS"
985This are optional sections that can be used to assign special
f115838b 986parameters to a Certification Authority (CA).
fea5e716
MW
987.TP 10
988.B auto
989currently can have either the value
990.B ignore
991or
992.B add
8015c91c 993.
fea5e716
MW
994.TP
995.B cacert
8015c91c 996defines a path to the CA certificate either relative to
fea5e716
MW
997\fI/etc/ipsec.d/cacerts\fP or as an absolute path.
998.TP
999.B crluri
1000defines a CRL distribution point (ldap, http, or file URI)
1001.TP
7900ab1b
AS
1002.B crluri1
1003synonym for
1004.B crluri.
1005.TP
fea5e716
MW
1006.B crluri2
1007defines an alternative CRL distribution point (ldap, http, or file URI)
1008.TP
1009.B ldaphost
7900ab1b 1010defines an ldap host. Currently used by IKEv1 only.
fea5e716
MW
1011.TP
1012.B ocspuri
1013defines an OCSP URI.
7900ab1b
AS
1014.TP
1015.B ocspuri1
1016synonym for
1017.B ocspuri.
1018.TP
1019.B ocspuri2
1020defines an alternative OCSP URI. Currently used by IKEv2 only.
f115838b 1021.TP
6439267a
TB
1022.B certuribase
1023defines the base URI for the Hash and URL feature supported by IKEv2.
1024Instead of exchanging complete certificates, IKEv2 allows to send an URI
1025that resolves to the DER encoded certificate. The certificate URIs are built
1026by appending the SHA1 hash of the DER encoded certificates to this base URI.
fea5e716
MW
1027.SH "CONFIG SECTIONS"
1028At present, the only
1029.B config
1030section known to the IPsec software is the one named
1031.BR setup ,
f115838b 1032which contains information used when the software is being started.
fea5e716
MW
1033Here's an example:
1034.PP
1035.ne 8
1036.nf
1037.ft B
1038.ta 1c
1039config setup
fea5e716 1040 plutodebug=all
7900ab1b
AS
1041 crlcheckinterval=10m
1042 strictcrlpolicy=yes
fea5e716
MW
1043.ft
1044.fi
1045.PP
1046Parameters are optional unless marked ``(required)''.
1047The currently-accepted
1048.I parameter
1049names in a
1050.B config
1051.B setup
b360e393 1052section affecting both daemons are:
fea5e716 1053.TP 14
e0e7ef07
AS
1054.B cachecrls
1055certificate revocation lists (CRLs) fetched via http or ldap will be cached in
1056\fI/etc/ipsec.d/crls/\fR under a unique file name derived from the certification
1057authority's public key.
1058Accepted values are
1059.B yes
1060and
1061.B no
1062(the default).
7900ab1b
AS
1063.TP
1064.B charonstart
e0e7ef07 1065whether to start the IKEv2 Charon daemon or not.
7900ab1b 1066Accepted values are
fea5e716 1067.B yes
7900ab1b
AS
1068or
1069.BR no .
8015c91c 1070The default is
e4838d02
MW
1071.B yes
1072if starter was compiled with IKEv2 support.
7900ab1b 1073.TP
e0e7ef07
AS
1074.B dumpdir
1075in what directory should things started by \fBipsec starter\fR
1076(notably the Pluto and Charon daemons) be allowed to dump core?
1077The empty value (the default) means they are not
1078allowed to.
1079This feature is currently not yet supported by \fBipsec starter\fR.
7900ab1b
AS
1080.TP
1081.B plutostart
e0e7ef07 1082whether to start the IKEv1 Pluto daemon or not.
7900ab1b
AS
1083Accepted values are
1084.B yes
7900ab1b 1085or
fea5e716 1086.BR no .
8015c91c 1087The default is
e4838d02
MW
1088.B yes
1089if starter was compiled with IKEv1 support.
fea5e716 1090.TP
e0e7ef07
AS
1091.B strictcrlpolicy
1092defines if a fresh CRL must be available in order for the peer authentication based
1093on RSA signatures to succeed.
1094Accepted values are
1095.B yes
1096and
1097.B no
1098(the default).
1099IKEv2 additionally recognizes
1100.B ifuri
1101which reverts to
1102.B yes
1103if at least one CRL URI is defined and to
1104.B no
1105if no URI is known.
b360e393
MW
1106.TP
1107.B uniqueids
1108whether a particular participant ID should be kept unique,
1109with any new (automatically keyed)
1110connection using an ID from a different IP address
1111deemed to replace all old ones using that ID;
1112acceptable values are
1113.B yes
1114(the default)
1115and
1116.BR no .
1117Participant IDs normally \fIare\fR unique,
1118so a new (automatically-keyed) connection using the same ID is
1119almost invariably intended to replace an old one.
1120The IKEv2 daemon also accepts the value
1121.B replace
1122wich is identical to
1123.B yes
1124and the value
1125.B keep
1126to reject new IKE_SA setups and keep the duplicate established earlier.
e0e7ef07
AS
1127.PP
1128The following
1129.B config section
1130parameters are used by the IKEv1 Pluto daemon only:
1131.TP
b360e393
MW
1132.B crlcheckinterval
1133interval in seconds. CRL fetching is enabled if the value is greater than zero.
1134Asynchronous, periodic checking for fresh CRLs is currently done by the
1135IKEv1 Pluto daemon only.
1136.TP
e0e7ef07
AS
1137.B keep_alive
1138interval in seconds between NAT keep alive packets, the default being 20 seconds.
1139.TP
1140.B nat_traversal
1141activates NAT traversal by accepting source ISAKMP ports different from udp/500 and
1142being able of floating to udp/4500 if a NAT situation is detected.
1143Accepted values are
1144.B yes
1145and
1146.B no
1147(the default).
a46173df 1148Used by IKEv1 only, NAT traversal always being active in IKEv2.
8c4339bd 1149.TP
e0e7ef07
AS
1150.B nocrsend
1151no certificate request payloads will be sent.
1152Accepted values are
1153.B yes
1154and
1155.B no
1156(the default).
e0e7ef07 1157.TP
dd0ee786
AS
1158.B pkcs11initargs
1159non-standard argument string for PKCS#11 C_Initialize() function;
1160required by NSS softoken.
1161.TP
e0e7ef07
AS
1162.B pkcs11module
1163defines the path to a dynamically loadable PKCS #11 library.
1164.TP
1165.B pkcs11keepstate
1166PKCS #11 login sessions will be kept during the whole lifetime of the keying
1167daemon. Useful with pin-pad smart card readers.
1168Accepted values are
1169.B yes
1170and
1171.B no
1172(the default).
1173.TP
1174.B pkcs11proxy
1175Pluto will act as a PKCS #11 proxy accessible via the whack interface.
1176Accepted values are
1177.B yes
1178and
1179.B no
1180(the default).
1181.TP
fea5e716
MW
1182.B plutodebug
1183how much Pluto debugging output should be logged.
1184An empty value,
1185or the magic value
1186.BR none ,
1187means no debugging output (the default).
1188The magic value
1189.B all
1190means full output.
1191Otherwise only the specified types of output
1192(a quoted list, names without the
1193.B \-\-debug\-
1194prefix,
1195separated by white space) are enabled;
1196for details on available debugging types, see
7900ab1b 1197.IR pluto (8).
fea5e716 1198.TP
0fc1fc0e
AS
1199.B plutostderrlog
1200Pluto will not use syslog, but rather log to stderr, and redirect stderr
1201to the argument file.
1202.TP
e0e7ef07
AS
1203.B postpluto
1204shell command to run after starting Pluto
1205(e.g., to remove a decrypted copy of the
fea5e716
MW
1206.I ipsec.secrets
1207file).
1208It's run in a very simple way;
1209complexities like I/O redirection are best hidden within a script.
1210Any output is redirected for logging,
1211so running interactive commands is difficult unless they use
1212.I /dev/tty
1213or equivalent for their interaction.
1214Default is none.
1215.TP
e0e7ef07
AS
1216.B prepluto
1217shell command to run before starting Pluto
1218(e.g., to decrypt an encrypted copy of the
fea5e716
MW
1219.I ipsec.secrets
1220file).
1221It's run in a very simple way;
1222complexities like I/O redirection are best hidden within a script.
1223Any output is redirected for logging,
1224so running interactive commands is difficult unless they use
1225.I /dev/tty
1226or equivalent for their interaction.
1227Default is none.
1228.TP
e0e7ef07
AS
1229.B virtual_private
1230defines private networks using a wildcard notation.
e0e7ef07
AS
1231.PP
1232The following
1233.B config section
1234parameters are used by the IKEv2 Charon daemon only:
fea5e716 1235.TP
e0e7ef07
AS
1236.B charondebug
1237how much Charon debugging output should be logged.
1238A comma separated list containing type level/pairs may
1239be specified, e.g:
1240.B dmn 3, ike 1, net -1.
1241Acceptable values for types are
1242.B dmn, mgr, ike, chd, job, cfg, knl, net, enc, lib
1243and the level is one of
1244.B -1, 0, 1, 2, 3, 4
1245(for silent, audit, control, controlmore, raw, private).
1246.PP
1247The following
1248.B config section
1249parameters only make sense if the KLIPS IPsec stack
1250is used instead of the default NETKEY stack of the Linux 2.6 kernel:
fea5e716 1251.TP
e0e7ef07
AS
1252.B fragicmp
1253whether a tunnel's need to fragment a packet should be reported
1254back with an ICMP message,
1255in an attempt to make the sender lower his PMTU estimate;
1256acceptable values are
7900ab1b 1257.B yes
e0e7ef07 1258(the default)
7900ab1b 1259and
e0e7ef07 1260.BR no .
7900ab1b 1261.TP
e0e7ef07
AS
1262.B hidetos
1263whether a tunnel packet's TOS field should be set to
1264.B 0
1265rather than copied from the user packet inside;
1266acceptable values are
7900ab1b 1267.B yes
e0e7ef07 1268(the default)
7900ab1b 1269and
e0e7ef07 1270.BR no
fea5e716 1271.TP
e0e7ef07
AS
1272.B interfaces
1273virtual and physical interfaces for IPsec to use:
1274a single
1275\fIvirtual\fB=\fIphysical\fR pair, a (quoted!) list of pairs separated
1276by white space, or
1277.BR %none .
1278One of the pairs may be written as
1279.BR %defaultroute ,
1280which means: find the interface \fId\fR that the default route points to,
1281and then act as if the value was ``\fBipsec0=\fId\fR''.
1282.B %defaultroute
1283is the default;
1284.B %none
1285must be used to denote no interfaces.
7900ab1b 1286.TP
e0e7ef07
AS
1287.B overridemtu
1288value that the MTU of the ipsec\fIn\fR interface(s) should be set to,
1289overriding IPsec's (large) default.
fea5e716
MW
1290.SH FILES
1291.nf
1292/etc/ipsec.conf
7900ab1b
AS
1293/etc/ipsec.d/aacerts
1294/etc/ipsec.d/acerts
fea5e716
MW
1295/etc/ipsec.d/cacerts
1296/etc/ipsec.d/certs
1297/etc/ipsec.d/crls
fea5e716
MW
1298
1299.SH SEE ALSO
f115838b 1300ipsec(8), pluto(8), starter(8)
fea5e716 1301.SH HISTORY
f115838b
TB
1302Originally written for the FreeS/WAN project by Henry Spencer.
1303Updated and extended for the strongSwan project <http://www.strongswan.org> by
1304Tobias Brunner, Andreas Steffen and Martin Willi.
fea5e716
MW
1305.SH BUGS
1306.PP
7900ab1b 1307If conns are to be added before DNS is available, \fBleft=\fP\fIFQDN\fP
fea5e716 1308will fail.