1RACOON.CONF(5)              BSD File Formats Manual             RACOON.CONF(5)
2

NAME

4     racoon.conf — configuration file for racoon
5

DESCRIPTION

7     racoon.conf is the configuration file for the racoon(8) ISAKMP daemon.
8     racoon(8) negotiates security associations for itself (ISAKMP SA, or
9     phase 1 SA) and for kernel IPsec (IPsec SA, or phase 2 SA).  The file
10     consists of a sequence of directives and statements.  Each directive is
11     composed by a tag and statements, enclosed by ‘{’ and ‘}’.  Lines begin‐
12     ning with ‘#’ are comments.
13
14   Meta Syntax
15     Keywords and special characters that the parser expects exactly are dis‐
16     played using this font.  Parameters are specified with this font.  Square
17     brackets (‘[’ and ‘]’) are used to show optional keywords and parameters.
18     Note that you have to pay attention when this manual is describing port
19     numbers.  The port number is always enclosed by ‘[’ and ‘]’.  In this
20     case, the port number is not an optional keyword.  If it is possible to
21     omit the port number, the expression becomes [[port]].  The vertical bar
22     (‘|’) is used to indicate a choice between optional parameters.  Paren‐
23     theses (‘(’ and ‘)’) are used to group keywords and parameters when nec‐
24     essary.  Major parameters are listed below.
25
26     number    means a hexadecimal or a decimal number.  The former must be
27               prefixed with ‘0x’.
28     string
29     path
30     file      means any string enclosed in ‘"’ (double quotes).
31     address   means IPv6 and/or IPv4 address.
32     port      means a TCP/UDP port number.  The port number is always
33               enclosed by ‘[’ and ‘]’.
34     timeunit  is one of following: sec, secs, second, seconds, min, mins,
35               minute, minutes, hour, hours.
36
37   Privilege separation
38     privsep { statements }
39             Specifies privilege separation parameters.  When enabled, these
40             enable racoon(8) to operate with an unprivileged instance doing
41             most of the work, while a privileged instance takes care of per‐
42             forming the following operations as root: reading PSK and private
43             keys, launching hook scripts, and validating passwords against
44             system databases or against PAM.  Please note that using privi‐
45             lege separation makes changes to the listen and paths sections
46             ignored upon configuration reloads.  A racoon(8) restart is
47             required if you want such changes to be taken into account.
48
49             user user;
50                     The user to which the unprivileged instance of racoon(8),
51                     should switch.  This can be a quoted user name or a
52                     numeric UID.
53             group group;
54                     The group the unprivileged instance of racoon(8), should
55                     switch.  This can be a quoted group name or a numeric
56                     GID.
57             chroot path;
58                     A directory to which the unprivileged instance of
59                     racoon(8) should chroot(2).  This directory should hold a
60                     tree where the following files must be reachable:
61                     /dev/random
62                     /dev/urandom
63                     The certificates
64                     The file containing the Xauth banner
65
66                     The PSK file, the private keys, and the hook scripts are
67                     accessed through the privileged instance of racoon(8) and
68                     do not need to be reachable in the chroot(2)'ed tree.
69
70   Path Specification
71     This section specifies various paths used by racoon.  When running in
72     privilege separation mode, certificate and script paths are mandatory.  A
73     racoon(8) restart is required if you want path changes to be taken into
74     account.
75     path include path;
76             Specifies a path to include a file.  See File Inclusion.
77     path pre_shared_key file;
78             Specifies a file containing pre-shared key(s) for various ID(s).
79             See Pre-shared key File.
80     path certificate path;
81             racoon(8) will search this directory if a certificate or certifi‐
82             cate request is received.  If you run with privilege separation,
83             racoon(8) will refuse to use a certificate stored outside of this
84             directory.
85     path backupsa file;
86             Specifies a file to which SA information negotiated by racoon
87             should be stored.  racoon(8) will install SA(s) from the file
88             when started with the -B flag.  The file is growing because
89             racoon(8) simply adds SAs to it.  You should maintain the file
90             manually.
91     path script path;
92             racoon(8) will search this directory for scripts hooks.  If you
93             run with privilege separation, racoon(8) will refuse to execute a
94             script stored outside of this directory.
95     path pidfile file;
96             Specifies file where to store PID of process.  If path starts
97             with / it is treated as an absolute path.  Otherwise, it is
98             treated as a relative path to the VARRUN directory specified at
99             compilation time.  Default is racoon.pid.
100
101   File Inclusion
102     include file
103             Specifies other configuration files to be included.
104
105   Timer Specification
106     timer { statements }
107             This section specifies various timer values used by racoon.
108
109             counter number;
110                     The maximum number of retries to send.  The default is 5.
111             interval number timeunit;
112                     The interval to resend, in seconds.  The default time is
113                     10 seconds.
114             persend number;
115                     The number of packets per send.  The default is 1.
116             phase1 number timeunit;
117                     The maximum time it should take to complete phase 1.  The
118                     default time is 15 seconds.
119             phase2 number timeunit;
120                     The maximum time it should take to complete phase 2.  The
121                     default time is 10 seconds.
122             natt_keepalive number timeunit;
123                     The interval between sending NAT-Traversal keep-alive
124                     packets.  The default time is 20 seconds.  Set to 0s to
125                     disable keep-alive packets.
126
127   Listening Port Specification
128     listen { statements }
129             If no listen directive is specified, racoon(8) will listen on all
130             available interface addresses.  The following is the list of
131             valid statements:
132
133             isakmp address [[port]];
134                     If this is specified, racoon(8) will only listen on the
135                     defined address.  The default port is 500, which is spec‐
136                     ified by IANA.  You can provide more than one address
137                     definition.
138             isakmp_natt address [port];
139                     Same as isakmp but also sets the socket options to accept
140                     UDP-encapsulated ESP traffic for NAT-Traversal.  If you
141                     plan to use NAT-T, you should provide at least one
142                     address with port 4500, which is specified by IANA.
143                     There is no default.
144             strict_address;
145                     Requires that all addresses for ISAKMP be bound.  This
146                     statement will be ignored if you do not specify address
147                     definitions.
148             When running in privilege separation mode, you need to restart
149             racoon(8) to have changes to the listen section taken into
150             account.
151
152             The listen section can also be used to specify the admin socket
153             mode and ownership if racoon was built with support for admin
154             port.
155             adminsock path [owner group mode];
156                     The path, owner, and group values specify the socket
157                     path, owner, and group.  They must be quoted.  The
158                     defaults are /var/racoon/racoon.sock, UID 0, and GID 0.
159                     mode is the access mode in octal.  The default is 0600.
160             adminsock disabled;
161                     This directive tells racoon to not listen on the admin
162                     socket.
163
164   Miscellaneous Global Parameters
165     gss_id_enc enctype;
166             Older versions of racoon(8) used ISO-Latin-1 as the encoding of
167             the GSS-API identifier attribute.  For interoperability with Mi‐
168             crosoft Windows' GSS-API authentication scheme, the default
169             encoding has been changed to UTF-16LE.  The gss_id_enc parameter
170             allows racoon(8) to be configured to use the old encoding for
171             compatibility with existing racoon(8) installations.  The follow‐
172             ing are valid values for enctype:
173
174             utf-16le
175                     Use UTF-16LE to encode the GSS-API identifier attribute.
176                     This is the default encoding.  This encoding is compati‐
177                     ble with Microsoft Windows.
178             latin1  Use ISO-Latin-1 to encode the GSS-API identifier
179                     attribute.  This is the encoding used by older versions
180                     of racoon(8).
181
182     pfkey_buffer kBytes
183             Specifies the socket send/receive buffer size in kilobytes.
184             Numerous kernel PF_KEY implementations have problems with dumping
185             SAD/SDP with large amount of entries (this happens when 100s to
186             1000s of tunnels are configured).
187
188             The default value of 0 leaves everything at the OS-specific
189             default value.  If the default buffer size is greater than what
190             is specified here racoon will not decrease it.
191
192             This problem is known to be fixed in Linux 2.6.25 and later.
193
194   Remote Nodes Specifications
195     remote name [inherit parent_name] ({ statements } | ;)
196             Specifies the IKE phase 1 parameters for each remote node.
197
198             If connection is initiated using racoonctl, a unique match using
199             the remote IP must be found or the remote block name has to be
200             given.  For received acquires (kernel notices traffic requiring a
201             new SA) the remote IP and remoteid from matching sainfo block are
202             used to decide the remoteblock.  If no uniquely matching remote‐
203             block is found using these criteria, no connection attempt is
204             done.
205
206             When acting as responder, racoon picks the first proposal that
207             has one or more acceptable remote configurations.  When determin‐
208             ing if a remote specification is matching the following informa‐
209             tion is checked:
210             ·       The remote IP is checked against remote_address.
211             ·       ISAKMP exchange type is checked against exchange_mode.
212             ·       ISAKMP SA attributes must match a proposal block.
213             ·       The remote identity is matched against peers_identifier
214                     if verify_identifier is on.
215             ·       If a certificate request was received, it must match the
216                     issuer of certificate_type x509 certificate.  If certifi‐
217                     cate request without issuer name was sent, the
218                     match_empty_cr parameter specifies whether or not remote
219                     block matches.
220
221             Similarly, NAT-T is enabled if any of the initial remote configu‐
222             ration candidates allow NAT-T.
223
224             Sections with inherit parent statements (where parent is either
225             address or a keyword anonymous) that have all values predefined
226             to those of a given parent.  In these sections it is enough to
227             redefine only the changed parameters.
228
229             The following are valid statements.
230
231             remote_address address;
232                     Defines the IP address of the peer.
233             exchange_mode (main | aggressive | base);
234                     Defines the exchange mode for phase 1 when racoon is the
235                     initiator.  It also means the acceptable exchange mode
236                     when racoon is the responder.  More than one mode can be
237                     specified by separating them with a comma.  All of the
238                     modes are acceptable.  The first exchange mode is what
239                     racoon uses when it is the initiator.
240             doi ipsec_doi;
241                     Means to use IPsec DOI as specified in RFC 2407.  You can
242                     omit this statement.
243             situation identity_only;
244                     Means to use SIT_IDENTITY_ONLY as specified in RFC 2407.
245                     You can omit this statement.
246             my_identifier [qualifier] idtype ...;
247                     Specifies the identifier sent to the remote host and the
248                     type to use in the phase 1 negotiation.  address, fqdn,
249                     user_fqdn, keyid, and asn1dn can be used as an idtype.
250                     The qualifier is currently only used for keyid, and can
251                     be either file or tag.  The possible values are :
252                     my_identifier address [address];
253                             The type is the IP address.  This is the default
254                             type if you do not specify an identifier to use.
255                     my_identifier user_fqdn string;
256                             The type is a USER_FQDN (user fully-qualified
257                             domain name).
258                     my_identifier fqdn string;
259                             The type is a FQDN (fully-qualified domain name).
260                     my_identifier keyid [file] file;
261                             The type is a KEY_ID, read from the file.
262                     my_identifier keyid tag string;
263                             The type is a KEY_ID, specified in the quoted
264                             string.
265                     my_identifier asn1dn [string];
266                             The type is an ASN.1 distinguished name.  If
267                             string is omitted, racoon(8) will get the DN from
268                             the Subject field in the certificate.
269             xauth_login [string];
270                     Specifies the login to use in client-side Hybrid authen‐
271                     tication.  It is available only if racoon(8) has been
272                     built with this option.  The associated password is
273                     looked up in the pre-shared key files, using the login
274                     string as the key id.
275             peers_identifier idtype ...;
276                     Specifies the peer's identifier to be received.  If it is
277                     not defined then racoon(8) will not verify the peer's
278                     identifier in ID payload transmitted from the peer.  If
279                     it is defined, the behavior of the verification depends
280                     on the flag of verify_identifier.  The usage of idtype is
281                     the same as my_identifier except that the individual com‐
282                     ponent values of an asn1dn identifier may specified as *
283                     to match any value (e.g. "C=XX, O=MyOrg, OU=*, CN=Mine").
284                     The format of the specification should correspond to RFC
285                     2253; in particular, commas and certain other characters
286                     - ,=+<>#; - may be included in a name by preceeding them
287                     with a backslash "\", and arbitrary characters may be
288                     inserted in a name with the "\nn" escape, where nn is the
289                     hex representation of the ascii value of the desired
290                     character.  Alternative acceptable peer identifiers may
291                     be specified by repeating the peers_identifier statement.
292             verify_identifier (on | off);
293                     If you want to verify the peer's identifier, set this to
294                     on.  In this case, if the value defined by
295                     peers_identifier is not the same as the peer's identifier
296                     in the ID payload, the negotiation will fail.  The
297                     default is off.
298             certificate_type certspec;
299                     Specifies a certificate specification.  certspec is one
300                     of followings:
301                     x509 certfile privkeyfile;
302                             certfile means a file name of a certificate.
303                             privkeyfile means a file name of a secret key.
304                     plain_rsa privkeyfile;
305                             privkeyfile means a file name of a private key
306                             generated by plainrsa-gen(8).  Required for RSA
307                             authentication.
308             ca_type cacertspec;
309                     Specifies a root certificate authority specification.
310                     cacertspec is one of followings:
311                     x509 cacertfile;
312                             cacertfile means a file name of the root certifi‐
313                             cate authority.  Default is /etc/openssl/cert.pem
314             mode_cfg (on | off);
315                     Gather network information through ISAKMP mode configura‐
316                     tion.  Default is off.
317             weak_phase1_check (on | off);
318                     Tells racoon to act on unencrypted deletion messages dur‐
319                     ing phase 1.  This is a small security risk, so the
320                     default is off, meaning that racoon will keep on trying
321                     to establish a connection even if the user credentials
322                     are wrong, for instance.
323             peers_certfile (dnssec | certfile | plain_rsa pubkeyfile);
324                     If dnssec is defined, racoon(8) will ignore the CERT pay‐
325                     load from the peer, and try to get the peer's certificate
326                     from DNS instead.  If certfile is defined, racoon(8) will
327                     ignore the CERT payload from the peer, and will use this
328                     certificate as the peer's certificate.  If plain_rsa is
329                     defined, racoon(8) will expect pubkeyfile to be the
330                     peer's public key that was generated by plainrsa-gen(8).
331             script script phase1_up
332             script script phase1_down
333             script script phase1_dead
334                     Shell scripts that get executed when a phase 1 SA goes up
335                     or down, or when it is detected as dead by DPD.  All
336                     scripts get either phase1_up , phase1_down or phase1_dead
337                     as first argument, and the following variables are set in
338                     their environment:
339                     LOCAL_ADDR
340                             The local address of the phase 1 SA.
341                     LOCAL_PORT
342                             The local port used for IKE for the phase 1 SA.
343                     REMOTE_ADDR
344                             The remote address of the phase 1 SA.
345                     REMOTE_PORT
346                             The remote port used for IKE for the phase 1 SA.
347                     REMOTE_ID
348                             The remote identity received in IKE for the phase
349                             1 SA.
350                     The following variables are only set if mode_cfg was
351                     enabled:
352                     INTERNAL_ADDR4
353                             An IPv4 internal address obtained by ISAKMP mode
354                             config.
355                     INTERNAL_NETMASK4
356                             An IPv4 internal netmask obtained by ISAKMP mode
357                             config.
358                     INTERNAL_CIDR4
359                             An IPv4 internal netmask obtained by ISAKMP mode
360                             config, in CIDR notation.
361                     INTERNAL_DNS4
362                             The first internal DNS server IPv4 address
363                             obtained by ISAKMP mode config.
364                     INTERNAL_DNS4_LIST
365                             A list of internal DNS servers IPv4 address
366                             obtained by ISAKMP mode config, separated by spa‐
367                             ces.
368                     INTERNAL_WINS4
369                             The first internal WINS server IPv4 address
370                             obtained by ISAKMP mode config.
371                     INTERNAL_WINS4_LIST
372                             A list of internal WINS servers IPv4 address
373                             obtained by ISAKMP mode config, separated by spa‐
374                             ces.
375                     SPLIT_INCLUDE
376                             The space separated list of IPv4 addresses and
377                             masks (address slash mask) that define the net‐
378                             works to be encrypted (as opposed to the default
379                             where all the traffic should be encrypted) ;
380                             obtained by ISAKMP mode config ; SPLIT_INCLUDE
381                             and SPLIT_LOCAL are mutually exclusive.
382                     SPLIT_LOCAL
383                             The space separated list of IPv4 addresses and
384                             masks (address slash mask) that define the net‐
385                             works to be considered local, and thus excluded
386                             from the tunnels ; obtained by ISAKMP mode con‐
387                             fig.
388                     SPLIT_INCLUDE_CIDR
389                             Same as SPLIT_INCLUDE, with netmasks in CIDR
390                             notation.
391                     SPLIT_LOCAL_CIDR
392                             Same as SPLIT_LOCAL, with netmasks in CIDR nota‐
393                             tion.
394                     DEFAULT_DOMAIN
395                             The DNS default domain name obtained by ISAKMP
396                             mode config.
397             send_cert (on | off);
398                     If you do not want to send a certificate, set this to
399                     off.  The default is on.
400             send_cr (on | off);
401                     If you do not want to send a certificate request, set
402                     this to off.  The default is on.
403             match_empty_cr (on | off);
404                     Specifies whether this remote block is a valid match when
405                     a non-specific certificate request is received.  The
406                     default is on.
407             verify_cert (on | off);
408                     By default, the identifier sent by the remote host (as
409                     specified in its my_identifier statement) is compared
410                     with the credentials in the certificate used to authenti‐
411                     cate the remote host as follows:
412                     Type asn1dn:
413                             The entire certificate subject name is compared
414                             with the identifier, e.g. "C=XX, O=YY, ...".
415                     Type address, fqdn, or user_fqdn:
416                             The certificate's subjectAltName is compared with
417                             the identifier.
418                     If the two do not match the negotiation will fail.  If
419                     you do not want to verify the identifier using the peer's
420                     certificate, set this to off.
421             lifetime time number timeunit;
422                     Define a lifetime of a certain time which will be pro‐
423                     posed in the phase 1 negotiations.  Any proposal will be
424                     accepted, and the attribute(s) will not be proposed to
425                     the peer if you do not specify it (them).  They can be
426                     individually specified in each proposal.
427             ike_frag (on | off | force);
428                     Enable receiver-side IKE fragmentation if racoon(8) has
429                     been built with this feature.  If set to on, racoon will
430                     advertise itself as being capable of receiving packets
431                     split by IKE fragmentation.  This extension is there to
432                     work around broken firewalls that do not work with frag‐
433                     mented UDP packets.  IKE fragmentation is always enabled
434                     on the sender-side, and it is used if the peer advertises
435                     itself as IKE fragmentation capable.  By selecting force,
436                     IKE Fragmentation will be used when racoon is acting as
437                     the initiator even before the remote peer has advertised
438                     itself as IKE fragmentation capable.
439             esp_frag fraglen;
440                     This option is only relevant if you use NAT traversal in
441                     tunnel mode.  Its purpose is to work around broken DSL
442                     routers that reject UDP fragments, by fragmenting the IP
443                     packets before ESP encapsulation.  The result is ESP over
444                     UDP of fragmented packets instead of fragmented ESP over
445                     UDP packets (i.e., IP:UDP:ESP:frag(IP) instead of
446                     frag(IP:UDP:ESP:IP)).  fraglen is the maximum size of the
447                     fragments.  552 should work anywhere, but the higher
448                     fraglen is, the better the performance.
449
450                     Note that because PMTU discovery is broken on many sites,
451                     you will have to use MSS clamping if you want TCP to work
452                     correctly.
453             initial_contact (on | off);
454                     Enable this to send an INITIAL-CONTACT message.  The
455                     default value is on.  This message is useful only when
456                     the responder implementation chooses an old SA when there
457                     are multiple SAs with different established time and the
458                     initiator reboots.  If racoon did not send the message,
459                     the responder would use an old SA even when a new SA was
460                     established.  For systems that use a KAME derived IPSEC
461                     stack, the sysctl(8) variable net.key.preferred_oldsa can
462                     be used to control this preference.  When the value is
463                     zero, the stack always uses a new SA.
464             passive (on | off);
465                     If you do not want to initiate the negotiation, set this
466                     to on.  The default value is off.  It is useful for a
467                     server.
468             proposal_check level;
469                     Specifies the action of lifetime length, key length, and
470                     PFS of the phase 2 selection on the responder side, and
471                     the action of lifetime check in phase 1.  The default
472                     level is strict.  If the level is:
473                     obey    The responder will obey the initiator anytime.
474                     strict  If the responder's lifetime length is longer than
475                             the initiator's or the responder's key length is
476                             shorter than the initiator's, the responder will
477                             use the initiator's value.  Otherwise, the pro‐
478                             posal will be rejected.  If PFS is not required
479                             by the responder, the responder will obey the
480                             proposal.  If PFS is required by both sides and
481                             the responder's group is not equal to the initia‐
482                             tor's, then the responder will reject the pro‐
483                             posal.
484                     claim   If the responder's lifetime length is longer than
485                             the initiator's or the responder's key length is
486                             shorter than the initiator's, the responder will
487                             use the initiator's value.  If the responder's
488                             lifetime length is shorter than the initiator's,
489                             the responder uses its own length AND sends a
490                             RESPONDER-LIFETIME notify message to an initiator
491                             in the case of lifetime (phase 2 only).  For PFS,
492                             this directive behaves the same as strict.
493                     exact   If the initiator's lifetime or key length is not
494                             equal to the responder's, the responder will
495                             reject the proposal.  If PFS is required by both
496                             sides and the responder's group is not equal to
497                             the initiator's, then the responder will reject
498                             the proposal.
499             support_proxy (on | off);
500                     If this value is set to on, then both values of ID pay‐
501                     loads in the phase 2 exchange are always used as the
502                     addresses of end-point of IPsec-SAs.  The default is off.
503             generate_policy (on | off | require | unique);
504                     This directive is for the responder.  Therefore you
505                     should set passive to on in order that racoon(8) only
506                     becomes a responder.  If the responder does not have any
507                     policy in SPD during phase 2 negotiation, and the direc‐
508                     tive is set to on, then racoon(8) will choose the first
509                     proposal in the SA payload from the initiator, and gener‐
510                     ate policy entries from the proposal.  It is useful to
511                     negotiate with clients whose IP address is allocated
512                     dynamically.  Note that an inappropriate policy might be
513                     installed into the responder's SPD by the initiator, so
514                     other communications might fail if such policies are
515                     installed due to a policy mismatch between the initiator
516                     and the responder.  on and require values mean the same
517                     thing (generate a require policy).  unique tells racoon
518                     to set up unique policies, with a monotoning increasing
519                     reqid number (between 1 and IPSEC_MANUAL_REQID_MAX).
520                     This directive is ignored in the initiator case.  The
521                     default value is off.
522             nat_traversal (on | off | force);
523                     This directive enables use of the NAT-Traversal IPsec
524                     extension (NAT-T).  NAT-T allows one or both peers to
525                     reside behind a NAT gateway (i.e., doing address- or
526                     port-translation).  If a NAT gateway is detected during
527                     the phase 1 handshake, racoon will attempt to negotiate
528                     the use of NAT-T with the remote peer.  If the negotia‐
529                     tion succeeds, all ESP and AH packets for the given con‐
530                     nection will be encapsulated into UDP datagrams (port
531                     4500, by default).  Possible values are:
532                     on      NAT-T is used when a NAT gateway is detected
533                             between the peers.
534                     off     NAT-T is not proposed/accepted.  This is the
535                             default.
536                     force   NAT-T is used regardless of whether a NAT gateway
537                             is detected between the peers or not.
538                     Please note that NAT-T support is a compile-time option.
539                     Although it is enabled in the source distribution by
540                     default, it may not be available in your particular
541                     build.  In that case you will get a warning when using
542                     any NAT-T related config options.
543             dpd_delay delay;
544                     This option activates the DPD and sets the time (in sec‐
545                     onds) allowed between 2 proof of liveliness requests.
546                     The default value is 0, which disables DPD monitoring,
547                     but still negotiates DPD support.
548             dpd_retry delay;
549                     If dpd_delay is set, this sets the delay (in seconds) to
550                     wait for a proof of liveliness before considering it as
551                     failed and send another request.  The default value is 5.
552             dpd_maxfail number;
553                     If dpd_delay is set, this sets the maximum number of
554                     liveliness proofs to request (without reply) before con‐
555                     sidering the peer is dead.  The default value is 5.
556             rekey (on | off | force);
557                     Enable automatic renegotiation of expired phase1 when
558                     there are non-dying phase2 SAs.  Possible values are:
559                     force   Rekeying is done unconditionally.
560                     on      Rekeying is done only if DPD monitoring is
561                             active.  This is the default.
562                     off     No automatic rekeying.  Do note that turning off
563                             automatic rekeying will result in inaccurate DPD
564                             monitoring.
565             nonce_size number;
566                     define the byte size of nonce value.  Racoon can send any
567                     value although RFC2409 specifies that the value MUST be
568                     between 8 and 256 bytes.  The default size is 16 bytes.
569             ph1id number;
570                     An optional number to identify the remote proposal and to
571                     link it only with sainfos who have the same number.
572                     Defaults to 0.
573             proposal { sub-substatements }
574                     encryption_algorithm algorithm;
575                             Specifies the encryption algorithm used for the
576                             phase 1 negotiation.  This directive must be
577                             defined.  algorithm is one of following: des,
578                             3des, blowfish, cast128, aes, camellia for Oak‐
579                             ley.  For other transforms, this statement should
580                             not be used.
581                     hash_algorithm algorithm;
582                             Defines the hash algorithm used for the phase 1
583                             negotiation.  This directive must be defined.
584                             algorithm is one of following: md5, sha1, sha256,
585                             sha384, sha512 for Oakley.
586                     authentication_method type;
587                             Defines the authentication method used for the
588                             phase 1 negotiation.  This directive must be
589                             defined.  type is one of: pre_shared_key, rsasig
590                             (for plain RSA authentication), gssapi_krb,
591                             hybrid_rsa_server, hybrid_rsa_client,
592                             xauth_rsa_server, xauth_rsa_client,
593                             xauth_psk_server or xauth_psk_client.
594                     dh_group group;
595                             Defines the group used for the Diffie-Hellman
596                             exponentiations.  This directive must be defined.
597                             group is one of following: modp768, modp1024,
598                             modp1536, modp2048, modp3072, modp4096, modp6144,
599                             modp8192.  Or you can define 1, 2, 5, 14, 15, 16,
600                             17, or 18 as the DH group number.  When you want
601                             to use aggressive mode, you must define the same
602                             DH group in each proposal.
603                     lifetime time number timeunit;
604                             Defines the lifetime of the phase 1 SA proposal.
605                             Refer to the description of the lifetime direc‐
606                             tive defined in the remote directive.
607                     gss_id string;
608                             Defines the GSS-API endpoint name, to be included
609                             as an attribute in the SA, if the gssapi_krb
610                             authentication method is used.  If this is not
611                             defined, the default value of ‘host/hostname’ is
612                             used, where hostname is the value returned by the
613                             hostname(1) command.
614
615     remote (address | anonymous) [[port]] [inherit parent] { statements }
616             Deprecated format of specifying a remote block.  This will be
617             removed in future.  It is a remnant from time when remote block
618             was decided solely based on the peers IP address.
619
620             This is equivalent to:
621
622             remote "address" [inherit "parent-address"] {
623                     remote_address address;
624             }
625
626   Sainfo Specifications
627     sainfo (local_id | anonymous) (remote_id | clientaddr | anonymous) [from
628             idtype [string]] [group string] { statements }
629             Defines the parameters of the IKE phase 2 (IPsec-SA establish‐
630             ment).
631
632             The local_id and remote_id strings are constructed like:
633
634             address address [/ prefix] [[port]] ul_proto
635
636             or
637
638             subnet address [/ prefix] [[port]] ul_proto
639
640             An id string should be expressed to match the exact value of an
641             ID payload.  This is not like a filter rule.  For example, if you
642             define 3ffe:501:4819::/48 as local_id.  3ffe:501:4819:1000:/64
643             will not match.  In the case of a longest prefix (selecting a
644             single host), address instructs to send ID type of ADDRESS while
645             subnet instructs to send ID type of SUBNET.  Otherwise, these
646             instructions are identical.
647
648             The anonymous keyword can be used to match any id.  The
649             clientaddr keyword can be used to match a remote id that is equal
650             to either the peer ip address or the mode_cfg ip address (if
651             assigned).  This can be useful to restrict policy generation when
652             racoon is acting as a client gateway for peers with dynamic ip
653             addresses.
654
655             The from keyword allows an sainfo to only match for peers that
656             use a specific phase1 id value during authentication.  The group
657             keyword allows an XAuth group membership check to be performed
658             for this sainfo section.  When the mode_cfg auth source is set to
659             system or ldap, the XAuth user is verified to be a member of the
660             specified group before allowing a matching SA to be negotiated.
661
662             pfs_group group;
663                     define the group of Diffie-Hellman exponentiations.  If
664                     you do not require PFS then you can omit this directive.
665                     Any proposal will be accepted if you do not specify one.
666                     group is one of following: modp768, modp1024, modp1536,
667                     modp2048, modp3072, modp4096, modp6144, modp8192.  Or you
668                     can define 1, 2, 5, 14, 15, 16, 17, or 18 as the DH group
669                     number.
670             lifetime time number timeunit;
671                     define how long an IPsec-SA will be used, in timeunits.
672                     Any proposal will be accepted, and no attribute(s) will
673                     be proposed to the peer if you do not specify it(them).
674                     See the proposal_check directive.
675             remoteid number;
676                     Sainfos will only be used if their remoteid matches the
677                     ph1id of the remote section used for phase 1.  Defaults
678                     to 0, which is also the default for ph1id.
679
680             racoon(8) does not have a list of security protocols to be nego‐
681             tiated.  The list of security protocols are passed by SPD in the
682             kernel.  Therefore you have to define all of the potential algo‐
683             rithms in the phase 2 proposals even if there are algorithms
684             which will not be used.  These algorithms are define by using the
685             following three directives, with a single comma as the separator.
686             For algorithms that can take variable-length keys, algorithm
687             names can be followed by a key length, like “blowfish 448”.
688             racoon(8) will compute the actual phase 2 proposals by computing
689             the permutation of the specified algorithms, and then combining
690             them with the security protocol specified by the SPD.  For exam‐
691             ple, if des, 3des, hmac_md5, and hmac_sha1 are specified as algo‐
692             rithms, we have four combinations for use with ESP, and two for
693             AH.  Then, based on the SPD settings, racoon(8) will construct
694             the actual proposals.  If the SPD entry asks for ESP only, there
695             will be 4 proposals.  If it asks for both AH and ESP, there will
696             be 8 proposals.  Note that the kernel may not support the algo‐
697             rithm you have specified.
698             encryption_algorithm algorithms;
699                     des, 3des, des_iv64, des_iv32, rc5, rc4, idea, 3idea,
700                     cast128, blowfish, null_enc, twofish, rijndael, aes,
701                     camellia (used with ESP)
702             authentication_algorithm algorithms;
703                     des, 3des, des_iv64, des_iv32, hmac_md5, hmac_sha1,
704                     hmac_sha256, hmac_sha384, hmac_sha512, non_auth (used
705                     with ESP authentication and AH)
706             compression_algorithm algorithms;
707                     deflate (used with IPComp)
708
709   Logging level
710     log level;
711             Defines the logging level.  level is one of following: error,
712             warning, notify, info, debug or debug2.  The default is info.  If
713             you set the logging level too high on slower machines, IKE nego‐
714             tiation can fail due to timing constraint changes.
715
716   Specifies the way to pad
717     padding { statements }
718             specifies the padding format.  The following are valid state‐
719             ments:
720             randomize (on | off);
721                     Enables the use of a randomized value for padding.  The
722                     default is on.
723             randomize_length (on | off);
724                     The pad length will be random.  The default is off.
725             maximum_length number;
726                     Defines a maximum padding length.  If randomize_length is
727                     off, this is ignored.  The default is 20 bytes.
728             exclusive_tail (on | off);
729                     Means to put the number of pad bytes minus one into the
730                     last part of the padding.  The default is on.
731             strict_check (on | off);
732                     Means to constrain the peer to set the number of pad
733                     bytes.  The default is off.
734
735   ISAKMP mode configuration settings
736     mode_cfg { statements }
737             Defines the information to return for remote hosts' ISAKMP mode
738             config requests.  Also defines the authentication source for
739             remote peers authenticating through Xauth.
740
741             The following are valid statements:
742             auth_source (system | radius | pam | ldap);
743                     Specifies the source for authentication of users through
744                     Xauth.  system means to use the Unix user database.  This
745                     is the default.  radius means to use a RADIUS server.  It
746                     works only if racoon(8) was built with libradius support.
747                     Radius configuration is handled by statements in the
748                     radiuscfg section.  pam means to use PAM.  It works only
749                     if racoon(8) was built with libpam support.  ldap means
750                     to use LDAP.  It works only if racoon(8) was built with
751                     libldap support.  LDAP configuration is handled by state‐
752                     ments in the ldapcfg section.
753             auth_groups group1, ...;
754                     Specifies the group memberships for Xauth in quoted group
755                     name strings.  When defined, the authenticating user must
756                     be a member of at least one group for Xauth to succeed.
757             group_source (system | ldap);
758                     Specifies the source for group validation of users
759                     through Xauth.  system means to use the Unix user data‐
760                     base.  This is the default.  ldap means to use LDAP.  It
761                     works only if racoon(8) was built with libldap support
762                     and requires LDAP authentication.  LDAP configuration is
763                     handled by statements in the ldapcfg section.
764             conf_source (local | radius | ldap);
765                     Specifies the source for IP addresses and netmask allo‐
766                     cated through ISAKMP mode config.  local means to use the
767                     local IP pool defined by the network4 and pool_size
768                     statements.  This is the default.  radius means to use a
769                     RADIUS server.  It works only if racoon(8) was built with
770                     libradius support and requires RADIUS authentication.
771                     RADIUS configuration is handled by statements in the
772                     radiuscfg section.  ldap means to use an LDAP server.  It
773                     works only if racoon(8) was built with libldap support
774                     and requires LDAP authentication.  LDAP configuration is
775                     handled by statements in the ldapcfg section.
776             accounting (none | system | radius | pam);
777                     Enables or disables accounting for Xauth logins and
778                     logouts.  The default is none which disable accounting.
779                     Specifying system enables system accounting through
780                     utmp(5).  Specifying radius enables RADIUS accounting.
781                     It works only if racoon(8) was built with libradius sup‐
782                     port and requires RADIUS authentication.  RADIUS configu‐
783                     ration is handled by statements in the radiuscfg section.
784                     Specifying pam enables PAM accounting.  It works only if
785                     racoon(8) was build with libpam support and requires PAM
786                     authentication.
787             pool_size size
788                     Specify the size of the IP address pool, either local or
789                     allocated through RADIUS.  conf_source selects the local
790                     pool or the RADIUS configuration, but in both configura‐
791                     tions, you cannot have more than size users connected at
792                     the same time.  The default is 255.
793             network4 address;
794             netmask4 address;
795                     The local IP pool base address and network mask from
796                     which dynamically allocated IPv4 addresses should be
797                     taken.  This is used if conf_source is set to local or if
798                     the RADIUS server returned 255.255.255.254.  Default is
799                     0.0.0.0/0.0.0.0.
800             dns4 addresses;
801                     A list of IPv4 addresses for DNS servers, separated by
802                     commas, or on multiple dns4 lines.
803             wins4 addresses;
804                     A list of IPv4 address for WINS servers.  The keyword
805             nbns4   can also be used as an alias for
806             wins4.
807             split_network (include | local_lan) network/mask, ...
808                     The network configuration to send, in CIDR notation (e.g.
809                     192.168.1.0/24).  If include is specified, the tunnel
810                     should be only used to encrypt the indicated destinations
811                     ; otherwise, if local_lan is used, everything will pass
812                     through the tunnel but those destinations.
813             default_domain domain;
814                     The default DNS domain to send.
815             split_dns domain, ...
816                     The split dns configuration to send, in quoted domain
817                     name strings.  This list can be used to describe a list
818                     of domain names for which a peer should query a modecfg
819                     assigned dns server.  DNS queries for all other domains
820                     would be handled locally.  (Cisco VPN client only).
821             banner path;
822                     The path of a file displayed on the client at connection
823                     time.  Default is /etc/motd.
824             auth_throttle delay;
825                     On each failed Xauth authentication attempt, refuse new
826                     attempts for a set delay of seconds.  This is to avoid
827                     dictionary attacks on Xauth passwords.  Default is one
828                     second.  Set to zero to disable authentication delay.
829             pfs_group group;
830                     Sets the PFS group used in the client proposal (Cisco VPN
831                     client only).  Default is 0.
832             save_passwd (on | off);
833                     Allow the client to save the Xauth password (Cisco VPN
834                     client only).  Default is off.
835
836   Ldap configuration settings
837     ldapcfg { statements }
838             Defines the parameters that will be used to communicate with an
839             ldap server for xauth authentication.
840
841             The following are valid statements:
842             version (2 | 3);
843                     The ldap protocol version used to communicate with the
844                     server.  The default is 3.
845             host (hostname | address);
846                     The host name or ip address of the ldap server.  The
847                     default is localhost.
848             port number;
849                     The port that the ldap server is configured to listen on.
850                     The default is 389.
851             base distinguished name;
852                     The ldap search base.  This option has no default value.
853             subtree (on | off);
854                     Use the subtree ldap search scope.  Otherwise, use the
855                     one level search scope.  The default is off.
856             bind_dn distinguished name;
857                     The user dn used to optionally bind as before performing
858                     ldap search operations.  If this option is not specified,
859                     anonymous binds are used.
860             bind_pw string;
861                     The password used when binding as bind_dn.
862             attr_user attribute name;
863                     The attribute used to specify a users name in an ldap
864                     directory.  For example, if a user dn is
865                     "cn=jdoe,dc=my,dc=net" then the attribute would be "cn".
866                     The default value is cn.
867             attr_addr attribute name;
868             attr_mask attribute name;
869                     The attributes used to specify a users network address
870                     and subnet mask in an ldap directory.  These values are
871                     forwarded during mode_cfg negotiation when the
872                     conf_source is set to ldap.  The default values are
873                     racoon-address and racoon-netmask.
874             attr_group attribute name;
875                     The attribute used to specify a group name in an ldap
876                     directory.  For example, if a group dn is
877                     "cn=users,dc=my,dc=net" then the attribute would be "cn".
878                     The default value is cn.
879             attr_member attribute name;
880                     The attribute used to specify group membership in an ldap
881                     directory.  The default value is member.
882
883   Radius configuration settings
884     radiuscfg { statements }
885             Defines the parameters that will be used to communicate with
886             radius servers for xauth authentication.  If radius is selected
887             as the xauth authentication or accounting source and no servers
888             are defined in this section, settings from the system
889             radius.conf(5) configuration file will be used instead.
890
891             The following are valid statements:
892             auth (hostname | address) [port] sharedsecret;
893                     The host name or ip address, optional port value and
894                     shared secret value of a radius authentication server.
895                     Up to 5 radius authentication servers may be specified
896                     using multiple lines.
897             acct (hostname | address) [port] sharedsecret;
898                     The host name or ip address, optional port value and
899                     shared secret value of a radius accounting server.  Up to
900                     5 radius accounting servers may be specified using multi‐
901                     ple lines.
902             timeout seconds;
903                     The timeout for receiving replies from radius servers.
904                     The default is 3.
905             retries count;
906                     The maximum number of repeated requests to make before
907                     giving up on a radius server.  The default is 3.
908
909   Special directives
910     complex_bundle (on | off);
911             defines the interpretation of proposal in the case of SA bundle.
912             Normally “IP AH ESP IP payload” is proposed as “AH tunnel and ESP
913             tunnel”.  The interpretation is more common to other IKE imple‐
914             mentations, however, it allows very limited set of combinations
915             for proposals.  With the option enabled, it will be proposed as
916             “AH transport and ESP tunnel”.  The default value is off.
917
918   Pre-shared key File
919     The pre-shared key file defines pairs of identifiers and corresponding
920     shared secret keys which are used in the pre-shared key authentication
921     method in phase 1.  The pair in each line is separated by some number of
922     blanks and/or tab characters like in the hosts(5) file.  Key can include
923     blanks because everything after the first blanks is interpreted as the
924     secret key.  Lines starting with ‘#’ are ignored.  Keys which start with
925     ‘0x’ are interpreted as hexadecimal strings.  Note that the file must be
926     owned by the user ID running racoon(8) (usually the privileged user), and
927     must not be accessible by others.
928

