1 .\" $NetBSD: racoon.conf.5,v 1.34.4.2 2007/07/18 22:53:03 mgrooms Exp $
3 .\" Id: racoon.conf.5,v 1.54 2006/08/22 18:17:17 manubsd Exp
5 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
6 .\" All rights reserved.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. Neither the name of the project nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Dd September 19, 2006
38 .Nd configuration file for racoon
44 is the configuration file for the
48 negotiates security associations for itself (ISAKMP SA, or phase 1 SA)
49 and for kernel IPsec (IPsec SA, or phase 2 SA).
50 The file consists of a sequence of directives and statements.
51 Each directive is composed by a tag and statements, enclosed by
60 Keywords and special characters that the parser expects exactly are
64 Parameters are specified with
73 are used to show optional keywords and parameters.
75 you have to pay attention when this manual is describing
80 number is always enclosed by
84 In this case, the port number is not an optional keyword.
85 If it is possible to omit the
88 the expression becomes
93 a choice between optional parameters.
100 are used to group keywords and parameters when necessary.
101 Major parameters are listed below.
103 .Bl -tag -width addressx -compact
105 means a hexadecimal or a decimal number.
106 The former must be prefixed with
111 means any string enclosed in
115 means IPv6 and/or IPv4 address.
117 means a TCP/UDP port number.
118 The port number is always enclosed by
124 .Ic sec , secs , second , seconds ,
125 .Ic min , mins , minute , minutes ,
129 .Ss Privilege separation
130 .Bl -tag -width Ds -compact
131 .It Ic privsep { Ar statements Ic }
132 Specifies privilege separation parameters.
133 When enabled, these enable
135 to operate with an unprivileged instance doing most of the work, while
136 a privileged instance takes care of performing the following operations
137 as root: reading PSK and private keys, launching hook scripts, and
138 validating passwords against system databases or against PAM.
139 Please note that using privilege separation makes changes to the
143 sections ignored upon configuration reloads.
146 restart is required if you want such changes to be taken into account.
148 .Bl -tag -width Ds -compact
149 .It Ic user Ar user ;
150 The user to which the unprivileged instance of
153 This can be a quoted user name or a numeric UID.
154 .It Ic group Ar group ;
155 The group the unprivilegied instance of
158 This can be a quoted group name or a numeric GID.
159 .It Ic chroot Ar path ;
160 A directory to which the unprivileged instance of
164 This directory should hold a tree where the following files must be
166 .Bl -tag -width Ds -compact
170 .It The file containing the Xauth banner
173 The PSK file, the private keys, and the hook scripts are accessed through the
174 privileged instance of
176 and do not need to be reachable in the
181 .Ss Path Specification
182 This section specifies various paths used by racoon.
183 When running in privilege separation mode,
187 paths are mandatory. A
189 restart is required if you want path changes to be taken into account.
190 .Bl -tag -width Ds -compact
191 .It Ic path include Ar path ;
192 Specifies a path to include a file.
195 .It Ic path pre_shared_key Ar file ;
196 Specifies a file containing pre-shared key(s) for various ID(s).
198 .Sx Pre-shared key File .
199 .It Ic path certificate Ar path ;
201 will search this directory if a certificate or certificate request is received.
202 If you run with privilege separation,
204 will refuse to use a certificate stored outside of this directory.
205 .It Ic path backupsa Ar file ;
206 Specifies a file to which SA information negotiated by
207 racoon should be stored.
209 will install SA(s) from the file when started with the
212 The file is growing because
214 simply adds SAs to it.
215 You should maintain the file manually.
216 .It Ic path script Ar path ;
218 will search this directory for scripts hooks.
219 If you run with privilege separation,
221 will refuse to execute a script stored outside of this directory.
222 .It Ic path pidfile Ar file ;
223 Specifies file where to store PID of process.
226 it is treated as an absolute path. Otherwise, it is treated as a relative
227 path to the VARRUN directory specified at compilation time.
233 .Bl -tag -width Ds -compact
234 .It Ic include Ar file
235 Specifies other configuration files to be included.
238 .Ss Identifier Specification
240 It must be defined at each
244 .Ss Timer Specification
245 .Bl -tag -width Ds -compact
246 .It Ic timer { Ar statements Ic }
247 This section specifies various timer values used by racoon.
249 .Bl -tag -width Ds -compact
250 .It Ic counter Ar number ;
251 The maximum number of retries to send.
253 .It Ic interval Ar number Ar timeunit ;
254 The interval to resend, in seconds.
255 The default time is 10 seconds.
256 .It Ic persend Ar number ;
257 The number of packets per send.
259 .It Ic phase1 Ar number Ar timeunit ;
260 The maximum time it should take to complete phase 1.
261 The default time is 15 seconds.
262 .It Ic phase2 Ar number Ar timeunit ;
263 The maximum time it should take to complete phase 2.
264 The default time is 10 seconds.
265 .It Ic natt_keepalive Ar number Ar timeunit ;
266 The interval between sending NAT-Traversal keep-alive packets.
267 The default time is 20 seconds.
268 Set to 0s to disable keep-alive packets.
272 .Ss Listening Port Specification
273 .Bl -tag -width Ds -compact
274 .It Ic listen { Ar statements Ic }
277 directive is specified,
279 will listen on all available interface addresses.
280 The following is the list of valid statements:
282 .Bl -tag -width Ds -compact
283 .\" How do I express bold brackets; `[' and `]' .
284 .\" Answer: For bold brackets, do "Ic \&[ foo \&]".
285 .\" Is the "Bq Ic [ Ar port ] ;" buggy ?
286 .It Ic isakmp Ar address Bq Bq Ar port ;
287 If this is specified,
289 will only listen on the defined
291 The default port is 500, which is specified by IANA.
292 You can provide more than one address definition.
293 .It Ic isakmp_natt Ar address Bq Ar port ;
296 but also sets the socket options to accept UDP-encapsulated ESP traffic for
298 If you plan to use NAT-T, you should provide at least one address
299 with port 4500, which is specified by IANA.
301 .It Ic strict_address ;
302 Requires that all addresses for ISAKMP be bound.
303 This statement will be ignored if you do not specify address definitions.
305 When running in privilege separation mode, you need to restart
307 to have changes to the
309 section taken into account.
313 section can also be used to specify the admin socket mode and ownership
314 if racoon was built with support for admin port.
315 .Bl -tag -width Ds -compact
316 .It Ic adminsock Ar path Op Ar owner\ group\ mode ;
322 values specify the socket path, owner, and group. They must be quoted.
324 .Pa /var/racoon/racoon.sock ,
327 is the access mode in octal. The default is 0600.
328 .It Ic adminsock disabled ;
329 This directive tells racoon to not listen on the admin socket.
333 .Ss Miscellaneous Global Parameters
334 .Bl -tag -width Ds -compact
335 .It Ic gss_id_enc Ar enctype ;
338 used ISO-Latin-1 as the encoding of the GSS-API identifier attribute.
339 For interoperability with Microsoft Windows' GSS-API authentication
340 scheme, the default encoding has been changed to UTF-16LE.
345 to be configured to use the old encoding for compatibility with existing
348 The following are valid values for
351 .Bl -tag -width Ds -compact
353 Use UTF-16LE to encode the GSS-API identifier attribute.
354 This is the default encoding.
355 This encoding is compatible with Microsoft Windows.
357 Use ISO-Latin-1 to encode the GSS-API identifier attribute.
358 This is the encoding used by older versions of
363 .Ss Remote Nodes Specifications
364 .Bl -tag -width Ds -compact
366 .Ic remote ( Ar address | Ic anonymous )
368 .Bq Ic inherit Ar parent
369 .Ic { Ar statements Ic }
371 Specifies the IKE phase 1 parameters for each remote node.
372 The default port is 500.
375 is specified, the statements will apply to any peer that does not match a
381 .Ic inherit Ar parent
388 that have all values predefined to those of a given
390 In these sections it is enough to redefine only the changed parameters.
392 The following are valid statements.
394 .Bl -tag -width Ds -compact
396 .It Ic exchange_mode ( main | aggressive | base ) ;
397 Defines the exchange mode for phase 1 when racoon is the initiator.
398 It also means the acceptable exchange mode when racoon is the responder.
399 More than one mode can be specified by separating them with a comma.
400 All of the modes are acceptable.
401 The first exchange mode is what racoon uses when it is the initiator.
403 .It Ic doi Ic ipsec_doi ;
404 Means to use IPsec DOI as specified in RFC 2407.
405 You can omit this statement.
407 .It Ic situation Ic identity_only ;
408 Means to use SIT_IDENTITY_ONLY as specified in RFC 2407.
409 You can omit this statement.
411 .It Ic identifier Ar idtype ;
412 This statment is obsolete. Instead, use
416 .Ic my_identifier Bq Ar qualifier
419 Specifies the identifier sent to the remote host
420 and the type to use in the phase 1 negotiation.
421 .Ic address, fqdn , user_fqdn , keyid ,
428 is currently only used for
434 The possible values are :
435 .Bl -tag -width Ds -compact
436 .It Ic my_identifier Ic address Bq Ar address ;
437 The type is the IP address.
438 This is the default type if you do not specify an identifier to use.
439 .It Ic my_identifier Ic user_fqdn Ar string ;
440 The type is a USER_FQDN (user fully-qualified domain name).
441 .It Ic my_identifier Ic fqdn Ar string ;
442 The type is a FQDN (fully-qualified domain name).
444 .Ic my_identifier Ic keyid Bq Ic file
447 The type is a KEY_ID, read from the file.
448 .It Ic my_identifier Ic keyid Ic tag Ar string ;
449 The type is a KEY_ID, specified in the quoted string.
450 .It Ic my_identifier Ic asn1dn Bq Ar string ;
451 The type is an ASN.1 distinguished name.
456 will get the DN from the Subject field in the certificate.
459 .It Ic xauth_login Bq Ar string ;
460 Specifies the login to use in client-side Hybrid authentication.
461 It is available only if
463 has been built with this option.
464 The associated password is looked up in the pre-shared key files,
469 .It Ic peers_identifier Ar idtype ... ;
470 Specifies the peer's identifier to be received.
471 If it is not defined then
473 will not verify the peer's identifier in ID payload transmitted from the peer.
474 If it is defined, the behavior of the verification depends on the flag of
475 .Ic verify_identifier .
480 except that the individual component values of an
482 identifier may specified as
484 to match any value (e.g. "C=XX, O=MyOrg, OU=*, CN=Mine").
485 Alternative acceptable peer identifiers may be specified by repeating the
489 .It Ic verify_identifier (on | off) ;
490 If you want to verify the peer's identifier,
492 In this case, if the value defined by
494 is not the same as the peer's identifier in the ID payload,
495 the negotiation will fail.
498 .It Ic certificate_type Ar certspec ;
499 Specifies a certificate specification.
501 is one of followings:
502 .Bl -tag -width Ds -compact
503 .It Ic x509 Ar certfile Ar privkeyfile ;
505 means a file name of a certificate.
507 means a file name of a secret key.
509 .Bl -tag -width Ds -compact
510 .It Ic plain_rsa Ar privkeyfile ;
512 means a file name of a private key generated by plainrsa-gen(8). Required
513 for RSA authentication.
515 .It Ic ca_type Ar cacertspec ;
516 Specifies a root certificate authority specification.
518 is one of followings:
519 .Bl -tag -width Ds -compact
520 .It Ic x509 Ar cacertfile ;
522 means a file name of the root certificate authority.
524 .Pa /etc/openssl/cert.pem
527 .It Ic mode_cfg (on | off) ;
528 Gather network information through ISAKMP mode configuration.
531 .It Ic weak_phase1_check (on | off) ;
532 Tells racoon to act on unencrypted deletion messages during phase 1.
533 This is a small security risk, so the default is off, meaning that
534 racoon will keep on trying to establish a connection even if the
535 user credentials are wrong, for instance.
537 .It Ic peers_certfile ( dnssec | Ar certfile | Ic plain_rsa Ar pubkeyfile ) ;
542 will ignore the CERT payload from the peer,
543 and try to get the peer's certificate from DNS instead.
548 will ignore the CERT payload from the peer,
549 and will use this certificate as the peer's certificate.
556 to be the peer's public key that was generated
559 .It Ic script Ar script Ic phase1_up
560 .It Ic script Ar script Ic phase1_down
561 Shell scripts that get executed when a phase 1 SA goes up or down.
562 Both scripts get either
566 as first argument, and the following
567 variables are set in their environment:
568 .Bl -tag -width Ds -compact
570 The local address of the phase 1 SA.
572 The local port used for IKE for the phase 1 SA.
574 The remote address of the phase 1 SA.
576 The remote port used for IKE for the phase 1 SA.
578 The following variables are only set if
581 .Bl -tag -width Ds -compact
583 An IPv4 internal address obtained by ISAKMP mode config.
584 .It INTERNAL_NETMASK4
585 An IPv4 internal netmask obtained by ISAKMP mode config.
587 An IPv4 internal netmask obtained by ISAKMP mode config, in CIDR notation.
589 The first internal DNS server IPv4 address obtained by ISAKMP mode config.
590 .It INTERNAL_DNS4_LIST
591 A list of internal DNS servers IPv4 address obtained by ISAKMP mode config,
594 The first internal WINS server IPv4 address obtained by ISAKMP mode config.
595 .It INTERNAL_WINS4_LIST
596 A list of internal WINS servers IPv4 address obtained by ISAKMP mode config,
599 The space separated list of IPv4 addresses and masks (address slash mask)
600 that define the networks to be encrypted (as opposed to the default where
601 all the traffic should be encrypted) ; obtained by ISAKMP mode config ;
602 SPLIT_INCLUDE and SPLIT_LOCAL are mutually exclusive.
604 The space separated list of IPv4 addresses and masks (address slash mask)
605 that define the networks to be considered local, and thus excluded from the
606 tunnels ; obtained by ISAKMP mode config.
608 The DNS default domain name obtained by ISAKMP mode config.
612 .It Ic send_cert (on | off) ;
613 If you do not want to send a certificate, set this to off.
616 .It Ic send_cr (on | off) ;
617 If you do not want to send a certificate request, set this to off.
620 .It Ic verify_cert (on | off) ;
621 By default, the identifier sent by the remote host (as specified in its
623 statement) is compared with the credentials in the certificate
624 used to authenticate the remote host as follows:
625 .Bl -tag -width Ds -compact
627 The entire certificate subject name is compared with the identifier,
628 e.g. "C=XX, O=YY, ...".
629 .It Type Ic address, fqdn, or user_fqdn:
630 The certificate's subjectAltName is compared with the identifier.
632 If the two do not match the negotiation will fail.
633 If you do not want to verify the identifier using the peer's certificate,
636 .It Ic lifetime time Ar number Ar timeunit ;
637 Define a lifetime of a certain time
638 which will be proposed in the phase 1 negotiations.
639 Any proposal will be accepted, and the attribute(s) will not be proposed to
640 the peer if you do not specify it (them).
641 They can be individually specified in each proposal.
643 .It Ic ike_frag (on | off | force) ;
644 Enable receiver-side IKE fragmentation if
646 has been built with this feature.
647 If set to on, racoon will advertise
648 itself as being capable of receiving packets split by IKE fragmentation.
649 This extension is there to work around broken firewalls that do not
650 work with fragmented UDP packets.
651 IKE fragmentation is always enabled on the sender-side, and it is
652 used if the peer advertises itself as IKE fragmentation capable.
653 By selecting force, IKE Fragmentation will
654 be used when racoon is acting as the initiator even before the remote
655 peer has advertised itself as IKE fragmentation capable.
657 .It Ic esp_frag Ar fraglen ;
658 This option is only relevant if you use NAT traversal in tunnel mode.
659 Its purpose is to work around broken DSL routers that reject UDP
660 fragments, by fragmenting the IP packets before ESP encapsulation.
661 The result is ESP over UDP of fragmented packets instead of fragmented
662 ESP over UDP packets (i.e., IP:UDP:ESP:frag(IP) instead of
663 frag(IP:UDP:ESP:IP)).
665 is the maximum size of the fragments.
666 552 should work anywhere,
669 is, the better the performance.
671 Note that because PMTU discovery is broken on many sites, you will
672 have to use MSS clamping if you want TCP to work correctly.
674 .It Ic initial_contact (on | off) ;
675 Enable this to send an INITIAL-CONTACT message.
678 This message is useful only when the responder implementation chooses an
679 old SA when there are multiple SAs with different established time and the
681 If racoon did not send the message,
682 the responder would use an old SA even when a new SA was established.
683 For systems that use a KAME derived IPSEC stack, the
685 variable net.key.preferred_oldsa can be used to control this preference.
686 When the value is zero, the stack always uses a new SA.
688 .It Ic passive (on | off) ;
689 If you do not want to initiate the negotiation, set this to on.
692 It is useful for a server.
694 .It Ic proposal_check Ar level ;
695 Specifies the action of lifetime length, key length and PFS of the phase 2
696 selection on the responder side, and the action of lifetime check in
703 .Bl -tag -width Ds -compact
705 The responder will obey the initiator anytime.
707 If the responder's lifetime length is longer than the initiator's or
708 the responder's key length is shorter than the initiator's,
709 the responder will use the initiator's value.
710 Otherwise, the proposal will be rejected.
711 If PFS is not required by the responder, the responder will obey the proposal.
712 If PFS is required by both sides and the responder's group is not equal to
713 the initiator's, then the responder will reject the proposal.
715 If the responder's lifetime length is longer than the initiator's or
716 the responder's key length is shorter than the initiator's,
717 the responder will use the initiator's value.
718 If the responder's lifetime length is shorter than the initiator's,
719 the responder uses its own length AND sends a RESPONDER-LIFETIME notify
720 message to an initiator in the case of lifetime (phase 2 only).
721 For PFS, this directive behaves the same as
724 If the initiator's lifetime or key length is not equal to the responder's,
725 the responder will reject the proposal.
726 If PFS is required by both sides and the responder's group is not equal to
727 the initiator's, then the responder will reject the proposal.
730 .It Ic support_proxy (on | off) ;
731 If this value is set to on, then both values of ID payloads in the
732 phase 2 exchange are always used as the addresses of end-point of
736 .It Ic generate_policy (on | off | require | unique) ;
737 This directive is for the responder.
738 Therefore you should set
742 only becomes a responder.
743 If the responder does not have any policy in SPD during phase 2
744 negotiation, and the directive is set to on, then
746 will choose the first proposal in the
747 SA payload from the initiator, and generate policy entries from the proposal.
748 It is useful to negotiate with clients whose IP address is allocated
750 Note that an inappropriate policy might be installed into the responder's SPD
752 so other communications might fail if such policies are installed
753 due to a policy mismatch between the initiator and the responder.
757 values mean the same thing (generate a require policy).
759 tells racoon to set up unique policies, with a monotoning increasing
760 reqid number (between 1 and IPSEC_MANUAL_REQID_MAX).
761 This directive is ignored in the initiator case.
766 .It Ic nat_traversal (on | off | force) ;
767 This directive enables use of the NAT-Traversal IPsec extension
769 NAT-T allows one or both peers to reside behind a NAT gateway (i.e.,
770 doing address- or port-translation).
771 If a NAT gateway is detected during the phase 1 handshake, racoon will
772 attempt to negotiate the use of NAT-T with the remote peer.
773 If the negotiation succeeds, all ESP and AH packets for the given connection
774 will be encapsulated into UDP datagrams (port 4500, by default).
776 .Bl -tag -width Ds -compact
778 NAT-T is used when a NAT gateway is detected between the peers.
780 NAT-T is not proposed/accepted.
783 NAT-T is used regardless of whether a NAT gateway is detected between the
786 Please note that NAT-T support is a compile-time option.
787 Although it is enabled in the source distribution by default, it
788 may not be available in your particular build.
789 In that case you will get a
790 warning when using any NAT-T related config options.
792 .It Ic dpd_delay Ar delay ;
793 This option activates the DPD and sets the time (in seconds) allowed
794 between 2 proof of liveliness requests.
797 which disables DPD monitoring, but still negotiates DPD support.
799 .It Ic dpd_retry Ar delay ;
802 is set, this sets the delay (in seconds) to wait for a proof of
803 liveliness before considering it as failed and send another request.
807 .It Ic dpd_maxfail Ar number ;
810 is set, this sets the maximum number of liveliness proofs to request
811 (without reply) before considering the peer is dead.
815 .It Ic nonce_size Ar number ;
816 define the byte size of nonce value.
817 Racoon can send any value although
818 RFC2409 specifies that the value MUST be between 8 and 256 bytes.
819 The default size is 16 bytes.
821 .It Ic ph1id Ar number ;
822 An optionnal number to identify the remote proposal and to link it
823 only with sainfos who have the same number.
827 .Ic proposal { Ar sub-substatements Ic }
829 .Bl -tag -width Ds -compact
831 .It Ic encryption_algorithm Ar algorithm ;
832 Specifies the encryption algorithm used for the phase 1 negotiation.
833 This directive must be defined.
836 .Ic des, 3des, blowfish, cast128, aes, camellia
839 For other transforms, this statement should not be used.
841 .It Ic hash_algorithm Ar algorithm ;
842 Defines the hash algorithm used for the phase 1 negotiation.
843 This directive must be defined.
846 .Ic md5, sha1, sha256, sha384, sha512
849 .It Ic authentication_method Ar type ;
850 Defines the authentication method used for the phase 1 negotiation.
851 This directive must be defined.
854 .Ic pre_shared_key , rsasig
855 (for plain RSA authentication),
856 .Ic gssapi_krb , hybrid_rsa_server ,
857 .Ic hybrid_rsa_client , xauth_rsa_server , xauth_rsa_client , xauth_psk_server
859 .Ic xauth_psk_client .
861 .It Ic dh_group Ar group ;
862 Defines the group used for the Diffie-Hellman exponentiations.
863 This directive must be defined.
866 .Ic modp768 , modp1024 , modp1536 ,
867 .Ic modp2048 , modp3072 , modp4096 ,
868 .Ic modp6144 , modp8192 .
869 Or you can define 1, 2, 5, 14, 15, 16, 17, or 18 as the DH group number.
870 When you want to use aggressive mode,
871 you must define the same DH group in each proposal.
872 .It Ic lifetime time Ar number Ar timeunit ;
873 Defines the lifetime of the phase 1 SA proposal.
874 Refer to the description of the
876 directive defined in the
879 .It Ic gss_id Ar string ;
880 Defines the GSS-API endpoint name, to be included as an attribute in the SA,
883 authentication method is used.
884 If this is not defined, the default value of
886 is used, where hostname is the value returned by the
893 .Ss Policy Specifications
894 The policy directive is obsolete, policies are now in the SPD.
896 will obey the policy configured into the kernel by
898 and will construct phase 2 proposals by combining
902 and policies in the kernel.
904 .Ss Sainfo Specifications
905 .Bl -tag -width Ds -compact
907 .Ic sainfo ( Ar source_id destination_id | Ar source_id Ic anonymous | Ic anonymous Ar destination_id | Ic anonymous ) [ from Ar idtype [ Ar string ] ] [ Ic group Ar string ]
908 .Ic { Ar statements Ic }
910 defines the parameters of the IKE phase 2 (IPsec-SA establishment).
914 are constructed like:
916 .Ic address Ar address
923 .Ic subnet Ar address
932 An id string should be expressed to match the exact value of an ID payload
933 (source is the local end, destination is the remote end).
934 This is not like a filter rule.
935 For example, if you define 3ffe:501:4819::/48 as
937 3ffe:501:4819:1000:/64 will not match.
939 In the case of a longest prefix (selecting a single host),
941 instructs to send ID type of ADDRESS while
943 instructs to send ID type of SUBNET.
944 Otherwise, these instructions are identical.
946 The group keyword allows an XAuth group membership check to be performed
947 for this sainfo section.
948 When the mode_cfg auth source is set to
952 the XAuth user is verified to be a member of the specified group
953 before allowing a matching SA to be negotiated.
955 .Bl -tag -width Ds -compact
957 .It Ic pfs_group Ar group ;
958 define the group of Diffie-Hellman exponentiations.
959 If you do not require PFS then you can omit this directive.
960 Any proposal will be accepted if you do not specify one.
963 .Ic modp768 , modp1024 , modp1536 ,
964 .Ic modp2048 , modp3072 , modp4096 ,
965 .Ic modp6144 , modp8192 .
966 Or you can define 1, 2, 5, 14, 15, 16, 17, or 18 as the DH group number.
968 .It Ic lifetime time Ar number Ar timeunit ;
969 define how long an IPsec-SA will be used, in timeunits.
970 Any proposal will be accepted, and no attribute(s) will be proposed to
971 the peer if you do not specify it(them).
976 .It Ic remoteid Ar number ;
977 Sainfos will only be used if their remoteid matches the ph1id of the
978 remote section used for phase 1.
979 Defaults to 0, which is also the default for ph1id.
981 .It Ic my_identifier Ar idtype ... ;
983 It does not make sense to specify an identifier in the phase 2.
988 does not have a list of security protocols to be negotiated.
989 The list of security protocols are passed by SPD in the kernel.
990 Therefore you have to define all of the potential algorithms
991 in the phase 2 proposals even if there are algorithms which will not be used.
992 These algorithms are define by using the following three directives,
993 with a single comma as the separator.
994 For algorithms that can take variable-length keys, algorithm names
995 can be followed by a key length, like
996 .Dq Li blowfish 448 .
998 will compute the actual phase 2 proposals by computing
999 the permutation of the specified algorithms,
1000 and then combining them with the security protocol specified by the SPD.
1002 .Ic des , 3des , hmac_md5 ,
1005 are specified as algorithms, we have four combinations for use with ESP,
1007 Then, based on the SPD settings,
1009 will construct the actual proposals.
1010 If the SPD entry asks for ESP only, there will be 4 proposals.
1011 If it asks for both AH and ESP, there will be 8 proposals.
1012 Note that the kernel may not support the algorithm you have specified.
1014 .Bl -tag -width Ds -compact
1015 .It Ic encryption_algorithm Ar algorithms ;
1016 .Ic des , 3des , des_iv64 , des_iv32 ,
1017 .Ic rc5 , rc4 , idea , 3idea ,
1018 .Ic cast128 , blowfish , null_enc ,
1019 .Ic twofish , rijndael , aes , camellia
1022 .It Ic authentication_algorithm Ar algorithms ;
1023 .Ic des , 3des , des_iv64 , des_iv32 ,
1024 .Ic hmac_md5 , hmac_sha1 , hmac_sha256, hmac_sha384, hmac_sha512, non_auth
1025 .Pq used with ESP authentication and AH
1027 .It Ic compression_algorithm Ar algorithms ;
1029 .Pq used with IPComp
1034 .Bl -tag -width Ds -compact
1035 .It Ic log Ar level ;
1036 Defines the logging level.
1038 is one of following:
1039 .Ic error , warning , notify , info , debug
1044 If you set the logging level too high on slower machines,
1045 IKE negotiation can fail due to timing constraint changes.
1048 .Ss Specifies the way to pad
1049 .Bl -tag -width Ds -compact
1050 .It Ic padding { Ar statements Ic }
1051 specifies the padding format.
1052 The following are valid statements:
1053 .Bl -tag -width Ds -compact
1054 .It Ic randomize (on | off) ;
1055 Enables the use of a randomized value for padding.
1057 .It Ic randomize_length (on | off) ;
1058 The pad length will be random.
1060 .It Ic maximum_length Ar number ;
1061 Defines a maximum padding length.
1063 .Ic randomize_length
1064 is off, this is ignored.
1065 The default is 20 bytes.
1066 .It Ic exclusive_tail (on | off) ;
1067 Means to put the number of pad bytes minus one into the last part
1070 .It Ic strict_check (on | off) ;
1071 Means to constrain the peer to set the number of pad bytes.
1075 .Ss ISAKMP mode configuration settings
1076 .Bl -tag -width Ds -compact
1077 .It Ic mode_cfg { Ar statements Ic }
1078 Defines the information to return for remote hosts' ISAKMP mode config
1080 Also defines the authentication source for remote peers
1081 authenticating through Xauth.
1083 The following are valid statements:
1084 .Bl -tag -width Ds -compact
1085 .It Ic auth_source (system | radius | pam | ldap) ;
1086 Specifies the source for authentication of users through Xauth.
1088 means to use the Unix user database.
1089 This is the default.
1091 means to use a RADIUS server.
1094 was built with libradius support. Radius configuration is hanlded by
1100 was built with libpam support.
1105 was built with libldap support. LDAP configuration is handled by
1109 .It Ic auth_groups Ar "group1", ... ;
1110 Specifies the group memberships for Xauth in quoted group name strings.
1111 When defined, the authenticating user must be a member of at least one
1112 group for Xauth to succeed.
1113 .It Ic group_source (system | ldap) ;
1114 Specifies the source for group validataion of users through Xauth.
1116 means to use the Unix user database.
1117 This is the default.
1122 was built with libldap support and requires LDAP authentication.
1123 LDAP configuration is handled by statements in the
1126 .It Ic conf_source (local | radius | ldap) ;
1127 Specifies the source for IP addresses and netmask allocated through ISAKMP
1130 means to use the local IP pool defined by the
1135 This is the default.
1137 means to use a RADIUS server.
1140 was built with libradius support and requires RADIUS authentiation.
1141 RADIUS configuration is handled by
1144 means to use an LDAP server.
1147 was built with libldap support and requires LDAP authentication.
1148 LDAP configuration is handled by
1152 .It Ic accounting (none | system | radius | pam) ;
1153 Enables or disables accounting for Xauth logins and logouts.
1156 which disable accounting.
1159 enables system accounting through
1163 enables RADIUS accounting.
1166 was built with libradius support and requires RADIUS authentication.
1167 RADIUS configuration is handled by
1171 enables PAM accounting.
1174 was build with libpam support and requires PAM authentication.
1175 .It Ic pool_size Ar size
1176 Specify the size of the IP address pool, either local or allocated
1179 selects the local pool or the RADIUS configuration, but in both
1180 configurations, you cannot have more than
1182 users connected at the same time.
1184 .It Ic network4 Ar address ;
1185 .It Ic netmask4 Ar address ;
1186 The local IP pool base address and network mask from which dynamically
1187 allocated IPv4 addresses should be taken.
1192 or if the RADIUS server returned
1193 .Ar 255.255.255.254 .
1195 .Ar 0.0.0.0/0.0.0.0 .
1196 .It Ic dns4 Ar addresses ;
1197 A list of IPv4 addresses for DNS servers, separated by commas, or on multiple
1200 .It Ic nbns4 Ar addresses ;
1201 A list of IPv4 address for WINS servers.
1202 .It Ic split_network (include | local_lan) Ar network/mask, ...
1203 The network configuration to send, in cidr notation (e.g. 192.168.1.0/24).
1206 is specified, the tunnel should be only used to encrypt the indicated
1207 destinations ; otherwise, if
1209 is used, everything will pass through the tunnel but those destinations.
1210 .It Ic default_domain Ar domain ;
1211 The default DNS domain to send.
1212 .It Ic split_dns Ar "domain", ...
1213 The split dns configuration to send, in quoted domain name strings.
1214 This list can be used to describe a list of domain names for which
1215 a peer should query a modecfg assigned dns server.
1216 DNS queries for all other domains would be handled locally.
1217 (Cisco VPN client only).
1218 .It Ic banner Ar path ;
1219 The path of a file displayed on the client at connection time.
1222 .It Ic auth_throttle Ar delay ;
1223 On each failed Xauth authentication attempt, refuse new attempts for a set
1226 This is to avoid dictionary attacks on Xauth passwords.
1227 Default is one second.
1228 Set to zero to disable authentication delay.
1229 .It Ic pfs_group Ar group ;
1230 Sets the PFS group used in the client proposal (Cisco VPN client only).
1232 .It Ic save_passwd (on | off) ;
1233 Allow the client to save the Xauth password (Cisco VPN client only).
1237 .Ss Ldap configuration settings
1238 .Bl -tag -width Ds -compact
1239 .It Ic ldapcfg { Ar statements Ic }
1240 Defines the parameters that will be used to communicate with an ldap
1245 The following are valid statements:
1246 .Bl -tag -width Ds -compact
1247 .It Ic version (2 | 3) ;
1248 The ldap protocol version used to communicate with the server.
1251 .It Ic host Ar (hostname | address) ;
1252 The host name or ip address of the ldap server.
1255 .It Ic port Ar number;
1256 The port that the ldap server is configured to listen on.
1259 .It Ic base Ar distinguished name;
1260 The ldap search base.
1261 This option has no default value.
1262 .It Ic subtree (on | off) ;
1263 Use the subtree ldap search scope.
1264 Otherwise, use the one level search scope.
1267 .It Ic bind_dn Ar distinguised name;
1268 The user dn used to optionaly bind as before performing ldap search operations.
1269 If this option is not specified, anonymous binds are used.
1270 .It Ic bind_pw Ar string;
1271 The password used when binding as
1273 .It Ic attr_user Ar attribute name;
1274 The attribute used to specify a users name in an ldap directory.
1276 if a user dn is "cn=jdoe,dc=my,dc=net" then the attribute would be "cn".
1277 The default value is
1279 .It Ic attr_addr Ar attribute name;
1280 .It Ic attr_mask Ar attribute name;
1281 The attributes used to specify a users network address and subnet mask in an
1283 These values are forwarded during mode_cfg negotiation when
1284 the conf_source is set to ldap.
1285 The default values are
1288 .Ic racoon-netmask .
1289 .It Ic attr_group Ar attribute name;
1290 The attribute used to specify a group name in an ldap directory.
1292 if a group dn is "cn=users,dc=my,dc=net" then the attribute would be "cn".
1293 The default value is
1295 .It Ic attr_member Ar attribute name;
1296 The attribute used to specify group membership in an ldap directory.
1297 The default value is
1301 .Ss Special directives
1302 .Bl -tag -width Ds -compact
1303 .It Ic complex_bundle (on | off) ;
1304 defines the interpretation of proposal in the case of SA bundle.
1306 .Dq IP AH ESP IP payload
1308 .Dq AH tunnel and ESP tunnel .
1309 The interpretation is more common to other IKE implementations, however,
1310 it allows very limited set of combinations for proposals.
1311 With the option enabled, it will be proposed as
1312 .Dq AH transport and ESP tunnel .
1313 The default value is
1317 .Ss Pre-shared key File
1318 The pre-shared key file defines pairs of identifiers and corresponding
1319 shared secret keys which are used in the pre-shared key authentication
1321 The pair in each line is separated by some number of blanks and/or tab
1322 characters like in the
1325 Key can include blanks because everything after the first blanks
1326 is interpreted as the secret key.
1330 Keys which start with
1332 are interpreted as hexadecimal strings.
1333 Note that the file must be owned by the user ID running
1335 .Pq usually the privileged user ,
1336 and must not be accessible by others.
1339 The following shows how the remote directive should be configured.
1340 .Bd -literal -offset
1341 path pre_shared_key "/usr/local/v6/etc/psk.txt" ;
1344 exchange_mode aggressive,main,base;
1345 lifetime time 24 hour;
1347 encryption_algorithm 3des;
1348 hash_algorithm sha1;
1349 authentication_method pre_shared_key;
1357 lifetime time 12 hour ;
1358 encryption_algorithm 3des, blowfish 448, twofish, rijndael ;
1359 authentication_algorithm hmac_sha1, hmac_md5 ;
1360 compression_algorithm deflate ;
1364 If you are configuring plain RSA authentication, the remote directive
1365 should look like the following:
1366 .Bd -literal -offset
1367 path certificate "/usr/local/v6/etc" ;
1370 exchange_mode main,base ;
1371 lifetime time 12 hour ;
1372 certificate_type plain_rsa "/usr/local/v6/etc/myrsakey.priv";
1373 peers_certfile plain_rsa "/usr/local/v6/etc/yourrsakey.pub";
1375 encryption_algorithm aes ;
1376 hash_algorithm sha1 ;
1377 authentication_method rsasig ;
1383 The following is a sample for the pre-shared key file.
1384 .Bd -literal -offset
1385 10.160.94.3 mekmitasdigoat
1386 172.16.1.133 0x12345678
1387 194.100.55.1 whatcertificatereally
1388 3ffe:501:410:ffff:200:86ff:fe05:80fa mekmitasdigoat
1389 3ffe:501:410:ffff:210:4bff:fea2:8baa mekmitasdigoat
1390 foo@kame.net mekmitasdigoat
1402 configuration file first appeared in the
1404 Yokogawa IPsec implementation.
1407 Some statements may not be handled by
1411 Diffie-Hellman computation can take a very long time, and may cause
1412 unwanted timeouts, specifically when a large D-H group is used.
1414 .Sh SECURITY CONSIDERATIONS
1415 The use of IKE phase 1 aggressive mode is not recommended,
1417 .Li http://www.kb.cert.org/vuls/id/886601 .