OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / utils / ipsec.conf.5
1 .TH IPSEC.CONF 5 "26 Nov 2001"
2 .\" RCSID $Id: ipsec.conf.5,v 1.79 2001/11/26 15:51:24 henry Exp $
3 .SH NAME
4 ipsec.conf \- IPsec configuration and connections
5 .SH DESCRIPTION
6 The
7 .I ipsec.conf
8 file
9 specifies most configuration and control information for the
10 FreeS/WAN IPsec subsystem.
11 (The major exception is secrets for authentication;
12 see
13 .IR ipsec.secrets (5).)
14 Its contents are not security-sensitive
15 .I unless
16 manual keying is being done for more than just testing,
17 in which case the encryption/authentication keys in the
18 descriptions for the manually-keyed connections are very sensitive
19 (and those connection descriptions
20 are probably best kept in a separate file,
21 via the include facility described below).
22 .PP
23 The file is a text file, consisting of one or more
24 .IR sections .
25 White space followed by
26 .B #
27 followed by anything to the end of the line
28 is a comment and is ignored,
29 as are empty lines which are not within a section.
30 .PP
31 A line which contains
32 .B include
33 and a file name, separated by white space,
34 is replaced by the contents of that file,
35 preceded and followed by empty lines.
36 If the file name is not a full pathname,
37 it is considered to be relative to the directory containing the
38 including file.
39 Such inclusions can be nested.
40 Only a single filename may be supplied, and it may not contain white space,
41 but it may include shell wildcards (see
42 .IR sh (1));
43 for example:
44 .PP
45 .B include
46 .B "ipsec.*.conf"
47 .PP
48 The intention of the include facility is mostly to permit keeping
49 information on connections, or sets of connections,
50 separate from the main configuration file.
51 This permits such connection descriptions to be changed,
52 copied to the other security gateways involved, etc.,
53 without having to constantly extract them from the configuration
54 file and then insert them back into it.
55 Note also the
56 .B also
57 parameter (described below) which permits splitting a single logical section
58 (e.g. a connection description) into several actual sections.
59 .PP
60 A section
61 begins with a line of the form:
62 .PP
63 .I type
64 .I name
65 .PP
66 where
67 .I type
68 indicates what type of section follows, and
69 .I name
70 is an arbitrary name which distinguishes the section from others
71 of the same type.
72 (Names must start with a letter and may contain only
73 letters, digits, periods, underscores, and hyphens.)
74 All subsequent non-empty lines
75 which begin with white space are part of the section;
76 comments within a section must begin with white space too.
77 There may be only one section of a given type with a given name.
78 .PP
79 Lines within the section are generally of the form
80 .PP
81 \ \ \ \ \ \fIparameter\fB=\fIvalue\fR
82 .PP
83 (note the mandatory preceding white space).
84 There can be white space on either side of the
85 .BR = .
86 Parameter names follow the same syntax as section names,
87 and are specific to a section type.
88 Unless otherwise explicitly specified,
89 no parameter name may appear more than once in a section.
90 .PP
91 An empty
92 .I value
93 stands for the system default value (if any) of the parameter,
94 i.e. it is roughly equivalent to omitting the parameter line entirely.
95 A
96 .I value
97 may contain white space only if the entire
98 .I value
99 is enclosed in double quotes (\fB"\fR);
100 a
101 .I value
102 cannot itself contain a double quote,
103 nor may it be continued across more than one line.
104 .PP
105 Numeric values are specified to be either an ``integer''
106 (a sequence of digits) or a ``decimal number''
107 (sequence of digits optionally followed by `.' and another sequence of digits).
108 .PP
109 There is currently one parameter which is available in any type of
110 section:
111 .TP
112 .B also
113 the value is a section name;
114 the parameters of that section are appended to this section,
115 as if they had been written as part of it.
116 The specified section must exist, must follow the current one,
117 and must have the same section type.
118 (Nesting is permitted,
119 and there may be more than one
120 .B also
121 in a single section,
122 although it is forbidden to append the same section more than once.)
123 This allows, for example, keeping the encryption keys
124 for a connection in a separate file
125 from the rest of the description, by using both an
126 .B also
127 parameter and an
128 .B include
129 line.
130 (Caution, see BUGS below for some restrictions.)
131 .PP
132 Parameter names beginning with
133 .B x-
134 (or
135 .BR X- ,
136 or
137 .BR x_ ,
138 or
139 .BR X_ )
140 are reserved for user extensions and will never be assigned meanings
141 by IPsec.
142 Parameters with such names must still observe the syntax rules
143 (limits on characters used in the name;
144 no white space in a non-quoted value;
145 no newlines or double quotes within the value).
146 All other as-yet-unused parameter names are reserved for future IPsec
147 improvements.
148 .PP
149 A section with name
150 .B %default
151 specifies defaults for sections of the same type.
152 For each parameter in it,
153 any section of that type which does not have a parameter of the same name
154 gets a copy of the one from the
155 .B %default
156 section.
157 There may be multiple
158 .B %default
159 sections of a given type,
160 but only one default may be supplied for any specific parameter name,
161 and all
162 .B %default
163 sections of a given type must precede all non-\c
164 .B %default
165 sections of that type.
166 .B %default
167 sections may not contain
168 .B also
169 parameters.
170 .PP
171 Currently there are two types of section:
172 a
173 .B config
174 section specifies general configuration information for IPsec,
175 while a
176 .B conn
177 section specifies an IPsec connection.
178 .SH "CONN SECTIONS"
179 A
180 .B conn
181 section contains a
182 .IR "connection specification" ,
183 defining a network connection to be made using IPsec.
184 The name given is arbitrary, and is used to identify the connection to
185 .IR ipsec_auto (8)
186 and
187 .IR ipsec_manual (8).
188 Here's a simple example:
189 .PP
190 .ne 10
191 .nf
192 .ft B
193 .ta 1c
194 conn snt
195         left=10.11.11.1
196         leftsubnet=10.0.1.0/24
197         leftnexthop=172.16.55.66
198         right=192.168.22.1
199         rightsubnet=10.0.2.0/24
200         rightnexthop=172.16.88.99
201         keyingtries=0                # be very persistent
202 .ft
203 .fi
204 .PP
205 A note on terminology...
206 In automatic keying, there are two kinds of communications going on:
207 transmission of user IP packets, and gateway-to-gateway negotiations for
208 keying, rekeying, and general control.
209 The data path (a set of ``IPsec SAs'') used for user packets is herein
210 referred to as the ``connection'';
211 the path used for negotiations (built with ``ISAKMP SAs'') is referred to as
212 the ``keying channel''.
213 .PP
214 To avoid trivial editing of the configuration file to suit it to each system
215 involved in a connection,
216 connection specifications are written in terms of
217 .I left
218 and
219 .I right
220 participants,
221 rather than in terms of local and remote.
222 Which participant is considered
223 .I left
224 or
225 .I right
226 is arbitrary;
227 IPsec figures out which one it is being run on based on internal information.
228 This permits using identical connection specifications on both ends.
229 .PP
230 Many of the parameters relate to one participant or the other;
231 only the ones for
232 .I left
233 are listed here, but every parameter whose name begins with
234 .B left
235 has a
236 .B right
237 counterpart,
238 whose description is the same but with
239 .B left
240 and
241 .B right
242 reversed.
243 .PP
244 Parameters are optional unless marked ``(required)'';
245 a parameter required for manual keying need not be included for
246 a connection which will use only automatic keying, and vice versa.
247 .SS "CONN PARAMETERS:  GENERAL"
248 The following parameters are relevant to both automatic and manual keying.
249 Unless otherwise noted,
250 for a connection to work,
251 in general it is necessary for the two ends to agree exactly
252 on the values of these parameters.
253 .TP 14
254 .B type
255 the type of the connection; currently the accepted values
256 are
257 .B tunnel
258 (the default)
259 signifying a host-to-host, host-to-subnet, or subnet-to-subnet tunnel;
260 .BR transport ,
261 signifying host-to-host transport mode;
262 and
263 .BR passthrough
264 (supported only for manual keying),
265 signifying that no IPsec processing should be done at all
266 .TP
267 .B left
268 (required)
269 the IP address of the left participant's public-network interface,
270 in any form accepted by
271 .IR ipsec_ttoaddr (3).
272 If it is the magic value
273 .BR %defaultroute ,
274 and
275 .B interfaces=%defaultroute
276 is used in the
277 .B config
278 .B setup
279 section,
280 .B left
281 will be filled in automatically with the local address
282 of the default-route interface (as determined at IPsec startup time);
283 this also overrides any value supplied for
284 .BR leftnexthop .
285 (Either
286 .B left
287 or
288 .B right
289 may be
290 .BR %defaultroute ,
291 but not both.)
292 The magic value
293 .B %any
294 signifies an address to be filled in (by automatic keying) during
295 negotiation;
296 the magic value
297 .B %opportunistic
298 signifies that both
299 .B left
300 and
301 .B leftnexthop
302 are to be filled in (by automatic keying) from DNS data for
303 .BR left 's
304 client.
305 .TP
306 .B leftsubnet
307 private subnet behind the left participant, expressed as
308 \fInetwork\fB/\fInetmask\fR
309 (actually, any form acceptable to
310 .IR ipsec_ttosubnet (3));
311 if omitted, essentially assumed to be \fIleft\fB/32\fR,
312 signifying that the left end of the connection goes to the left participant only
313 .TP
314 .B leftnexthop
315 next-hop gateway IP address for the left participant's connection
316 to the public network;
317 defaults to
318 .B %direct
319 (meaning
320 .IR right ).
321 If the value is to be overridden by the
322 .B left=%defaultroute
323 method (see above),
324 an explicit value must
325 .I not
326 be given.
327 If that method is not being used,
328 but
329 .B leftnexthop
330 is
331 .BR %defaultroute ,
332 and
333 .B interfaces=%defaultroute
334 is used in the
335 .B config
336 .B setup
337 section,
338 the next-hop gateway address of the default-route interface
339 will be used.
340 The magic value
341 .B %direct
342 signifies a value to be filled in (by automatic keying)
343 with the peer's address.
344 Relevant only locally, other end need not agree on it.
345 .TP
346 .B leftupdown
347 what ``updown'' script to run to adjust routing and/or firewalling
348 when the status of the connection
349 changes (default
350 .BR "ipsec _updown" ).
351 May include positional parameters separated by white space
352 (although this requires enclosing the whole string in quotes);
353 including shell metacharacters is unwise.
354 See
355 .IR ipsec_pluto (8)
356 for details.
357 Relevant only locally, other end need not agree on it.
358 .TP
359 .B leftfirewall
360 whether the left participant is doing forwarding-firewalling
361 (including masquerading) for traffic from \fIleftsubnet\fR,
362 which should be turned off (for traffic to the other subnet)
363 once the connection is established;
364 acceptable values are
365 .B yes
366 and (the default)
367 .BR no .
368 May not be used in the same connection description with
369 .BR leftupdown .
370 Implemented as a parameter to the default
371 .I updown
372 script.
373 See notes below.
374 Relevant only locally, other end need not agree on it.
375 .PP
376 If one or both security gateways are doing forwarding firewalling
377 (possibly including masquerading),
378 and this is specified using the firewall parameters,
379 tunnels established with IPsec are exempted from it
380 so that packets can flow unchanged through the tunnels.
381 (This means that all subnets connected in this manner must have
382 distinct, non-overlapping subnet address blocks.)
383 This is done by the default
384 .I updown
385 script (see
386 .IR ipsec_pluto (8)).
387 .PP
388 The implementation of this makes certain assumptions about firewall setup,
389 notably the use of the old
390 .I ipfwadm
391 interface to the firewall.
392 In situations calling for more control,
393 it may be preferable for the user to supply his own
394 .I updown
395 script,
396 which makes the appropriate adjustments for his system.
397 .SS "CONN PARAMETERS:  AUTOMATIC KEYING"
398 The following parameters are relevant only to automatic keying,
399 and are ignored in manual keying.
400 Unless otherwise noted,
401 for a connection to work,
402 in general it is necessary for the two ends to agree exactly
403 on the values of these parameters.
404 .TP 14
405 .B keyexchange
406 method of key exchange;
407 the default and currently the only accepted value is
408 .B ike
409 .TP
410 .B auto
411 what operation, if any, should be done automatically at IPsec startup;
412 currently-accepted values are
413 .B add
414 (signifying an
415 .B ipsec auto
416 .BR \-\-add ),
417 .B route
418 (signifying that plus an
419 .B ipsec auto
420 .BR \-\-route ),
421 .B start
422 (signifying that plus an
423 .B ipsec auto
424 .BR \-\-up ),
425 and
426 .B ignore
427 (also the default) (signifying no automatic startup operation).
428 This parameter is ignored unless the
429 .B plutoload
430 or
431 .B plutostart
432 configuration parameter is set suitably; see the
433 .B config
434 .B setup
435 discussion below.
436 Relevant only locally, other end need not agree on it
437 (but in general, for an intended-to-be-permanent connection,
438 both ends should use
439 .B auto=start
440 to ensure that any reboot causes immediate renegotiation).
441 .TP
442 .B auth
443 whether authentication should be done as part of
444 ESP encryption, or separately using the AH protocol;
445 acceptable values are
446 .B esp
447 (the default) and
448 .BR ah .
449 .TP
450 .B authby
451 how the two security gateways should authenticate each other;
452 acceptable values are
453 .B secret
454 for shared secrets (the default) and
455 .B rsasig
456 for RSA digital signatures
457 .TP
458 .B leftid
459 how
460 the left participant
461 should be identified for authentication;
462 defaults to
463 .BR left .
464 Can be an IP address (in any
465 .IR ipsec_ttoaddr (3)
466 syntax)
467 or a fully-qualified domain name preceded by
468 .B @
469 (which is used as a literal string and not resolved).
470 .TP
471 .B leftrsasigkey
472 the left participant's
473 public key for RSA signature authentication,
474 in RFC 2537 format using
475 .IR ipsec_ttodata (3)
476 encoding;
477 the magic value
478 .B %dns
479 means to fetch it from DNS (at the time
480 the connection description is read from
481 .IR ipsec.conf )
482 instead.
483 The identity used for the left participant
484 must be a specific host, not
485 .B %any
486 or another magic value.
487 .B Caution:
488 if two connection descriptions
489 specify different public keys for the same
490 .BR leftid ,
491 confusion and madness will ensue.
492 .TP
493 .B pfs
494 whether Perfect Forward Secrecy of keys is desired on the connection's
495 keying channel
496 (with PFS, penetration of the key-exchange protocol
497 does not compromise keys negotiated earlier);
498 acceptable values are
499 .B yes
500 (the default)
501 and
502 .BR no .
503 .TP
504 .B keylife
505 how long a particular instance of a connection
506 (a set of encryption/authentication keys for user packets) should last,
507 from successful negotiation to expiry;
508 acceptable values are an integer optionally followed by
509 .BR s
510 (a time in seconds)
511 or a decimal number followed by
512 .BR m ,
513 .BR h ,
514 or
515 .B d
516 (a time
517 in minutes, hours, or days respectively)
518 (default
519 .BR 8.0h ,
520 maximum
521 .BR 24h ).
522 Normally, the connection is renegotiated (via the keying channel)
523 before it expires.
524 The two ends need not exactly agree on
525 .BR keylife ,
526 although if they do not,
527 there will be some clutter of superseded connections on the end
528 which thinks the lifetime is longer.
529 .TP
530 .B rekey
531 whether a connection should be renegotiated when it is about to expire;
532 acceptable values are
533 .B yes
534 (the default)
535 and
536 .BR no .
537 The two ends need not agree,
538 but while a value of
539 .B no
540 prevents Pluto from requesting renegotiation,
541 it does not prevent responding to renegotiation requested from the other end,
542 so
543 .B no
544 will be largely ineffective unless both ends agree on it.
545 .TP
546 .B rekeymargin
547 how long before connection expiry or keying-channel expiry
548 should attempts to
549 negotiate a replacement
550 begin; acceptable values as for
551 .B keylife
552 (default
553 .BR 9m ).
554 Relevant only locally, other end need not agree on it.
555 .TP
556 .B rekeyfuzz
557 maximum percentage by which
558 .B rekeymargin
559 should be randomly increased to randomize rekeying intervals
560 (important for hosts with many connections);
561 acceptable values are an integer,
562 which may exceed 100,
563 followed by a `%'
564 (default set by
565 .IR ipsec_pluto (8),
566 currently
567 .BR 100% ).
568 The value of
569 .BR rekeymargin ,
570 after this random increase,
571 must not exceed
572 .BR keylife .
573 The value
574 .B 0%
575 will suppress time randomization.
576 Relevant only locally, other end need not agree on it.
577 .TP
578 .B keyingtries
579 how many attempts (an integer) should be made to
580 negotiate a connection, or a replacement for one, before giving up
581 (default
582 .BR 3 );
583 the value
584 .B 0
585 means ``never give up''
586 Relevant only locally, other end need not agree on it.
587 .TP
588 .B ikelifetime
589 how long the keying channel of a connection (buzzphrase:  ``ISAKMP SA'')
590 should last before being renegotiated;
591 acceptable values as for
592 .B keylife
593 (default set by
594 .IR ipsec_pluto (8),
595 currently
596 .BR 1h ,
597 maximum
598 .BR 8h ).
599 The two-ends-disagree case is similar to that of
600 .BR keylife .
601 .TP
602 .B compress
603 whether IPComp compression of content is desired on the connection
604 (link-level compression does not work on encrypted data,
605 so to be effective, compression must be done \fIbefore\fR encryption);
606 acceptable values are
607 .B yes
608 and
609 .B no
610 (the default).
611 The two ends need not agree.
612 A value of
613 .B no
614 is absolute:
615 IPsec will neither propose nor accept compression.
616 A value of
617 .B yes
618 causes IPsec to propose both compressed and uncompressed,
619 and prefer compressed.
620 .TP
621 .B disablearrivalcheck
622 whether KLIPS's normal tunnel-exit check
623 (that a packet emerging from a tunnel has plausible addresses in its header)
624 should be disabled;
625 acceptable values are
626 .B yes
627 (the backward-compatible default)
628 and
629 .BR no .
630 Relevant only locally, other end need not agree on it.
631 .SS "CONN PARAMETERS:  MANUAL KEYING"
632 The following parameters are relevant only to manual keying,
633 and are ignored in automatic keying.
634 Unless otherwise noted,
635 for a connection to work,
636 in general it is necessary for the two ends to agree exactly
637 on the values of these parameters.
638 A manually-keyed
639 connection must specify at least one of AH or ESP.
640 .TP 14
641 .B spi
642 (this or
643 .B spibase
644 required for manual keying)
645 the SPI number to be used for the connection (see
646 .IR ipsec_manual (8));
647 must be of the form \fB0x\fIhex\fB\fR,
648 where
649 .I hex
650 is one or more hexadecimal digits
651 (note, it will generally be necessary to make
652 .I spi
653 at least
654 .B 0x100
655 to be acceptable to KLIPS,
656 and use of SPIs in the range
657 .BR 0x100 - 0xfff
658 is recommended)
659 .TP 14
660 .B spibase
661 (this or
662 .B spi
663 required for manual keying)
664 the base number for the SPIs to be used for the connection (see
665 .IR ipsec_manual (8));
666 must be of the form \fB0x\fIhex\fB0\fR,
667 where
668 .I hex
669 is one or more hexadecimal digits
670 (note, it will generally be necessary to make
671 .I spibase
672 at least
673 .B 0x100
674 for the resulting SPIs
675 to be acceptable to KLIPS,
676 and use of numbers in the range
677 .BR 0x100 - 0xff0
678 is recommended)
679 .TP
680 .B esp
681 ESP encryption/authentication algorithm to be used
682 for the connection, e.g.
683 .B 3des-md5-96
684 (must be suitable as a value of
685 .IR ipsec_spi (8)'s
686 .B \-\-esp
687 option);
688 default is not to use ESP
689 .TP
690 .B espenckey
691 ESP encryption key
692 (must be suitable as a value of
693 .IR ipsec_spi (8)'s
694 .B \-\-enckey
695 option)
696 (may be specified separately for each direction using
697 .B leftespenckey
698 (leftward SA)
699 and
700 .B rightespenckey
701 parameters)
702 .TP
703 .B espauthkey
704 ESP authentication key
705 (must be suitable as a value of
706 .IR ipsec_spi (8)'s
707 .B \-\-authkey
708 option)
709 (may be specified separately for each direction using
710 .B leftespauthkey
711 (leftward SA)
712 and
713 .B rightespauthkey
714 parameters)
715 .TP
716 .B espreplay_window
717 ESP replay-window setting,
718 an integer from
719 .B 0
720 (the
721 .IR ipsec_manual
722 default, which turns off replay protection) to
723 .BR 64 ;
724 relevant only if ESP authentication is being used
725 .TP
726 .B leftespspi
727 SPI to be used for the leftward ESP SA, overriding
728 automatic assignment using
729 .B spi
730 or
731 .BR spibase ;
732 typically a hexadecimal number beginning with
733 .B 0x
734 .TP
735 .B ah
736 AH authentication algorithm to be used
737 for the connection, e.g.
738 .B hmac-md5-96
739 (must be suitable as a value of
740 .IR ipsec_spi (8)'s
741 .B \-\-ah
742 option);
743 default is not to use AH
744 .TP
745 .B ahkey
746 (required if
747 .B ah
748 is present) AH authentication key
749 (must be suitable as a value of
750 .IR ipsec_spi (8)'s
751 .B \-\-authkey
752 option)
753 (may be specified separately for each direction using
754 .B leftahkey
755 (leftward SA)
756 and
757 .B rightahkey
758 parameters)
759 .TP
760 .B ahreplay_window
761 AH replay-window setting,
762 an integer from
763 .B 0
764 (the
765 .I ipsec_manual
766 default, which turns off replay protection) to
767 .B 64
768 .TP
769 .B leftahspi
770 SPI to be used for the leftward AH SA, overriding
771 automatic assignment using
772 .B spi
773 or
774 .BR spibase ;
775 typically a hexadecimal number beginning with
776 .B 0x
777 .SH "CONFIG SECTIONS"
778 At present, the only
779 .B config
780 section known to the IPsec software is the one named
781 .BR setup ,
782 which contains information used when the software is being started
783 (see
784 .IR ipsec_setup (8)).
785 Here's an example:
786 .PP
787 .ne 8
788 .nf
789 .ft B
790 .ta 1c
791 config setup
792         interfaces="ipsec0=eth1 ipsec1=ppp0"
793         klipsdebug=none
794         plutodebug=all
795         manualstart=
796         plutoload="snta sntb sntc sntd"
797         plutostart=
798 .ft
799 .fi
800 .PP
801 Parameters are optional unless marked ``(required)''.
802 The currently-accepted
803 .I parameter
804 names in a
805 .B config
806 .B setup
807 section are:
808 .TP 14
809 .B interfaces
810 (required)
811 virtual and physical interfaces for IPsec to use:
812 a single
813 \fIvirtual\fB=\fIphysical\fR pair, a (quoted!) list of pairs separated
814 by white space,
815 or
816 .BR %defaultroute ,
817 which means to find the interface \fId\fR that the default route points to,
818 and then act as if the value was ``\fBipsec0=\fId\fR''.
819 (Also, in the
820 .B %defaultroute
821 case,
822 information about the default route and its interface is noted for
823 use by
824 .IR ipsec_manual (8)
825 and
826 .IR ipsec_auto (8).)
827 .TP
828 .B forwardcontrol
829 whether
830 .I setup
831 should turn IP forwarding on
832 (if it's not already on) as IPsec is started,
833 and turn it off again (if it was off) as IPsec is stopped;
834 acceptable values are
835 .B yes
836 and (the default)
837 .BR no .
838 For this to have full effect, forwarding must be
839 disabled before the hardware interfaces are brought
840 up (e.g.,
841 .B "net.ipv4.ip_forward\ =\ 0"
842 in Red Hat 6.x
843 .IR /etc/sysctl.conf ),
844 because IPsec doesn't get control early enough to do that.
845 .TP
846 .B syslog
847 the
848 .IR syslog (2)
849 ``facility'' name and priority to use for
850 startup/shutdown log messages,
851 default
852 .BR daemon.error .
853 .TP
854 .B klipsdebug
855 how much KLIPS debugging output should be logged.
856 An empty value,
857 or the magic value
858 .BR none ,
859 means no debugging output (the default).
860 The magic value
861 .B all
862 means full output.
863 Otherwise only the specified types of output
864 (a quoted list, names separated by white space) are enabled;
865 for details on available debugging types, see
866 .IR ipsec_klipsdebug (8).
867 .TP
868 .B plutodebug
869 how much Pluto debugging output should be logged.
870 An empty value,
871 or the magic value
872 .BR none ,
873 means no debugging output (the default).
874 The magic value
875 .B all
876 means full output.
877 Otherwise only the specified types of output
878 (a quoted list, names without the
879 .B \-\-debug\-
880 prefix,
881 separated by white space) are enabled;
882 for details on available debugging types, see
883 .IR ipsec_pluto (8).
884 .TP
885 .B dumpdir
886 in what directory should things started by
887 .I setup
888 (notably the Pluto daemon) be allowed to
889 dump core?
890 The empty value (the default) means they are not
891 allowed to.
892 .TP
893 .B dump
894 obsolete variant of
895 .BR dumpdir .
896 .B dump=no
897 is synonymous with
898 .B dumpdir=
899 and
900 .B dump=yes
901 is synonymous with
902 .BR dump=/var/tmp .
903 .TP
904 .B manualstart
905 which manually-keyed connections to set up at startup
906 (empty, a name, or a quoted list of names separated by white space);
907 see
908 .IR ipsec_manual (8).
909 Default is none.
910 .TP
911 .B pluto
912 whether to start Pluto or not;
913 Values are
914 .B yes
915 (the default)
916 or
917 .B no
918 (useful only in special circumstances).
919 .TP
920 .B plutoload
921 which connections (by name) to load
922 into Pluto's internal database at startup
923 (empty, a name, or a quoted list of names separated by white space);
924 see
925 .IR ipsec_auto (8)
926 for details.
927 Default is none.
928 If the special value
929 .B %search
930 is used, all connections with
931 .BR auto=add ,
932 .BR auto=route ,
933 or
934 .B auto=start
935 are loaded.
936 .TP
937 .B plutostart
938 which connections (by name) to attempt to negotiate
939 at startup (empty, a name, or a quoted
940 list of names separated by white space);
941 any such names which do not appear in
942 .B plutoload
943 are implicitly added to it.
944 Default is none.
945 If the special value
946 .B %search
947 is used, all connections with
948 .B auto=route
949 or
950 .B auto=start
951 are routed,
952 and all connections with
953 .B auto=start
954 are started.
955 .TP
956 .B plutowait
957 should Pluto wait for each
958 .B plutostart
959 negotiation attempt to
960 finish before proceeding with the next?
961 Values are
962 .B yes
963 (the default)
964 or
965 .BR no .
966 .TP
967 .B plutobackgroundload
968 obsolete parameter, ignored, nominally specifying whether
969 loading and starting of connections should be spun off as a background
970 process to avoid startup delays.
971 This is now always done.
972 Values were
973 .B yes
974 or
975 .BR no
976 (the default).
977 .TP
978 .B prepluto
979 shell command to run before starting Pluto
980 (e.g., to decrypt an encrypted copy of the
981 .I ipsec.secrets
982 file).
983 It's run in a very simple way;
984 complexities like I/O redirection are best hidden within a script.
985 Any output is redirected for logging,
986 so running interactive commands is difficult unless they use
987 .I /dev/tty
988 or equivalent for their interaction.
989 Default is none.
990 .TP
991 .B postpluto
992 shell command to run after starting Pluto
993 (e.g., to remove a decrypted copy of the
994 .I ipsec.secrets
995 file).
996 It's run in a very simple way;
997 complexities like I/O redirection are best hidden within a script.
998 Any output is redirected for logging,
999 so running interactive commands is difficult unless they use
1000 .I /dev/tty
1001 or equivalent for their interaction.
1002 Default is none.
1003 .TP
1004 .B fragicmp
1005 whether a tunnel's need to fragment a packet should be reported
1006 back with an ICMP message,
1007 in an attempt to make the sender lower his PMTU estimate;
1008 acceptable values are
1009 .B yes
1010 (the default)
1011 and
1012 .BR no .
1013 .TP
1014 .B packetdefault
1015 what should be done with
1016 a packet which reaches KLIPS (via a route into a virtual interface)
1017 but does not match any eroute;
1018 acceptable values are
1019 .B pass
1020 (\fIinsecure unless you really know what you're doing!!!\fR),
1021 .B drop
1022 (the default),
1023 and
1024 .B reject
1025 (currently same as
1026 .BR drop ,
1027 but eventually it will send an ICMP notification back
1028 to the sender).
1029 .TP
1030 .B no_eroute_pass
1031 obsolete parameter similar to
1032 .B packetdefault
1033 but with more limited functionality;
1034 ignored if
1035 .B packetdefault
1036 is set;
1037 acceptable values are
1038 .B yes
1039 (synonymous with
1040 .BR packetdefault=pass )
1041 and
1042 .B no
1043 (synonymous with
1044 .BR packetdefault=drop )
1045 (the default).
1046 .TP
1047 .B hidetos
1048 whether a tunnel packet's TOS field should be set to
1049 .B 0
1050 rather than copied from the user packet inside;
1051 acceptable values are
1052 .B yes
1053 (the default)
1054 and
1055 .BR no .
1056 .TP
1057 .B uniqueids
1058 whether a particular participant ID should be kept unique,
1059 with any new (automatically keyed)
1060 connection using an ID from a different IP address
1061 deemed to replace all old ones using that ID;
1062 acceptable values are
1063 .B yes
1064 and
1065 .B no
1066 (the default).
1067 .TP
1068 .B overridemtu
1069 value that the MTU of the ipsec\fIn\fR interface(s) should be set to,
1070 overriding IPsec's (large) default.
1071 This parameter is needed only in special situations.
1072 .SH "RECOMMENDED CONFIGURATION"
1073 Certain parameters are now strongly-recommended defaults,
1074 but cannot (yet) be made system defaults due to backward compatibility.
1075 They \fIare\fR supplied as ``boilerplate'' in the sample
1076 .I ipsec.conf
1077 file which is put in place as part of a new FreeS/WAN install.
1078 .PP
1079 Recommended
1080 .B "config setup"
1081 parameters are:
1082 .TP
1083 .B plutoload=%search
1084 .TP
1085 .B plutostart=%search
1086 In practice, it is preferable to use the
1087 .B auto
1088 parameter to control whether a particular
1089 connection is added or started automatically.
1090 .TP
1091 .B uniqueids=yes
1092 Participant IDs normally \fIare\fR unique,
1093 so a new (automatically-keyed) connection using the same ID is
1094 almost invariably intended to replace an old one.
1095 .PP
1096 Recommended
1097 .B conn
1098 parameters (mostly for automatic keying, as manual keying seldom sees
1099 much use) are:
1100 .TP
1101 .B keyingtries=0
1102 Unlimited retries are normally appropriate for VPN connections.
1103 Finite values may be needed for Road Warrior and other more-ephemeral
1104 applications,
1105 but the fixed small default is pretty much useless.
1106 .TP
1107 .B disablearrivalcheck=no
1108 Tunnel-exit checks improve security and do not break any normal configuration.
1109 .TP
1110 .B authby=rsasig
1111 Digital signatures are superior in every way to shared secrets.
1112 .TP
1113 .B leftrsasigkey=%dns
1114 .TP
1115 .B rightrsasigkey=%dns
1116 Fetching public keys from DNS is generally more convenient
1117 than having to preconfigure them in configuration files.
1118 .SH FILES
1119 /etc/ipsec.conf
1120 .SH SEE ALSO
1121 ipsec(8), ipsec_ttoaddr(8), ipsec_auto(8), ipsec_manual(8), ipsec_rsasigkey(8)
1122 .SH HISTORY
1123 Designed for the FreeS/WAN project
1124 <http://www.freeswan.org>
1125 by Henry Spencer.
1126 .SH BUGS
1127 Including attributes of the keying channel
1128 (authentication methods,
1129 .BR ikelifetime ,
1130 etc.)
1131 as an attribute of a connection,
1132 rather than of a participant pair, is dubious and incurs limitations.
1133 .PP
1134 In general, the defaults often were chosen for backward compatibility
1135 and are less than ideal.
1136 Notably, the
1137 .B keyingtries
1138 default should be
1139 .BR 0 .
1140 .PP
1141 .IR Ipsec_manual
1142 is not nearly as generous about the syntax of subnets,
1143 addresses, etc. as the usual FreeS/WAN user interfaces.
1144 Four-component dotted-decimal must be used for all addresses.
1145 It
1146 .I is
1147 smart enough to translate bit-count netmasks to dotted-decimal form.
1148 .PP
1149 It would be good to have a line-continuation syntax,
1150 especially for the very long lines involved in
1151 RSA signature keys.
1152 .PP
1153 The ability to specify different identities,
1154 .BR authby ,
1155 and public keys for different automatic-keyed connections
1156 between the same participants is misleading;
1157 this doesn't work dependably because the identity of the participants
1158 is not known early enough.
1159 This is especially awkward for the ``Road Warrior'' case,
1160 where the remote IP address is specified as
1161 .BR 0.0.0.0 ,
1162 and that is considered to be the ``participant'' for such connections.
1163 .PP
1164 In principle it might be necessary to control MTU on an
1165 interface-by-interface basis,
1166 rather than with the single global override that
1167 .B overridemtu
1168 provides.
1169 .PP
1170 A number of features which \fIcould\fR be implemented in
1171 both manual and automatic keying
1172 actually are not yet implemented for manual keying.
1173 This is unlikely to be fixed any time soon.