1 .\" $NetBSD: racoon.conf.5,v 1.58 2009/09/01 12:22:09 tteras 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
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 unprivileged 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,
190 restart is required if you want path changes to be taken into account.
191 .Bl -tag -width Ds -compact
192 .It Ic path include Ar path ;
193 Specifies a path to include a file.
196 .It Ic path pre_shared_key Ar file ;
197 Specifies a file containing pre-shared key(s) for various ID(s).
199 .Sx Pre-shared key File .
200 .It Ic path certificate Ar path ;
202 will search this directory if a certificate or certificate request is received.
203 If you run with privilege separation,
205 will refuse to use a certificate stored outside of this directory.
206 .It Ic path backupsa Ar file ;
207 Specifies a file to which SA information negotiated by
208 racoon should be stored.
210 will install SA(s) from the file when started with the
213 The file is growing because
215 simply adds SAs to it.
216 You should maintain the file manually.
217 .It Ic path script Ar path ;
219 will search this directory for scripts hooks.
220 If you run with privilege separation,
222 will refuse to execute a script stored outside of this directory.
223 .It Ic path pidfile Ar file ;
224 Specifies file where to store PID of process.
227 it is treated as an absolute path.
228 Otherwise, it is treated as a relative
229 path to the VARRUN directory specified at compilation time.
235 .Bl -tag -width Ds -compact
236 .It Ic include Ar file
237 Specifies other configuration files to be included.
240 .Ss Timer Specification
241 .Bl -tag -width Ds -compact
242 .It Ic timer { Ar statements Ic }
243 This section specifies various timer values used by racoon.
245 .Bl -tag -width Ds -compact
246 .It Ic counter Ar number ;
247 The maximum number of retries to send.
249 .It Ic interval Ar number Ar timeunit ;
250 The interval to resend, in seconds.
251 The default time is 10 seconds.
252 .It Ic persend Ar number ;
253 The number of packets per send.
255 .It Ic phase1 Ar number Ar timeunit ;
256 The maximum time it should take to complete phase 1.
257 The default time is 15 seconds.
258 .It Ic phase2 Ar number Ar timeunit ;
259 The maximum time it should take to complete phase 2.
260 The default time is 10 seconds.
261 .It Ic natt_keepalive Ar number Ar timeunit ;
262 The interval between sending NAT-Traversal keep-alive packets.
263 The default time is 20 seconds.
264 Set to 0s to disable keep-alive packets.
268 .Ss Listening Port Specification
269 .Bl -tag -width Ds -compact
270 .It Ic listen { Ar statements Ic }
273 directive is specified,
275 will listen on all available interface addresses.
276 The following is the list of valid statements:
278 .Bl -tag -width Ds -compact
279 .\" How do I express bold brackets; `[' and `]' .
280 .\" Answer: For bold brackets, do "Ic \&[ foo \&]".
281 .\" Is the "Bq Ic [ Ar port ] ;" buggy ?
282 .It Ic isakmp Ar address Bq Bq Ar port ;
283 If this is specified,
285 will only listen on the defined
287 The default port is 500, which is specified by IANA.
288 You can provide more than one address definition.
289 .It Ic isakmp_natt Ar address Bq Ar port ;
292 but also sets the socket options to accept UDP-encapsulated ESP traffic for
294 If you plan to use NAT-T, you should provide at least one address
295 with port 4500, which is specified by IANA.
297 .It Ic strict_address ;
298 Requires that all addresses for ISAKMP be bound.
299 This statement will be ignored if you do not specify address definitions.
301 When running in privilege separation mode, you need to restart
303 to have changes to the
305 section taken into account.
309 section can also be used to specify the admin socket mode and ownership
310 if racoon was built with support for admin port.
311 .Bl -tag -width Ds -compact
312 .It Ic adminsock Ar path Op Ar owner\ group\ mode ;
318 values specify the socket path, owner, and group.
321 .Pa /var/racoon/racoon.sock ,
324 is the access mode in octal.
326 .It Ic adminsock disabled ;
327 This directive tells racoon to not listen on the admin socket.
331 .Ss Miscellaneous Global Parameters
332 .Bl -tag -width Ds -compact
333 .It Ic gss_id_enc Ar enctype ;
336 used ISO-Latin-1 as the encoding of the GSS-API identifier attribute.
337 For interoperability with Microsoft Windows' GSS-API authentication
338 scheme, the default encoding has been changed to UTF-16LE.
343 to be configured to use the old encoding for compatibility with existing
346 The following are valid values for
349 .Bl -tag -width Ds -compact
351 Use UTF-16LE to encode the GSS-API identifier attribute.
352 This is the default encoding.
353 This encoding is compatible with Microsoft Windows.
355 Use ISO-Latin-1 to encode the GSS-API identifier attribute.
356 This is the encoding used by older versions of
362 .Bl -tag -width Ds -compact
363 .It Ic pfkey_buffer Ar kBytes
364 Specifies the socket send/receive buffer size in kilobytes.
365 Numerous kernel PF_KEY implementations have problems with dumping
366 SAD/SDP with large amount of entries (this happens when 100s to
367 1000s of tunnels are configured).
369 The default value of 0 leaves everything at the OS-specific default value.
370 If the default buffer size is greater than what is specified here racoon
371 will not decrease it.
373 This problem is known to be fixed in Linux 2.6.25 and later.
376 .Ss Remote Nodes Specifications
377 .Bl -tag -width Ds -compact
378 .It Ic remote Ar name Bo Ic inherit Ar parent_name Bc Ic { Ar statements Ic }
379 Specifies the IKE phase 1 parameters for each remote node.
381 If connection is initiated using racoonctl, a unique match using the
382 remote IP must be found or the remote block name has to be given.
383 For received acquires (kernel notices traffic requiring a new SA) the
384 remote IP and remoteid from matching sainfo block are used to decide
386 If no uniquely matching remoteblock is found using
387 these criteria, no connection attempt is done.
389 When acting as responder, racoon picks the first proposal that has one
390 or more acceptable remote configurations.
391 When determining if a remote
392 specification is matching the following information is checked:
393 .Bl -bullet -width Ds -compact
395 The remote IP is checked against
398 ISAKMP exchange type is checked against
401 ISAKMP SA attributes must match a
405 The remote identity is matched against
408 .Ic verify_identifier
411 If a certificate request was received, it must match the issuer of
412 .Ic "certificate_type x509"
414 If certificate request without issuer name was sent, the
416 parameter specifies whether or not remote block matches.
419 Similarly, NAT-T is enabled if any of the initial remote configuration
420 candidates allow NAT-T.
423 .Ic inherit Ar parent
430 that have all values predefined to those of a given
432 In these sections it is enough to redefine only the changed parameters.
434 The following are valid statements.
436 .Bl -tag -width Ds -compact
438 .It Ic remote_address Ar address ;
439 Defines the IP address of the peer.
441 .It Ic exchange_mode ( main | aggressive | base ) ;
442 Defines the exchange mode for phase 1 when racoon is the initiator.
443 It also means the acceptable exchange mode when racoon is the responder.
444 More than one mode can be specified by separating them with a comma.
445 All of the modes are acceptable.
446 The first exchange mode is what racoon uses when it is the initiator.
448 .It Ic doi Ic ipsec_doi ;
449 Means to use IPsec DOI as specified in RFC 2407.
450 You can omit this statement.
452 .It Ic situation Ic identity_only ;
453 Means to use SIT_IDENTITY_ONLY as specified in RFC 2407.
454 You can omit this statement.
456 .It Ic my_identifier Bo Ar qualifier Bc Ar idtype ... ;
457 Specifies the identifier sent to the remote host
458 and the type to use in the phase 1 negotiation.
459 .Ic address, fqdn , user_fqdn , keyid ,
466 is currently only used for
472 The possible values are :
473 .Bl -tag -width Ds -compact
474 .It Ic my_identifier Ic address Bq Ar address ;
475 The type is the IP address.
476 This is the default type if you do not specify an identifier to use.
477 .It Ic my_identifier Ic user_fqdn Ar string ;
478 The type is a USER_FQDN (user fully-qualified domain name).
479 .It Ic my_identifier Ic fqdn Ar string ;
480 The type is a FQDN (fully-qualified domain name).
481 .It Ic my_identifier Ic keyid Bo Ic file Bc Ar file ;
482 The type is a KEY_ID, read from the file.
483 .It Ic my_identifier Ic keyid Ic tag Ar string ;
484 The type is a KEY_ID, specified in the quoted string.
485 .It Ic my_identifier Ic asn1dn Bq Ar string ;
486 The type is an ASN.1 distinguished name.
491 will get the DN from the Subject field in the certificate.
494 .It Ic xauth_login Bq Ar string ;
495 Specifies the login to use in client-side Hybrid authentication.
496 It is available only if
498 has been built with this option.
499 The associated password is looked up in the pre-shared key files,
504 .It Ic peers_identifier Ar idtype ... ;
505 Specifies the peer's identifier to be received.
506 If it is not defined then
508 will not verify the peer's identifier in ID payload transmitted from the peer.
509 If it is defined, the behavior of the verification depends on the flag of
510 .Ic verify_identifier .
515 except that the individual component values of an
517 identifier may specified as
519 to match any value (e.g. "C=XX, O=MyOrg, OU=*, CN=Mine").
521 specification should correspond to RFC 2253; in particular, commas and certain
523 .Ic ,=+\*[Lt]\*[Gt]#;
524 - may be included in a name by preceeding them with a backslash "\e", and
525 arbitrary characters may be inserted in a name with the "\enn" escape, where
526 nn is the hex representation of the ascii value of the desired character.
527 Alternative acceptable peer identifiers may be specified by repeating the
531 .It Ic verify_identifier (on | off) ;
532 If you want to verify the peer's identifier,
534 In this case, if the value defined by
536 is not the same as the peer's identifier in the ID payload,
537 the negotiation will fail.
540 .It Ic certificate_type Ar certspec ;
541 Specifies a certificate specification.
543 is one of followings:
544 .Bl -tag -width Ds -compact
545 .It Ic x509 Ar certfile Ar privkeyfile ;
547 means a file name of a certificate.
549 means a file name of a secret key.
551 .Bl -tag -width Ds -compact
552 .It Ic plain_rsa Ar privkeyfile ;
554 means a file name of a private key generated by
557 for RSA authentication.
559 .It Ic ca_type Ar cacertspec ;
560 Specifies a root certificate authority specification.
562 is one of followings:
563 .Bl -tag -width Ds -compact
564 .It Ic x509 Ar cacertfile ;
566 means a file name of the root certificate authority.
568 .Pa /etc/openssl/cert.pem
571 .It Ic mode_cfg (on | off) ;
572 Gather network information through ISAKMP mode configuration.
575 .It Ic weak_phase1_check (on | off) ;
576 Tells racoon to act on unencrypted deletion messages during phase 1.
577 This is a small security risk, so the default is off, meaning that
578 racoon will keep on trying to establish a connection even if the
579 user credentials are wrong, for instance.
581 .It Ic peers_certfile ( dnssec | Ar certfile | Ic plain_rsa Ar pubkeyfile ) ;
586 will ignore the CERT payload from the peer,
587 and try to get the peer's certificate from DNS instead.
592 will ignore the CERT payload from the peer,
593 and will use this certificate as the peer's certificate.
600 to be the peer's public key that was generated by
603 .It Ic script Ar script Ic phase1_up
604 .It Ic script Ar script Ic phase1_down
605 Shell scripts that get executed when a phase 1 SA goes up or down.
606 Both scripts get either
610 as first argument, and the following
611 variables are set in their environment:
612 .Bl -tag -width Ds -compact
614 The local address of the phase 1 SA.
616 The local port used for IKE for the phase 1 SA.
618 The remote address of the phase 1 SA.
620 The remote port used for IKE for the phase 1 SA.
622 The remote identity received in IKE for the phase 1 SA.
624 The following variables are only set if
627 .Bl -tag -width Ds -compact
629 An IPv4 internal address obtained by ISAKMP mode config.
630 .It INTERNAL_NETMASK4
631 An IPv4 internal netmask obtained by ISAKMP mode config.
633 An IPv4 internal netmask obtained by ISAKMP mode config, in CIDR notation.
635 The first internal DNS server IPv4 address obtained by ISAKMP mode config.
636 .It INTERNAL_DNS4_LIST
637 A list of internal DNS servers IPv4 address obtained by ISAKMP mode config,
640 The first internal WINS server IPv4 address obtained by ISAKMP mode config.
641 .It INTERNAL_WINS4_LIST
642 A list of internal WINS servers IPv4 address obtained by ISAKMP mode config,
645 The space separated list of IPv4 addresses and masks (address slash mask)
646 that define the networks to be encrypted (as opposed to the default where
647 all the traffic should be encrypted) ; obtained by ISAKMP mode config ;
648 SPLIT_INCLUDE and SPLIT_LOCAL are mutually exclusive.
650 The space separated list of IPv4 addresses and masks (address slash mask)
651 that define the networks to be considered local, and thus excluded from the
652 tunnels ; obtained by ISAKMP mode config.
653 .It SPLIT_INCLUDE_CIDR
654 Same as SPLIT_INCLUDE, with netmasks in CIDR notation.
656 Same as SPLIT_LOCAL, with netmasks in CIDR notation.
658 The DNS default domain name obtained by ISAKMP mode config.
662 .It Ic send_cert (on | off) ;
663 If you do not want to send a certificate, set this to off.
666 .It Ic send_cr (on | off) ;
667 If you do not want to send a certificate request, set this to off.
670 .It Ic match_empty_cr (on | off) ;
671 Specifies whether this remote block is a valid match when a non-specific
672 certificate request is received.
675 .It Ic verify_cert (on | off) ;
676 By default, the identifier sent by the remote host (as specified in its
678 statement) is compared with the credentials in the certificate
679 used to authenticate the remote host as follows:
680 .Bl -tag -width Ds -compact
682 The entire certificate subject name is compared with the identifier,
683 e.g. "C=XX, O=YY, ...".
684 .It Type Ic address, fqdn, or user_fqdn :
685 The certificate's subjectAltName is compared with the identifier.
687 If the two do not match the negotiation will fail.
688 If you do not want to verify the identifier using the peer's certificate,
691 .It Ic lifetime time Ar number Ar timeunit ;
692 Define a lifetime of a certain time
693 which will be proposed in the phase 1 negotiations.
694 Any proposal will be accepted, and the attribute(s) will not be proposed to
695 the peer if you do not specify it (them).
696 They can be individually specified in each proposal.
698 .It Ic ike_frag (on | off | force) ;
699 Enable receiver-side IKE fragmentation if
701 has been built with this feature.
702 If set to on, racoon will advertise
703 itself as being capable of receiving packets split by IKE fragmentation.
704 This extension is there to work around broken firewalls that do not
705 work with fragmented UDP packets.
706 IKE fragmentation is always enabled on the sender-side, and it is
707 used if the peer advertises itself as IKE fragmentation capable.
708 By selecting force, IKE Fragmentation will
709 be used when racoon is acting as the initiator even before the remote
710 peer has advertised itself as IKE fragmentation capable.
712 .It Ic esp_frag Ar fraglen ;
713 This option is only relevant if you use NAT traversal in tunnel mode.
714 Its purpose is to work around broken DSL routers that reject UDP
715 fragments, by fragmenting the IP packets before ESP encapsulation.
716 The result is ESP over UDP of fragmented packets instead of fragmented
717 ESP over UDP packets (i.e., IP:UDP:ESP:frag(IP) instead of
718 frag(IP:UDP:ESP:IP)).
720 is the maximum size of the fragments.
721 552 should work anywhere,
724 is, the better the performance.
726 Note that because PMTU discovery is broken on many sites, you will
727 have to use MSS clamping if you want TCP to work correctly.
729 .It Ic initial_contact (on | off) ;
730 Enable this to send an INITIAL-CONTACT message.
733 This message is useful only when the responder implementation chooses an
734 old SA when there are multiple SAs with different established time and the
736 If racoon did not send the message,
737 the responder would use an old SA even when a new SA was established.
738 For systems that use a KAME derived IPSEC stack, the
740 variable net.key.preferred_oldsa can be used to control this preference.
741 When the value is zero, the stack always uses a new SA.
743 .It Ic passive (on | off) ;
744 If you do not want to initiate the negotiation, set this to on.
747 It is useful for a server.
749 .It Ic proposal_check Ar level ;
750 Specifies the action of lifetime length, key length, and PFS of the phase 2
751 selection on the responder side, and the action of lifetime check in
758 .Bl -tag -width Ds -compact
760 The responder will obey the initiator anytime.
762 If the responder's lifetime length is longer than the initiator's or
763 the responder's key length is shorter than the initiator's,
764 the responder will use the initiator's value.
765 Otherwise, the proposal will be rejected.
766 If PFS is not required by the responder, the responder will obey the proposal.
767 If PFS is required by both sides and the responder's group is not equal to
768 the initiator's, then the responder will reject the proposal.
770 If the responder's lifetime length is longer than the initiator's or
771 the responder's key length is shorter than the initiator's,
772 the responder will use the initiator's value.
773 If the responder's lifetime length is shorter than the initiator's,
774 the responder uses its own length AND sends a RESPONDER-LIFETIME notify
775 message to an initiator in the case of lifetime (phase 2 only).
776 For PFS, this directive behaves the same as
779 If the initiator's lifetime or key length is not equal to the responder's,
780 the responder will reject the proposal.
781 If PFS is required by both sides and the responder's group is not equal to
782 the initiator's, then the responder will reject the proposal.
785 .It Ic support_proxy (on | off) ;
786 If this value is set to on, then both values of ID payloads in the
787 phase 2 exchange are always used as the addresses of end-point of
791 .It Ic generate_policy (on | off | require | unique) ;
792 This directive is for the responder.
793 Therefore you should set
797 only becomes a responder.
798 If the responder does not have any policy in SPD during phase 2
799 negotiation, and the directive is set to on, then
801 will choose the first proposal in the
802 SA payload from the initiator, and generate policy entries from the proposal.
803 It is useful to negotiate with clients whose IP address is allocated
805 Note that an inappropriate policy might be installed into the responder's SPD
807 so other communications might fail if such policies are installed
808 due to a policy mismatch between the initiator and the responder.
812 values mean the same thing (generate a require policy).
814 tells racoon to set up unique policies, with a monotoning increasing
815 reqid number (between 1 and IPSEC_MANUAL_REQID_MAX).
816 This directive is ignored in the initiator case.
821 .It Ic nat_traversal (on | off | force) ;
822 This directive enables use of the NAT-Traversal IPsec extension
824 NAT-T allows one or both peers to reside behind a NAT gateway (i.e.,
825 doing address- or port-translation).
826 If a NAT gateway is detected during the phase 1 handshake, racoon will
827 attempt to negotiate the use of NAT-T with the remote peer.
828 If the negotiation succeeds, all ESP and AH packets for the given connection
829 will be encapsulated into UDP datagrams (port 4500, by default).
831 .Bl -tag -width Ds -compact
833 NAT-T is used when a NAT gateway is detected between the peers.
835 NAT-T is not proposed/accepted.
838 NAT-T is used regardless of whether a NAT gateway is detected between the
841 Please note that NAT-T support is a compile-time option.
842 Although it is enabled in the source distribution by default, it
843 may not be available in your particular build.
844 In that case you will get a
845 warning when using any NAT-T related config options.
847 .It Ic dpd_delay Ar delay ;
848 This option activates the DPD and sets the time (in seconds) allowed
849 between 2 proof of liveliness requests.
852 which disables DPD monitoring, but still negotiates DPD support.
854 .It Ic dpd_retry Ar delay ;
857 is set, this sets the delay (in seconds) to wait for a proof of
858 liveliness before considering it as failed and send another request.
862 .It Ic dpd_maxfail Ar number ;
865 is set, this sets the maximum number of liveliness proofs to request
866 (without reply) before considering the peer is dead.
870 .It Ic rekey (on | off | force) ;
871 Enable automatic renegotiation of expired phase1 when there are non-dying
874 .Bl -tag -width Ds -compact
876 Rekeying is done unconditionally.
878 Rekeying is done only if DPD monitoring is active.
881 No automatic rekeying.
882 Do note that turning off automatic rekeying will
883 result in inaccurate DPD monitoring.
886 .It Ic nonce_size Ar number ;
887 define the byte size of nonce value.
888 Racoon can send any value although
889 RFC2409 specifies that the value MUST be between 8 and 256 bytes.
890 The default size is 16 bytes.
892 .It Ic ph1id Ar number ;
893 An optional number to identify the remote proposal and to link it
894 only with sainfos who have the same number.
897 .It Ic proposal { Ar sub-substatements Ic }
898 .Bl -tag -width Ds -compact
900 .It Ic encryption_algorithm Ar algorithm ;
901 Specifies the encryption algorithm used for the phase 1 negotiation.
902 This directive must be defined.
905 .Ic des, 3des, blowfish, cast128, aes, camellia
908 For other transforms, this statement should not be used.
910 .It Ic hash_algorithm Ar algorithm ;
911 Defines the hash algorithm used for the phase 1 negotiation.
912 This directive must be defined.
915 .Ic md5, sha1, sha256, sha384, sha512
918 .It Ic authentication_method Ar type ;
919 Defines the authentication method used for the phase 1 negotiation.
920 This directive must be defined.
923 .Ic pre_shared_key , rsasig
924 (for plain RSA authentication),
925 .Ic gssapi_krb , hybrid_rsa_server ,
926 .Ic hybrid_rsa_client , xauth_rsa_server , xauth_rsa_client , xauth_psk_server
928 .Ic xauth_psk_client .
930 .It Ic dh_group Ar group ;
931 Defines the group used for the Diffie-Hellman exponentiations.
932 This directive must be defined.
935 .Ic modp768 , modp1024 , modp1536 ,
936 .Ic modp2048 , modp3072 , modp4096 ,
937 .Ic modp6144 , modp8192 .
938 Or you can define 1, 2, 5, 14, 15, 16, 17, or 18 as the DH group number.
939 When you want to use aggressive mode,
940 you must define the same DH group in each proposal.
941 .It Ic lifetime time Ar number Ar timeunit ;
942 Defines the lifetime of the phase 1 SA proposal.
943 Refer to the description of the
945 directive defined in the
948 .It Ic gss_id Ar string ;
949 Defines the GSS-API endpoint name, to be included as an attribute in the SA,
952 authentication method is used.
953 If this is not defined, the default value of
955 is used, where hostname is the value returned by the
961 .It Ic remote Po Ar address | Ic anonymous Pc Bo Bo Ar port Bc Bc \
962 Bo Ic inherit Ar parent Bc Ic { Ar statements Ic }
963 Deprecated format of specifying a remote block.
964 This will be removed in future.
965 It is a remnant from time when remote block was decided
966 solely based on the peers IP address.
968 This is equivalent to:
970 remote "address" [inherit "parent-address"] {
971 remote_address address;
976 .Ss Sainfo Specifications
977 .Bl -tag -width Ds -compact
978 .It Ic sainfo Po Ar local_id | Ic anonymous Pc \
979 Po Ar remote_id | Ic clientaddr | Ic anonymous Pc \
980 Bo Ic from Ar idtype Bo Ar string Bc Bc Bo Ic group Ar string Bc \
981 Ic { Ar statements Ic }
982 Defines the parameters of the IKE phase 2 (IPsec-SA establishment).
988 strings are constructed like:
990 .Ic address Ar address
997 .Ic subnet Ar address
1002 An id string should be expressed to match the exact value of an ID payload.
1003 This is not like a filter rule.
1004 For example, if you define 3ffe:501:4819::/48 as
1006 3ffe:501:4819:1000:/64 will not match.
1007 In the case of a longest prefix (selecting a single host),
1009 instructs to send ID type of ADDRESS while
1011 instructs to send ID type of SUBNET.
1012 Otherwise, these instructions are identical.
1016 keyword can be used to match any id.
1019 keyword can be used to match a remote id that is equal to either the peer
1020 ip address or the mode_cfg ip address (if assigned).
1022 to restrict policy generation when racoon is acting as a client gateway
1023 for peers with dynamic ip addresses.
1027 keyword allows an sainfo to only match for peers that use a specific phase1
1028 id value during authentication.
1031 keyword allows an XAuth group membership check to be performed
1032 for this sainfo section.
1033 When the mode_cfg auth source is set to
1037 the XAuth user is verified to be a member of the specified group
1038 before allowing a matching SA to be negotiated.
1040 .Bl -tag -width Ds -compact
1042 .It Ic pfs_group Ar group ;
1043 define the group of Diffie-Hellman exponentiations.
1044 If you do not require PFS then you can omit this directive.
1045 Any proposal will be accepted if you do not specify one.
1047 is one of following:
1048 .Ic modp768 , modp1024 , modp1536 ,
1049 .Ic modp2048 , modp3072 , modp4096 ,
1050 .Ic modp6144 , modp8192 .
1051 Or you can define 1, 2, 5, 14, 15, 16, 17, or 18 as the DH group number.
1053 .It Ic lifetime time Ar number Ar timeunit ;
1054 define how long an IPsec-SA will be used, in timeunits.
1055 Any proposal will be accepted, and no attribute(s) will be proposed to
1056 the peer if you do not specify it(them).
1061 .It Ic remoteid Ar number ;
1062 Sainfos will only be used if their remoteid matches the ph1id of the
1063 remote section used for phase 1.
1064 Defaults to 0, which is also the default for ph1id.
1069 does not have a list of security protocols to be negotiated.
1070 The list of security protocols are passed by SPD in the kernel.
1071 Therefore you have to define all of the potential algorithms
1072 in the phase 2 proposals even if there are algorithms which will not be used.
1073 These algorithms are define by using the following three directives,
1074 with a single comma as the separator.
1075 For algorithms that can take variable-length keys, algorithm names
1076 can be followed by a key length, like
1077 .Dq Li blowfish 448 .
1079 will compute the actual phase 2 proposals by computing
1080 the permutation of the specified algorithms,
1081 and then combining them with the security protocol specified by the SPD.
1083 .Ic des , 3des , hmac_md5 ,
1086 are specified as algorithms, we have four combinations for use with ESP,
1088 Then, based on the SPD settings,
1090 will construct the actual proposals.
1091 If the SPD entry asks for ESP only, there will be 4 proposals.
1092 If it asks for both AH and ESP, there will be 8 proposals.
1093 Note that the kernel may not support the algorithm you have specified.
1095 .Bl -tag -width Ds -compact
1096 .It Ic encryption_algorithm Ar algorithms ;
1097 .Ic des , 3des , des_iv64 , des_iv32 ,
1098 .Ic rc5 , rc4 , idea , 3idea ,
1099 .Ic cast128 , blowfish , null_enc ,
1100 .Ic twofish , rijndael , aes , camellia
1103 .It Ic authentication_algorithm Ar algorithms ;
1104 .Ic des , 3des , des_iv64 , des_iv32 ,
1105 .Ic hmac_md5 , hmac_sha1 , hmac_sha256, hmac_sha384, hmac_sha512, non_auth
1106 .Pq used with ESP authentication and AH
1108 .It Ic compression_algorithm Ar algorithms ;
1110 .Pq used with IPComp
1115 .Bl -tag -width Ds -compact
1116 .It Ic log Ar level ;
1117 Defines the logging level.
1119 is one of following:
1120 .Ic error , warning , notify , info , debug
1125 If you set the logging level too high on slower machines,
1126 IKE negotiation can fail due to timing constraint changes.
1129 .Ss Specifies the way to pad
1130 .Bl -tag -width Ds -compact
1131 .It Ic padding { Ar statements Ic }
1132 specifies the padding format.
1133 The following are valid statements:
1134 .Bl -tag -width Ds -compact
1135 .It Ic randomize (on | off) ;
1136 Enables the use of a randomized value for padding.
1138 .It Ic randomize_length (on | off) ;
1139 The pad length will be random.
1141 .It Ic maximum_length Ar number ;
1142 Defines a maximum padding length.
1144 .Ic randomize_length
1145 is off, this is ignored.
1146 The default is 20 bytes.
1147 .It Ic exclusive_tail (on | off) ;
1148 Means to put the number of pad bytes minus one into the last part
1151 .It Ic strict_check (on | off) ;
1152 Means to constrain the peer to set the number of pad bytes.
1156 .Ss ISAKMP mode configuration settings
1157 .Bl -tag -width Ds -compact
1158 .It Ic mode_cfg { Ar statements Ic }
1159 Defines the information to return for remote hosts' ISAKMP mode config
1161 Also defines the authentication source for remote peers
1162 authenticating through Xauth.
1164 The following are valid statements:
1165 .Bl -tag -width Ds -compact
1166 .It Ic auth_source (system | radius | pam | ldap) ;
1167 Specifies the source for authentication of users through Xauth.
1169 means to use the Unix user database.
1170 This is the default.
1172 means to use a RADIUS server.
1175 was built with libradius support.
1176 Radius configuration is handled by statements in the
1183 was built with libpam support.
1188 was built with libldap support.
1189 LDAP configuration is handled by statements in the
1192 .It Ic auth_groups Ar "group1", ... ;
1193 Specifies the group memberships for Xauth in quoted group name strings.
1194 When defined, the authenticating user must be a member of at least one
1195 group for Xauth to succeed.
1196 .It Ic group_source (system | ldap) ;
1197 Specifies the source for group validation of users through Xauth.
1199 means to use the Unix user database.
1200 This is the default.
1205 was built with libldap support and requires LDAP authentication.
1206 LDAP configuration is handled by statements in the
1209 .It Ic conf_source (local | radius | ldap) ;
1210 Specifies the source for IP addresses and netmask allocated through ISAKMP
1213 means to use the local IP pool defined by the
1218 This is the default.
1220 means to use a RADIUS server.
1223 was built with libradius support and requires RADIUS authentication.
1224 RADIUS configuration is handled by statements in the
1228 means to use an LDAP server.
1231 was built with libldap support and requires LDAP authentication.
1232 LDAP configuration is handled by
1236 .It Ic accounting (none | system | radius | pam) ;
1237 Enables or disables accounting for Xauth logins and logouts.
1240 which disable accounting.
1243 enables system accounting through
1247 enables RADIUS accounting.
1250 was built with libradius support and requires RADIUS authentication.
1251 RADIUS configuration is handled by statements in the
1256 enables PAM accounting.
1259 was build with libpam support and requires PAM authentication.
1260 .It Ic pool_size Ar size
1261 Specify the size of the IP address pool, either local or allocated
1264 selects the local pool or the RADIUS configuration, but in both
1265 configurations, you cannot have more than
1267 users connected at the same time.
1269 .It Ic network4 Ar address ;
1270 .It Ic netmask4 Ar address ;
1271 The local IP pool base address and network mask from which dynamically
1272 allocated IPv4 addresses should be taken.
1277 or if the RADIUS server returned
1278 .Ar 255.255.255.254 .
1280 .Ar 0.0.0.0/0.0.0.0 .
1281 .It Ic dns4 Ar addresses ;
1282 A list of IPv4 addresses for DNS servers, separated by commas, or on multiple
1285 .It Ic wins4 Ar addresses ;
1286 A list of IPv4 address for WINS servers.
1289 can also be used as an alias for
1291 .It Ic split_network (include | local_lan) Ar network/mask, ...
1292 The network configuration to send, in CIDR notation (e.g. 192.168.1.0/24).
1295 is specified, the tunnel should be only used to encrypt the indicated
1296 destinations ; otherwise, if
1298 is used, everything will pass through the tunnel but those destinations.
1299 .It Ic default_domain Ar domain ;
1300 The default DNS domain to send.
1301 .It Ic split_dns Ar "domain", ...
1302 The split dns configuration to send, in quoted domain name strings.
1303 This list can be used to describe a list of domain names for which
1304 a peer should query a modecfg assigned dns server.
1305 DNS queries for all other domains would be handled locally.
1306 (Cisco VPN client only).
1307 .It Ic banner Ar path ;
1308 The path of a file displayed on the client at connection time.
1311 .It Ic auth_throttle Ar delay ;
1312 On each failed Xauth authentication attempt, refuse new attempts for a set
1315 This is to avoid dictionary attacks on Xauth passwords.
1316 Default is one second.
1317 Set to zero to disable authentication delay.
1318 .It Ic pfs_group Ar group ;
1319 Sets the PFS group used in the client proposal (Cisco VPN client only).
1321 .It Ic save_passwd (on | off) ;
1322 Allow the client to save the Xauth password (Cisco VPN client only).
1326 .Ss Ldap configuration settings
1327 .Bl -tag -width Ds -compact
1328 .It Ic ldapcfg { Ar statements Ic }
1329 Defines the parameters that will be used to communicate with an ldap
1334 The following are valid statements:
1335 .Bl -tag -width Ds -compact
1336 .It Ic version (2 | 3) ;
1337 The ldap protocol version used to communicate with the server.
1340 .It Ic host Ar (hostname | address) ;
1341 The host name or ip address of the ldap server.
1344 .It Ic port Ar number ;
1345 The port that the ldap server is configured to listen on.
1348 .It Ic base Ar distinguished name ;
1349 The ldap search base.
1350 This option has no default value.
1351 .It Ic subtree (on | off) ;
1352 Use the subtree ldap search scope.
1353 Otherwise, use the one level search scope.
1356 .It Ic bind_dn Ar distinguished name ;
1357 The user dn used to optionally bind as before performing ldap search operations.
1358 If this option is not specified, anonymous binds are used.
1359 .It Ic bind_pw Ar string ;
1360 The password used when binding as
1362 .It Ic attr_user Ar attribute name ;
1363 The attribute used to specify a users name in an ldap directory.
1365 if a user dn is "cn=jdoe,dc=my,dc=net" then the attribute would be "cn".
1366 The default value is
1368 .It Ic attr_addr Ar attribute name ;
1369 .It Ic attr_mask Ar attribute name ;
1370 The attributes used to specify a users network address and subnet mask in an
1372 These values are forwarded during mode_cfg negotiation when
1373 the conf_source is set to ldap.
1374 The default values are
1377 .Ic racoon-netmask .
1378 .It Ic attr_group Ar attribute name ;
1379 The attribute used to specify a group name in an ldap directory.
1381 if a group dn is "cn=users,dc=my,dc=net" then the attribute would be "cn".
1382 The default value is
1384 .It Ic attr_member Ar attribute name ;
1385 The attribute used to specify group membership in an ldap directory.
1386 The default value is
1390 .Ss Radius configuration settings
1391 .Bl -tag -width Ds -compact
1392 .It Ic radiuscfg { Ar statements Ic }
1393 Defines the parameters that will be used to communicate with radius
1397 If radius is selected as the xauth authentication or accounting
1398 source and no servers are defined in this section, settings from
1401 configuration file will be used instead.
1403 The following are valid statements:
1404 .Bl -tag -width Ds -compact
1405 .It Ic auth Ar (hostname | address) [port] sharedsecret ;
1406 The host name or ip address, optional port value and shared secret value
1407 of a radius authentication server.
1408 Up to 5 radius authentication servers
1409 may be specified using multiple lines.
1410 .It Ic acct Ar (hostname | address) [port] sharedsecret ;
1411 The host name or ip address, optional port value and shared secret value
1412 of a radius accounting server.
1413 Up to 5 radius accounting servers may be
1414 specified using multiple lines.
1415 .It Ic timeout Ar seconds ;
1416 The timeout for receiving replies from radius servers.
1419 .It Ic retries Ar count ;
1420 The maximum number of repeated requests to make before giving up
1426 .Ss Special directives
1427 .Bl -tag -width Ds -compact
1428 .It Ic complex_bundle (on | off) ;
1429 defines the interpretation of proposal in the case of SA bundle.
1431 .Dq IP AH ESP IP payload
1433 .Dq AH tunnel and ESP tunnel .
1434 The interpretation is more common to other IKE implementations, however,
1435 it allows very limited set of combinations for proposals.
1436 With the option enabled, it will be proposed as
1437 .Dq AH transport and ESP tunnel .
1438 The default value is
1442 .Ss Pre-shared key File
1443 The pre-shared key file defines pairs of identifiers and corresponding
1444 shared secret keys which are used in the pre-shared key authentication
1446 The pair in each line is separated by some number of blanks and/or tab
1447 characters like in the
1450 Key can include blanks because everything after the first blanks
1451 is interpreted as the secret key.
1455 Keys which start with
1457 are interpreted as hexadecimal strings.
1458 Note that the file must be owned by the user ID running
1460 .Pq usually the privileged user ,
1461 and must not be accessible by others.
1464 The following shows how the remote directive should be configured.
1465 .Bd -literal -offset
1466 path pre_shared_key "/usr/local/v6/etc/psk.txt" ;
1469 exchange_mode aggressive,main,base;
1470 lifetime time 24 hour;
1472 encryption_algorithm 3des;
1473 hash_algorithm sha1;
1474 authentication_method pre_shared_key;
1482 lifetime time 12 hour ;
1483 encryption_algorithm 3des, blowfish 448, twofish, rijndael ;
1484 authentication_algorithm hmac_sha1, hmac_md5 ;
1485 compression_algorithm deflate ;
1489 If you are configuring plain RSA authentication, the remote directive
1490 should look like the following:
1491 .Bd -literal -offset
1492 path certificate "/usr/local/v6/etc" ;
1495 exchange_mode main,base ;
1496 lifetime time 12 hour ;
1497 certificate_type plain_rsa "/usr/local/v6/etc/myrsakey.priv";
1498 peers_certfile plain_rsa "/usr/local/v6/etc/yourrsakey.pub";
1500 encryption_algorithm aes ;
1501 hash_algorithm sha1 ;
1502 authentication_method rsasig ;
1508 The following is a sample for the pre-shared key file.
1509 .Bd -literal -offset
1510 10.160.94.3 mekmitasdigoat
1511 172.16.1.133 0x12345678
1512 194.100.55.1 whatcertificatereally
1513 3ffe:501:410:ffff:200:86ff:fe05:80fa mekmitasdigoat
1514 3ffe:501:410:ffff:210:4bff:fea2:8baa mekmitasdigoat
1515 foo@kame.net mekmitasdigoat
1527 configuration file first appeared in the
1529 Yokogawa IPsec implementation.
1532 Some statements may not be handled by
1536 Diffie-Hellman computation can take a very long time, and may cause
1537 unwanted timeouts, specifically when a large D-H group is used.
1539 .Sh SECURITY CONSIDERATIONS
1540 The use of IKE phase 1 aggressive mode is not recommended,
1542 .Li http://www.kb.cert.org/vuls/id/886601 .