]> git.saurik.com Git - apple/ipsec.git/blame - ipsec-tools/racoon/racoon.conf.5
ipsec-34.0.3.tar.gz
[apple/ipsec.git] / ipsec-tools / racoon / racoon.conf.5
CommitLineData
52b7d2ce
A
1.\" $Id: racoon.conf.5,v 1.27.2.12 2005/11/25 16:06:32 manubsd Exp $
2.\"
3.\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the project nor the names of its contributors
15.\" may be used to endorse or promote products derived from this software
16.\" without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.Dd November 23, 2004
31.Dt RACOON.CONF 5
32.Os
33.\"
34.Sh NAME
35.Nm racoon.conf
36.Nd configuration file for racoon
37.\"
38.\" .Sh SYNOPSIS
39.\"
40.Sh DESCRIPTION
41.Nm
42is the configuration file for the
43.Xr racoon 8
44ISAKMP daemon.
45.Xr racoon 8
46negotiates security associations for itself (ISAKMP SA, or phase 1 SA)
47and for kernel IPsec (IPsec SA, or phase 2 SA).
48The file consists of a sequence of directives and statements.
49Each directive is composed by a tag and statements, enclosed by
50.Ql {
51and
52.Ql } .
53Lines beginning with
54.Ql #
55are comments.
56.\"
57.Ss Meta Syntax
58Keywords and special characters that the parser expects exactly are
59displayed using
60.Ic this
61font.
62Parameters are specified with
63.Ar this
64font.
65Square brackets
66.Po
67.Ql \&[
68and
69.Ql \&]
70.Pc
71are used to show optional keywords and parameters.
72Note that
73you have to pay attention when this manual is describing
74.Ar port
75numbers.
76The
77.Ar port
78number is always enclosed by
79.Ql \&[
80and
81.Ql \&] .
82In this case, the port number is not an optional keyword.
83If it is possible to omit the
84.Ar port
85number,
86the expression becomes
87.Bq Bq Ar port .
88The vertical bar
89.Pq Ql \&|
90is used to indicate
91a choice between optional parameters.
92Parentheses
93.Po
94.Ql \&(
95and
96.Ql \&)
97.Pc
98are used to group keywords and parameters when necessary.
99Major parameters are listed below.
100.Pp
101.Bl -tag -width addressx -compact
102.It Ar number
103means a hexadecimal or a decimal number.
104The former must be prefixed with
105.Ql Li 0x .
106.It Ar string
107.It Ar path
108.It Ar file
109means any string enclosed in
110.Ql \&"
111.Pq double quotes .
112.It Ar address
113means IPv6 and/or IPv4 address.
114.It Ar port
115means a TCP/UDP port number.
116The port number is always enclosed by
117.Ql \&[
118and
119.Ql \&] .
120.It Ar timeunit
121is one of following:
122.Ic sec , secs , second , seconds ,
123.Ic min , mins , minute , minutes ,
124.Ic hour , hours .
125.El
126.\"
127.Ss Privilege separation
128.Bl -tag -width Ds -compact
129.It Ic privsep { Ar statements Ic }
130specifies privilege separation parameters.
131When enabled, these enable
132.Xr racoon 8
133to operate with an unprivileged instance doing most of the work, while
134a privileged instance takes care of performing the following operations
135as root: reading PSK and private keys, launching hook scripts, and
136validating passwords against system databases or against PAM.
137.Pp
138.Bl -tag -width Ds -compact
139.It Ic user Ar user ;
140The user to which the unprivileged instance of
141.Xr racoon 8 ,
142should switch.
143This can be a quoted user name or a numeric UID.
144.It Ic group Ar group ;
145The group to which the unprivileged instance of
146.Xr racoon 8 ,
147should switch.
148This can be a quoted group name or a numeric GID.
149.It Ic chroot Ar path ;
150A directory to which the unprivileged instance of
151.Xr racoon 8
152should
153.Xr chroot 2 .
154This directory should hold a tree where the following files must be
155reachable:
156.Bl -tag -width Ds -compact
157.It Pa /dev/random
158.It Pa /dev/urandom
159.It the certificates
160.It the file containing the Xauth banner
161.El
162.Pp
163The PSK file, the private keys, and the hook scripts are accessed through the
164privileged instance of
165.Xr racoon 8
166and do not need to be reachable in the
167.Xr chroot 2 Ap ed
168tree.
169.El
170.El
171.Ss Path Specification
172This section specify various paths used by racoon.
173When running in privilege separation mode,
174.Ic certificate
175and
176.Ic script
177paths are mandatory.
178.Bl -tag -width Ds -compact
179.It Ic path include Ar path ;
180specifies a path to include a file.
181See
182.Sx File Inclusion .
183.It Ic path pre_shared_key Ar file ;
184specifies a file containing pre-shared key(s) for various ID(s).
185See
186.Sx Pre-shared key File .
187.It Ic path certificate Ar path ;
188.Xr racoon 8
189will search this directory if a certificate or certificate request is received.
190If you run with privilege separation,
191.Xr racoon 8
192will refuse to use a certificate stored outside of this directory.
193.It Ic path backupsa Ar file ;
194specifies a file to which SA information which is negotiated by
195racoon should be stored.
196.Xr racoon 8
197will install SA(s) from the file when started with the
198.Fl B
199flag.
200The file is growing because
201.Xr racoon 8
202simply adds SAs to it.
203You should maintain the file manually.
204.It Ic path script Ar path ;
205.Xr racoon 8
206will search this directory for scripts hooks.
207If you run with privilege separation,
208.Xr racoon 8
209will refuse to execute a script stored outside of this directory.
210.It Ic path pidfile Ar file ;
211specifies file where to store PID of process.
212If path starts with
213.Pa /
214it is treated as
215an absolute path, otherwise relative to VARRUN directory specified at
216compilation time.
217Default is
218.Pa racoon.pid .
219.It Ic path logfile Ar file ;
220specifies log file path.
221.El
222.\"
223.Ss File Inclusion
224.Bl -tag -width Ds -compact
225.It Ic include Ar file
226other configuration files can be included.
227.El
228.\"
229.Ss Identifier Specification
230is obsolete.
231It must be defined at each
232.Ic remote
233directive.
234.\"
235.Ss Timer Specification
236.Bl -tag -width Ds -compact
237.It Ic timer { Ar statements Ic }
238specifies various timer values.
239.Pp
240.Bl -tag -width Ds -compact
241.It Ic counter Ar number ;
242the maximum number of retries to send.
243The default is 5.
244.It Ic interval Ar number Ar timeunit ;
245the interval to resend, in seconds.
246The default time is 10 seconds.
247.It Ic persend Ar number ;
248the number of packets per send.
249The default is 1.
250.It Ic phase1 Ar number Ar timeunit ;
251the maximum time it should take to complete phase 1.
252The default time is 15 seconds.
253.It Ic phase2 Ar number Ar timeunit ;
254the maximum time it should take to complete phase 2.
255The default time is 10 seconds.
256.It Ic natt_keepalive Ar number Ar timeunit ;
257interval between sending NAT-Traversal keep-alive packets.
258The default time is 20 seconds.
259Set to 0s to disable keep-alive packets.
260.El
261.El
262.\"
263.Ss Listening Port Specification
264.Bl -tag -width Ds -compact
265.It Ic listen { Ar statements Ic }
266If no
267.Ar listen
268directive is specified,
269.Xr racoon 8
270will listen on all available interface addresses.
271The following is the list of valid statements:
272.Pp
273.Bl -tag -width Ds -compact
274.\" How do I express bold brackets; `[' and `]' .
275.\" Answer: For bold brackets, do "Ic \&[ foo \&]".
276.\" Is the "Bq Ic [ Ar port ] ;" buggy ?
277.It Ic isakmp Ar address Bq Bq Ar port ;
278If this is specified,
279.Xr racoon 8
280will only listen on
281.Ar address .
282The default port is 500, which is specified by IANA.
283You can provide more than one address definition.
284.It Ic isakmp_natt Ar address Bq Ar port ;
285Same as
286.Ic isakmp
287but also sets the socket options to accept UDP-encapsulated ESP traffic for
288NAT-Traversal.
289If you plan to use NAT-T, you should provide at least one address
290with port 4500, which is specified by IANA.
291There is no default.
292.It Ic strict_address ;
293require that all addresses for ISAKMP must be bound.
294This statement will be ignored if you do not specify any address.
295.El
296The
297.Ar listen
298section can also be used to specify the admin socket mode and ownership,
299if racoon was built with support for admin port.
300.Bl -tag -width Ds -compact
301.It Ic adminsock Ar path Op Ar owner\ group\ mode ;
302.Ar path ,
303.Ar owner ,
304and
305.Ar group
306are the socket path, owner, and group; they must be quoted.
307Defaults are
308.Pa /var/racoon/racoon.sock ,
309UID 0, and GID 0.
310.Ar mode
311is the access mode in octal, default is 0600.
312.It Ic adminsock disabled ;
313This directive tells racoon to not listen on the admin socket.
314.El
315.El
316.\"
317.Ss Miscellaneous Global Parameters
318.Bl -tag -width Ds -compact
319.It Ic gss_id_enc Ar enctype ;
320Older versions of
321.Xr racoon 8
322used ISO-Latin-1 as the encoding of the GSS-API identifier attribute.
323For interoperability with Microsoft Windows' GSS-API authentication
324scheme, the default encoding has been changed to UTF-16LE.
325The
326.Ic gss_id_enc
327parameter allows
328.Xr racoon 8
329to be configured to use the old encoding for compatibility with existing
330.Xr racoon 8
331installations.
332The following are valid values for
333.Ar enctype :
334.Pp
335.Bl -tag -width Ds -compact
336.It Ic utf-16le
337Use UTF-16LE to encode the GSS-API identifier attribute.
338This is the default encoding.
339This encoding is compatible with Microsoft Windows.
340.It Ic latin1
341Use ISO-Latin-1 to encode the GSS-API identifier attribute.
342This is the encoding used by older versions of
343.Xr racoon 8 .
344.El
345.El
346.\"
347.Ss Remote Nodes Specifications
348.Bl -tag -width Ds -compact
349.It Xo
350.Ic remote ( Ar address | Ic anonymous )
351.Bq Bq Ar port
352.Bq Ic inherit Ar parent
353.Ic { Ar statements Ic }
354.Xc
355specifies the parameters for IKE phase 1 for each remote node.
356The default port is 500.
357If
358.Ic anonymous
359is specified, the statements apply to all peers which do not match
360any other
361.Ic remote
362directive.
363.Pp
364Sections with
365.Ic inherit Ar parent
366statements (where
367.Ar parent
368is either
369.Ar address
370or a keyword
371.Ic anonymous )
372have all values predefined to those of a given
373.Ar parent .
374In these sections it is enough to redefine only the changed parameters.
375.Pp
376The following are valid statements.
377.Pp
378.Bl -tag -width Ds -compact
379.\"
380.It Ic exchange_mode ( main | aggressive | base ) ;
381defines the exchange mode for phase 1 when racoon is the initiator.
382It also means the acceptable exchange mode when racoon is responder.
383More than one mode can be specified by separating them with a comma.
384All of the modes are acceptable.
385The first exchange mode is what racoon uses when it is the initiator.
386.\"
387.It Ic doi Ic ipsec_doi ;
388means to use IPsec DOI as specified in RFC 2407.
389You can omit this statement.
390.\"
391.It Ic situation Ic identity_only ;
392means to use SIT_IDENTITY_ONLY as specified in RFC 2407.
393You can omit this statement.
394.\"
395.It Ic identifier Ar idtype ;
396is obsolete.
397Instead, use
398.Ic my_identifier .
399.\"
400.It Ic my_identifier Ar idtype ... ;
401specifies the identifier sent to the remote host
402and the type to use in the phase 1 negotiation.
403.Ic address, fqdn , user_fqdn , keyid ,
404and
405.Ic asn1dn
406can be used as an
407.Ar idtype .
408Use them in the following way:
409.Bl -tag -width Ds -compact
410.It Ic my_identifier Ic address Bq Ar address ;
411the type is the IP address.
412This is the default type if you do not specify an identifier to use.
413.It Ic my_identifier Ic user_fqdn Ar string ;
414the type is a USER_FQDN (user fully-qualified domain name).
415.It Ic my_identifier Ic fqdn Ar string ;
416the type is a FQDN (fully-qualified domain name).
417.It Ic my_identifier Ic keyid Ar file ;
418the type is a KEY_ID.
419.It Ic my_identifier Ic asn1dn Bq Ar string ;
420the type is an ASN.1 distinguished name.
421If
422.Ar string
423is omitted,
424.Xr racoon 8
425will get the DN from the Subject field in the certificate.
426.El
427.\"
428.It Ic xauth_login Bq Ar string ;
429specifies the login to use in client-side Hybrid authentication.
430It is available only if
431.Xr racoon 8
432has been built with this option.
433The associated password is looked up in the pre-shared key files,
434using the login
435.Ic string
436as the key id.
437.\"
438.It Ic peers_identifier Ar idtype ... ;
439specifies the peer's identifier to be received.
440If it is not defined then
441.Xr racoon 8
442will not verify the peer's identifier in ID payload transmitted from the peer.
443If it is defined, the behavior of the verification depends on the flag of
444.Ic verify_identifier .
445The usage of
446.Ar idtype
447is the same as
448.Ic my_identifier
449except that the individual component values of an
450.Ic asn1dn
451identifier may specified as
452.Ic *
453to match any value (e.g. "C=XX, O=MyOrg, OU=*, CN=Mine").
454Alternative acceptable peer identifiers may be specified by repeating the
455.Ic peers_identifier
456statement.
457.\"
458.It Ic verify_identifier (on \(ba off) ;
459If you want to verify the peer's identifier,
460set this to on.
461In this case, if the value defined by
462.Ic peers_identifier
463is not the same as the peer's identifier in the ID payload,
464the negotiation will failed.
465The default is off.
466.\"
467.It Ic certificate_type Ar certspec ;
468specifies a certificate specification.
469.Ar certspec
470is one of followings:
471.Bl -tag -width Ds -compact
472.It Ic x509 Ar certfile Ar privkeyfile ;
473.Ar certfile
474means a file name of a certificate.
475.Ar privkeyfile
476means a file name of a secret key.
477.El
478.It Ic ca_type Ar cacertspec ;
479specifies a root certificate authority specification.
480.Ar cacertspec
481is one of followings:
482.Bl -tag -width Ds -compact
483.It Ic x509 Ar cacertfile ;
484.Ar cacertfile
485means a file name of the root certificate authority.
486Default is
487.Pa /etc/openssl/cert.pem
488.El
489.\"
490.It Ic mode_cfg (on \(ba off) ;
491Gather network information through ISAKMP mode configuration.
492Default is off.
493.\"
494.It Ic peers_certfile ( dnssec | Ar certfile ) ;
495If
496.Ic dnssec
497is defined,
498.Xr racoon 8
499will ignore the CERT payload from the peer,
500and try to get the peer's certificate from DNS instead.
501If
502.Ar certfile
503is defined,
504.Xr racoon 8
505will ignore the CERT payload from the peer,
506and will use this certificate as the peer's certificate.
507.\"
508.It Ic script Ar script Ic phase1_up
509.It Ic script Ar script Ic phase1_down
510Shell scripts that get executed when a phase 1 SA goes up or down.
511Both scripts get either
512.Ic phase1_up
513or
514.Ic phase1_down
515as first argument, and the following
516variables are set in their environment:
517.Bl -tag -width Ds -compact
518.It Ev LOCAL_ADDR
519The local address of the phase 1 SA.
520.It Ev LOCAL_PORT
521The local port used for IKE for the phase 1 SA.
522.It Ev REMOTE_ADDR
523The remote address of the phase 1 SA.
524.It Ev REMOTE_PORT
525The remote port used for IKE for the phase 1 SA.
526.El
527The following variables are only set if
528.Ic mode_cfg
529was enabled:
530.Bl -tag -width Ds -compact
531.It INTERNAL_ADDR4
532An IPv4 internal address obtained by ISAKMP mode config.
533.It INTERNAL_NETMASK4
534An IPv4 internal netmask obtained by ISAKMP mode config.
535.It INTERNAL_DNS4
536Internal DNS server IPv4 address obtained by ISAKMP mode config.
537.It INTERNAL_NBNS4
538Internal WINS server IPv4 address obtained by ISAKMP mode config.
539.El
540.\"
541.\"
542.It Ic send_cert (on \(ba off) ;
543If you do not want to send a certificate for some reason, set this to off.
544The default is on.
545.\"
546.It Ic send_cr (on \(ba off) ;
547If you do not want to send a certificate request for some reason, set this to off.
548The default is on.
549.\"
550.It Ic verify_cert (on \(ba off) ;
551If you do not want to verify the peer's certificate for some reason,
552set this to off.
553The default is on.
554.\"
555.It Ic lifetime time Ar number Ar timeunit ;
556Define a lifetime of a certain time
557which will be proposed in the phase 1 negotiations.
558Any proposal will be accepted, and the attribute(s) will be not proposed to
559the peer if you do not specify it (them).
560They can be individually specified in each proposal.
561.\"
562.It Ic ike_frag (on \(ba off) ;
563Enable receiver-side IKE fragmentation, if
564.Xr racoon 8
565has been built with this feature.
566This extension is there to work around
567broken firewalls that do not work with fragmented UDP packets.
568IKE fragmentation is always enabled on the sender-side, and
569it is used if the peer advertises itself as IKE fragmentation capable.
570.\"
571.It Ic esp_frag Ar fraglen ;
572This option is only relevant if you use NAT traversal in tunnel mode.
573Its purpose is to work around broken DSL routers that reject UDP
574fragments, by fragmenting the IP packets before ESP encapsulation.
575The result is ESP over UDP of fragmented packets instead of fragmented
576ESP over UDP packets (i.e., IP:UDP:ESP:frag(IP) instead of
577frag(IP:UDP:ESP:IP)).
578.Ar fraglen
579is the maximum size of the fragments.
580552 should work anywhere,
581but the higher
582.Ar fraglen
583is, the better is the performance.
584.Pp
585Note that because PMTU discovery is broken on many sites, you will
586have to use MSS clamping if you want TCP to work correctly.
587.\"
588.It Ic initial_contact (on \(ba off) ;
589enable this to send an INITIAL-CONTACT message.
590The default value is
591.Ic on .
592This message is useful only when
593the implementation of the responder chooses an old SA when there are multiple
594SAs with different established time, and the initiator reboots.
595If racoon did not send the message,
596the responder would use an old SA even when a new SA was established.
597The KAME stack has the switch in the system wide value
598net.key.preferred_oldsa.
599when the value is zero, the stack always uses a new SA.
600.\"
601.It Ic passive (on \(ba off) ;
602If you do not want to initiate the negotiation, set this to on.
603The default value is
604.Ic off .
605It is useful for a server.
606.\"
607.It Ic proposal_check Ar level ;
608specifies the action of lifetime length and PFS of the phase 2
609selection on the responder side, and the action of lifetime check in
610phase 1.
611The default level is
612.Ic strict .
613If the
614.Ar level
615is:
616.Bl -tag -width Ds -compact
617.It Ic obey
618the responder will obey the initiator anytime.
619.It Ic strict
620If the responder's length is longer than the initiator's one, the
621responder uses the initiator's one.
622Otherwise it rejects the proposal.
623If PFS is not required by the responder, the responder will obey the proposal.
624If PFS is required by both sides and if the responder's group is not equal to
625the initiator's one, then the responder will reject the proposal.
626.It Ic claim
627If the responder's length is longer than the initiator's one, the
628responder will use the initiator's one.
629If the responder's length is
630shorter than the initiator's one, the responder uses its own length
631AND sends a RESPONDER-LIFETIME notify message to an initiator in the
632case of lifetime (phase 2 only).
633For PFS, this directive behaves the same as
634.Ic strict .
635.It Ic exact
636If the initiator's length is not equal to the responder's one, the
637responder will reject the proposal.
638If PFS is required by both sides and if the responder's group is not equal to
639the initiator's one, then the responder will reject the proposal.
640.El
641.\"
642.It Ic support_proxy (on \(ba off) ;
643If this value is set to on, then both values of ID payloads in the
644phase 2 exchange are always used as the addresses of end-point of
645IPsec-SAs.
646The default is off.
647.\"
648.It Ic generate_policy (on \(ba off) ;
649This directive is for the responder.
650Therefore you should set
651.Ic passive
652to on in order that
653.Xr racoon 8
654only becomes a responder.
655If the responder does not have any policy in SPD during phase 2
656negotiation, and the directive is set to on, then
657.Xr racoon 8
658will choose the first proposal in the
659SA payload from the initiator, and generate policy entries from the proposal.
660It is useful to negotiate with clients whose IP address is allocated
661dynamically.
662Note that an inappropriate policy might be installed into the responder's SPD
663by the initiator,
664so other communications might fail if such policies are installed
665due to a policy mismatch between the initiator and the responder.
666This directive is ignored in the initiator case.
667The default value is
668.Ic off .
669.\"
670.\"
671.It Ic nat_traversal (on \(ba off \(ba force) ;
672This directive enables use of the NAT-Traversal IPsec extension
673(NAT-T).
674NAT-T allows one or both peers to reside behind a NAT gateway (i.e.,
675doing address- or port-translation).
676Presence of NAT gateways along the path
677is discovered during phase 1 handshake and if found, NAT-T is negotiated.
678When NAT-T is in charge, all ESP and AH packets of a given connection
679are encapsulated into UDP datagrams (port 4500, by default).
680Possible values are:
681.Bl -tag -width Ds -compact
682.It Ic on
683NAT-T is used when a NAT gateway is detected between the peers.
684.It Ic off
685NAT-T is not proposed/accepted.
686This is the default.
687.It Ic force
688NAT-T is used regardless if a NAT is detected between the peers or not.
689.El
690Please note that NAT-T support is a compile-time option.
691Although it is enabled in the source distribution by default, it
692may not be available in your particular build.
693In that case you will get a
694warning when using any NAT-T related config options.
695.\"
696.It Ic dpd_delay Ar delay ;
697This option activates the DPD and sets the time (in seconds) allowed
698between 2 proof of liveness requests.
699The default value is
700.Ic 0 ,
701which disables DPD monitoring, but still negotiates DPD support.
702.\"
703.It Ic dpd_retry Ar delay ;
704If
705.Ic dpd_delay
706is set, this sets the delay (in seconds) to wait for a proof of
707liveness before considering it as failed and send another request.
708The default value is
709.Ic 5 .
710.\"
711.It Ic dpd_maxfail Ar number ;
712If
713.Ic dpd_delay
714is set, this sets the maximum number of proof of liveness to request
715(without reply) before considering the peer is dead.
716The default value is
717.Ic 5 .
718.\"
719.It Ic nonce_size Ar number ;
720define the byte size of nonce value.
721Racoon can send any value although
722RFC2409 specifies that the value MUST be between 8 and 256 bytes.
723The default size is 16 bytes.
724.\"
725.It Xo
726.Ic proposal { Ar sub-substatements Ic }
727.Xc
728.Bl -tag -width Ds -compact
729.\"
730.It Ic encryption_algorithm Ar algorithm ;
731specify the encryption algorithm used for the phase 1 negotiation.
732This directive must be defined.
733.Ar algorithm
734is one of following:
735.Ic des , 3des , blowfish , cast128 , aes
736.\".Ic rc5 , idea
737for Oakley.
738For other transforms, this statement should not be used.
739.\"
740.It Ic hash_algorithm Ar algorithm ;
741define the hash algorithm used for the phase 1 negotiation.
742This directive must be defined.
743.Ar algorithm
744is one of following:
745.Ic md5, sha1, sha256, sha384, sha512
746for Oakley.
747.\"
748.It Ic authentication_method Ar type ;
749defines the authentication method used for the phase 1 negotiation.
750This directive must be defined.
751.Ar type
752is one of:
753.Ic pre_shared_key , rsasig , gssapi_krb , hybrid_rsa_server ,
754or
755.Ic hybrid_rsa_client .
756.\"
757.It Ic dh_group Ar group ;
758define the group used for the Diffie-Hellman exponentiations.
759This directive must be defined.
760.Ar group
761is one of following:
762.Ic modp768 , modp1024 , modp1536 ,
763.Ic modp2048 , modp3072 , modp4096 ,
764.Ic modp6144 , modp8192 .
765Or you can define 1, 2, 5, 14, 15, 16, 17, or 18 as the DH group number.
766When you want to use aggressive mode,
767you must define the same DH group in each proposal.
768.It Ic lifetime time Ar number Ar timeunit ;
769define lifetime of the phase 1 SA proposal.
770Refer to the description of the
771.Ic lifetime
772directive defined in the
773.Ic remote
774directive.
775.It Ic gss_id Ar string ;
776define the GSS-API endpoint name, to be included as an attribute in the SA,
777if the
778.Ic gssapi_krb
779authentication method is used.
780If this is not defined, the default value of
781.Ql host/hostname
782is used, where hostname is the value returned by the
783.Xr hostname 1
784command.
785.El
786.El
787.El
788.\"
789.Ss Policy Specifications
790The policy directive is obsolete, policies are now in the SPD.
791.Xr racoon 8
792will obey the policy configured into the kernel by
793.Xr setkey 8 ,
794and will construct phase 2 proposals by combining
795.Ic sainfo
796specifications in
797.Nm ,
798and policies in the kernel.
799.\"
800.Ss Sainfo Specifications
801.Bl -tag -width Ds -compact
802.It Xo
803.Ic sainfo ( Ar source_id destination_id | Ic anonymous ) [ from Ar idtype [ Ar string ] ]
804.Ic { Ar statements Ic }
805.Xc
806defines the parameters of the IKE phase 2 (IPsec-SA establishment).
807.Ar source_id
808and
809.Ar destination_id
810are constructed like:
811.Pp
812.Ic address Ar address
813.Bq Ic / Ar prefix
814.Bq Ic [ Ar port ]
815.Ar ul_proto
816.Pp
817or
818.Pp
819.Ic subnet Ar address
820.Bq Ic / Ar prefix
821.Bq Ic [ Ar port ]
822.Ar ul_proto
823.Pp
824or
825.Pp
826.Ar idtype Ar string
827.Pp
828It means exactly the content of ID payload.
829This is not like a filter rule.
830For example, if you define 3ffe:501:4819::/48 as
831.Ar source_id .
8323ffe:501:4819:1000:/64 will not match.
833.Pp
834In case of longest prefix (selecting single host)
835.Ar address
836instructs to send ID type of ADDRESS, while
837.Ar subnet
838instructs to send ID type of SUBNET.
839Otherwise these instructions are identical.
840.Pp
841.Bl -tag -width Ds -compact
842.\"
843.It Ic pfs_group Ar group ;
844define the group of Diffie-Hellman exponentiations.
845If you do not require PFS then you can omit this directive.
846Any proposal will be accepted if you do not specify one.
847.Ar group
848is one of following:
849.Ic modp768 , modp1024 , modp1536 ,
850.Ic modp2048 , modp3072 , modp4096 ,
851.Ic modp6144 , modp8192 .
852Or you can define 1, 2, 5, 14, 15, 16, 17, or 18 as the DH group number.
853.\"
854.It Ic lifetime time Ar number Ar timeunit ;
855define how long an IPsec-SA will be used, in timeunits.
856Any proposal will be accepted, and no attribute(s) will be proposed to
857the peer if you do not specify it(them).
858See the
859.Ic proposal_check
860directive.
861.\"
862.It Ic my_identifier Ar idtype ... ;
863is obsolete.
864It does not make sense to specify an identifier in the phase 2.
865.El
866.\"
867.Pp
868.Xr racoon 8
869does not have a list of security protocols to be negotiated.
870The list of security protocols are passed by SPD in the kernel.
871Therefore you have to define all of the potential algorithms
872in the phase 2 proposals even if there are algorithms which will not be used.
873These algorithms are define by using the following three directives,
874with a single comma as the separator.
875For algorithms that can take variable-length keys, algorithm names
876can be followed by a key length, like
877.Dq Li blowfish 448 .
878.Xr racoon 8
879will compute the actual phase 2 proposals by computing
880the permutation of the specified algorithms,
881and then combining them with the security protocol specified by the SPD.
882For example, if
883.Ic des , 3des , hmac_md5 ,
884and
885.Ic hmac_sha1
886are specified as algorithms, we have four combinations for use with ESP,
887and two for AH.
888Then, based on the SPD settings,
889.Xr racoon 8
890will construct the actual proposals.
891If the SPD entry asks for ESP only, there will be 4 proposals.
892If it asks for both AH and ESP, there will be 8 proposals.
893Note that the kernel may not support the algorithm you have specified.
894.\"
895.Bl -tag -width Ds -compact
896.It Ic encryption_algorithm Ar algorithms ;
897.Ic des , 3des , des_iv64 , des_iv32 ,
898.Ic rc5 , rc4 , idea , 3idea ,
899.Ic cast128 , blowfish , null_enc ,
900.Ic twofish , rijndael , aes
901.Pq used with ESP
902.\"
903.It Ic authentication_algorithm Ar algorithms ;
904.Ic des , 3des , des_iv64 , des_iv32 ,
905.Ic hmac_md5 , hmac_sha1 , hmac_sha256, hmac_sha384, hmac_sha512, non_auth
906.Pq used with ESP authentication and AH
907.\"
908.It Ic compression_algorithm Ar algorithms ;
909.Ic deflate
910.Pq used with IPComp
911.El
912.El
913.\"
914.Ss Logging level
915.Bl -tag -width Ds -compact
916.It Ic log Ar level ;
917define logging level.
918.Ar level
919is one of following:
920.Ic notify , debug ,
921and
922.Ic debug2 .
923The default is
924.Ic notify .
925If you set the logging level too high on slower machines,
926IKE negotiation can fail due to timing constraint changes.
927.El
928.\"
929.Ss Specifying the way to pad
930.Bl -tag -width Ds -compact
931.It Ic padding { Ar statements Ic }
932specified padding format.
933The following are valid statements:
934.Bl -tag -width Ds -compact
935.It Ic randomize (on \(ba off) ;
936enable using a randomized value for padding.
937The default is on.
938.It Ic randomize_length (on \(ba off) ;
939the pad length is random.
940The default is off.
941.It Ic maximum_length Ar number ;
942define a maximum padding length.
943If
944.Ic randomize_length
945is off, this is ignored.
946The default is 20 bytes.
947.It Ic exclusive_tail (on \(ba off) ;
948means to put the number of pad bytes minus one into the last part
949of the padding.
950The default is on.
951.It Ic strict_check (on \(ba off) ;
952means to constrain the peer to set the number of pad bytes.
953The default is off.
954.El
955.El
956.Ss ISAKMP mode configuration settings
957.Bl -tag -width Ds -compact
958.It Ic mode_cfg { Ar statements Ic }
959Defines the information to return for remote hosts' ISAKMP mode config
960requests.
961Also defines the authentication source for remote peers
962authenticating through hybrid auth.
963.Pp
964The following are valid statements:
965.Bl -tag -width Ds -compact
966.It Ic auth_source (system \(ba radius \(ba pam) ;
967Specify the source for authentication of users through hybrid auth.
968.Ar system
969means to use the Unix user database.
970This is the default.
971.Ar radius
972means to use a RADIUS server.
973It works only if
974.Xr racoon 8
975was built with libradius support, and the configuration is done in
976.Xr radius.conf 5 .
977.Ar pam
978means to use PAM.
979It works only if
980.Xr racoon 8
981was built with libpam support.
982.It Ic conf_source (local \(ba radius) ;
983Specify the source for IP addresses and netmask allocated through ISAKMP
984mode config.
985.Ar local
986means to use the local IP pool defined by the
987.Ic network4
988and
989.Ic pool_size
990keywords.
991This is the default.
992.Ar radius
993means to use a RADIUS server.
994It works only if
995.Xr racoon 8
996was built with libradius support, and the configuration is done in
997.Xr radius.conf 5 .
998RADIUS configuration requires RADIUS authentication.
999.It Ic accounting (none \(ba radius \(ba pam) ;
1000Enable or disable accounting for Xauth logins and logouts.
1001Default is
1002.Ar none ,
1003which disable accounting.
1004.Ar radius
1005enable RADIUS accounting.
1006It works only if
1007.Xr racoon 8
1008was built with libradius support, and the configuration is done in
1009.Xr radius.conf 5 .
1010RADIUS accounting require RADIUS authentication.
1011.Ar pam
1012enable PAM accounting.
1013It works only if
1014.Xr racoon 8
1015was built with libpam support.
1016PAM accounting requires PAM authentication.
1017.It Ic pool_size Ar size
1018Specify the size of the IP address pool, either local or allocated
1019through RADIUS.
1020.Ic conf_source
1021selects the local pool or the RADIUS configuration, but in both
1022configurations, you cannot have more than
1023.Ar size
1024users connected at the same time.
1025The default is 255.
1026.It Ic network4 Ar address ;
1027.It Ic netmask4 Ar address ;
1028The local IP pool base address and network mask from which dynamically
1029allocated IPv4 addresses should be taken.
1030This is used if
1031.Ic conf_source
1032is set to
1033.Ar local
1034or if the RADIUS server returned
1035.Ar 255.255.255.254 .
1036Default is
1037.Ar 0.0.0.0/0.0.0.0 .
1038.It Ic dns4 Ar address ;
1039The IPv4 address for a DNS server.
1040.It Ic nbns4 Ar address ;
1041The IPv4 address for a WINS server.
1042.It Ic banner Ar path ;
1043The path of a file displayed on the client at connection time.
1044Default is
1045.Ar /etc/motd .
1046.It Ic auth_throttle Ar delay ;
1047On each failed Xauth authentication attempt, refuse new attempts for
1048.Ar delay
1049more seconds.
1050This is to avoid dictionary attacks on Xauth passwords.
1051Default is one second.
1052Set to zero to disable authentication delay.
1053.It Ic pfs_group Ar group ;
1054Sets the PFS group used in the client proposal (Cisco VPN client only).
1055Default is 0.
1056.It Ic save_passwd (on | off) ;
1057Allow the client to save the Xauth password (Cisco VPN client only).
1058Default is off.
1059.El
1060.El
1061.Ss Special directives
1062.Bl -tag -width Ds -compact
1063.It Ic complex_bundle (on \(ba off) ;
1064defines the interpretation of proposal in the case of SA bundle.
1065Normally
1066.Dq IP AH ESP IP payload
1067is proposed as
1068.Dq AH tunnel and ESP tunnel .
1069The interpretation is more common to other IKE implementations, however,
1070it allows very limited set of combinations for proposals.
1071With the option enabled, it will be proposed as
1072.Dq AH transport and ESP tunnel .
1073The default value is
1074.Ic off .
1075.El
1076.\"
1077.Ss Pre-shared key File
1078The pre-shared key file defines pairs of identifiers and corresponding
1079shared secret keys which are used in the pre-shared key authentication
1080method in phase 1.
1081The pair in each line is separated by some number of blanks and/or tab
1082characters like in the
1083.Xr hosts 5
1084file.
1085Key can include blanks because everything after the first blanks
1086is interpreted as the secret key.
1087Lines starting with
1088.Ql #
1089are ignored.
1090Keys which start with
1091.Ql 0x
1092are interpreted as hexadecimal strings.
1093Note that the file must be owned by the user ID running
1094.Xr racoon 8
1095.Pq usually the privileged user ,
1096and must not be accessible by others.
1097.\"
1098.Sh EXAMPLES
1099The following shows how the remote directive should be configured.
1100.Bd -literal -offset
1101path pre_shared_key "/usr/local/v6/etc/psk.txt" ;
1102remote anonymous
1103{
1104 exchange_mode aggressive,main,base;
1105 lifetime time 24 hour;
1106 proposal {
1107 encryption_algorithm 3des;
1108 hash_algorithm sha1;
1109 authentication_method pre_shared_key;
1110 dh_group 2;
1111 }
1112}
1113
1114sainfo anonymous
1115{
1116 pfs_group 2;
1117 lifetime time 12 hour ;
1118 encryption_algorithm 3des, blowfish 448, twofish, rijndael ;
1119 authentication_algorithm hmac_sha1, hmac_md5 ;
1120 compression_algorithm deflate ;
1121}
1122.Ed
1123.Pp
1124The following is a sample for the pre-shared key file.
1125.Bd -literal -offset
112610.160.94.3 mekmitasdigoat
1127172.16.1.133 0x12345678
1128194.100.55.1 whatcertificatereally
11293ffe:501:410:ffff:200:86ff:fe05:80fa mekmitasdigoat
11303ffe:501:410:ffff:210:4bff:fea2:8baa mekmitasdigoat
1131foo@kame.net mekmitasdigoat
1132foo.kame.net hoge
1133.Ed
1134.\"
1135.Sh SEE ALSO
1136.Xr racoon 8 ,
1137.Xr racoonctl 8 ,
1138.Xr setkey 8
1139.\"
1140.Sh HISTORY
1141The
1142.Nm
1143configuration file first appeared in the
1144.Dq YIPS
1145Yokogawa IPsec implementation.
1146.\"
1147.Sh BUGS
1148Some statements may not be handled by
1149.Xr racoon 8
1150yet.
1151.Pp
1152Diffie-Hellman computation can take a very long time, and may cause
1153unwanted timeouts, specifically when a large D-H group is used.
1154.\"
1155.Sh SECURITY CONSIDERATIONS
1156The use of IKE phase 1 aggressive mode is not recommended,
1157as described in
1158.Li http://www.kb.cert.org/vuls/id/886601 .