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