EXAMPLES

930     The following shows how the remote directive should be configured.
931
932     path pre_shared_key "/usr/local/v6/etc/psk.txt" ;
933     remote anonymous
934     {
935             exchange_mode aggressive,main,base;
936             lifetime time 24 hour;
937             proposal {
938                     encryption_algorithm 3des;
939                     hash_algorithm sha1;
940                     authentication_method pre_shared_key;
941                     dh_group 2;
942             }
943     }
944
945     sainfo anonymous
946     {
947             pfs_group 2;
948             lifetime time 12 hour ;
949             encryption_algorithm 3des, blowfish 448, twofish, rijndael ;
950             authentication_algorithm hmac_sha1, hmac_md5 ;
951             compression_algorithm deflate ;
952     }
953
954     If you are configuring plain RSA authentication, the remote directive
955     should look like the following:
956
957     path certificate "/usr/local/v6/etc" ;
958     remote anonymous
959     {
960             exchange_mode main,base ;
961             lifetime time 12 hour ;
962             certificate_type plain_rsa "/usr/local/v6/etc/myrsakey.priv";
963             peers_certfile plain_rsa "/usr/local/v6/etc/yourrsakey.pub";
964             proposal {
965                             encryption_algorithm aes ;
966                             hash_algorithm sha1 ;
967                             authentication_method rsasig ;
968                             dh_group 2 ;
969             }
970     }
971
972     The following is a sample for the pre-shared key file.
973
974     10.160.94.3     mekmitasdigoat
975     172.16.1.133    0x12345678
976     194.100.55.1    whatcertificatereally
977     3ffe:501:410:ffff:200:86ff:fe05:80fa    mekmitasdigoat
978     3ffe:501:410:ffff:210:4bff:fea2:8baa    mekmitasdigoat
979     foo@kame.net    mekmitasdigoat
980     foo.kame.net    hoge
981

SEE ALSO

983     racoon(8), racoonctl(8), setkey(8)
984

HISTORY

986     The racoon.conf configuration file first appeared in the “YIPS” Yokogawa
987     IPsec implementation.
988

BUGS

990     Some statements may not be handled by racoon(8) yet.
991
992     Diffie-Hellman computation can take a very long time, and may cause
993     unwanted timeouts, specifically when a large D-H group is used.
994

SECURITY CONSIDERATIONS

996     The use of IKE phase 1 aggressive mode is not recommended, as described
997     in http://www.kb.cert.org/vuls/id/886601.
998
999BSD                             August 29, 2012                            BSD
Impressum