6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man1m / ipsecconf.1m
blob5996a270935f7c9b8d4454e411c354e67f7dc8a8
1 '\" te
2 .\" Copyright (C) 2008, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
4 .\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
5 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH IPSECCONF 1M "Sep 28, 2009"
7 .SH NAME
8 ipsecconf \- configure system wide IPsec policy
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/ipsecconf\fR
13 .fi
15 .LP
16 .nf
17 \fB/usr/sbin/ipsecconf\fR \fB-a\fR \fIfile\fR [\fB-q\fR]
18 .fi
20 .LP
21 .nf
22 \fB/usr/sbin/ipsecconf\fR \fB-c\fR \fIfile\fR
23 .fi
25 .LP
26 .nf
27 \fB/usr/sbin/ipsecconf\fR  \fB-d\fR [\fB-i\fR \fItunnel-name\fR] {\fIindex\fR, \fItunnel-name\fR, \fIindex\fR}
28 .fi
30 .LP
31 .nf
32 \fB/usr/sbin/ipsecconf\fR  \fB-f\fR  [\fB-i\fR \fItunnel-name\fR]
33 .fi
35 .LP
36 .nf
37 \fB/usr/sbin/ipsecconf\fR  \fB-F\fR
38 .fi
40 .LP
41 .nf
42 \fB/usr/sbin/ipsecconf\fR  \fB-l\fR  [\fB-i\fR \fItunnel-name\fR] [\fB-n\fR]
43 .fi
45 .LP
46 .nf
47 \fB/usr/sbin/ipsecconf\fR  \fB-L\fR  [\fB-n\fR]
48 .fi
50 .SH DESCRIPTION
51 .sp
52 .LP
53 The \fBipsecconf\fR utility configures the IPsec policy for a host or for one
54 of its tunnels. Once the policy is configured, all outbound and inbound
55 datagrams are subject to policy checks as they exit and enter the host or
56 tunnel. For the host policy, if no entry is found, no policy checks will be
57 completed, and all the traffic will pass through. For a tunnel, if no entry is
58 found and there is at least one entry for the tunnel, the traffic will
59 automatically drop. The difference in behavior is because of the assumptions
60 about IPsec tunnels made in many implementations. Datagrams that are being
61 forwarded will not be subjected to policy checks that are added using this
62 command.  See \fBifconfig\fR(1M) and \fBdladm\fR(1M) for information on how to
63 protect forwarded packets.  Depending upon the match of the policy entry, a
64 specific action will be taken.
65 .sp
66 .LP
67 This command can be run only by superuser.
68 .sp
69 .LP
70 Each entry can protect traffic in either one direction (requiring a pair of
71 entries) or by a single policy entry which installs the needed symmetric
72 \fBsadb\fR rules.
73 .sp
74 .LP
75 When the command is issued without any arguments, the list of file policy
76 entries loaded are shown. To display the (\fBspd p.e.\fRs) use the \fB-l\fR
77 option. Both will display the index number for the entry. To specify a single
78 tunnel's SPD, use the \fB-i\fR option in combination with \fB-l\fR. To specify
79 all SPDs, both host and for all tunnels, use \fB-L\fR.
80 .sp
81 .LP
82 Note, since one file policy entry (\fBFPE\fR) can generate multiple SPD pol
83 entries (\fBSPE\fRs), the list of FPEs may not show all the actual entries.
84 However, it is still useful in determining what what rules have been added to
85 get the spd into its current state.
86 .sp
87 .LP
88 You can use the \fB-d\fR option with the index to delete a given policy in the
89 system. If the \fB-d\fR option removes an FPE entry that produces multiple
90 SPEs, only then SPD with the same policy index as the FPE will be removed. This
91 can produce a situation where there may be SPEs when there are no FPEs.
92 .sp
93 .LP
94 As with \fB-l\fR, \fB-d\fR can use the \fB-i\fR flag to indicate a tunnel. An
95 alternate syntax is to specify a tunnel name, followed by a comma (\fB,\fR),
96 followed by an index. For example, \fBip.tun0,1\fR.
97 .sp
98 .LP
99 With no options, the entries are displayed in the order that they were added,
100 which is not necessarily the order in which the traffic match takes place.
103 To view the order in which the traffic match will take place, use the \fB-l\fR
104 option. The rules are ordered such that all bypass rules are checked first,
105 then ESP rules, then AH rules. After that, they are checked in the order
106 entered.
109 Policy entries are not preserved across system restarts. Permanent policy
110 entries should be added to \fB/etc/inet/ipsecinit.conf\fR. This file is read by
111 the following \fBsmf\fR(5) service:
113 .in +2
115 svc:/network/ipsec/policy
117 .in -2
122 See \fBNOTES\fR for more information on managing IPsec security policy and
123 \fBSECURITY\fR for issues in securing \fB/etc/inet/ipsecinit.conf\fR.
124 .SH OPTIONS
127 \fBipsecconf\fR supports the following options:
129 .ne 2
131 \fB\fB-a\fR \fIfile\fR\fR
133 .sp .6
134 .RS 4n
135 Add the IPsec policy to the system as specified by each entry in the file. An
136 IPsec configuration file contains one or more entries that specify the
137 configuration. Once the policy is added, all outbound and inbound datagrams are
138 subject to policy checks.
140 Entries in the files are described in the  section below. Examples can be found
141 in the  section below.
143 Policy is latched for TCP/UDP sockets on which a \fBconnect\fR(3SOCKET) or
144 \fBaccept\fR(3SOCKET) is issued. So, the addition of new policy entries may not
145 affect such endpoints or sockets. However, the policy will be latched for a
146 socket with an existing non-null policy. Thus, make sure that there are no
147 preexisting connections that will be subject to checks by the new policy
148 entries.
150 The feature of policy latching explained above may change in the future. It is
151 not advisable to depend upon this feature.
155 .ne 2
157 \fB\fB-c\fR \fIfile\fR\fR
159 .sp .6
160 .RS 4n
161 Check the syntax of the configuration file and report any errors without making
162 any changes to the policy. This option is useful when debugging configurations
163 and when \fBsmf\fR(5) reports a configuration error. See \fBSECURITY\fR.
167 .ne 2
169 \fB\fB-d\fR \fIindex\fR\fR
171 .sp .6
172 .RS 4n
173 Delete the host policy denoted by the index. The index is obtained by invoking
174 \fBipsecconf\fR without any arguments, or with the \fB-l\fR option. See
175 DESCRIPTION for more information. Once the entry is deleted, all outbound and
176 inbound datagrams affected by this policy entry will not be subjected to policy
177 checks. Be advised that with connections for which the policy has been latched,
178 packets will continue to go out with the same policy, even if it has been
179 deleted. It is advisable to use the \fB-l\fR option to find the correct policy
180 index.
184 .ne 2
186 \fB\fB-d\fR \fIname\fR,\fIindex\fR\fR
188 .sp .6
189 .RS 4n
190 Delete the policy entry denoted by \fIindex\fR on a tunnel denoted by
191 \fIname\fR. Since tunnels affect traffic that might originate off-node,
192 latching does not apply as it does in the host policy case. Equivalent to:
193 \fB-d\fR \fIindex\fR \fB-i\fR \fIname\fR.
197 .ne 2
199 \fB\fB-f\fR\fR
201 .sp .6
202 .RS 4n
203 Flush all the policies in the system. Constraints are similar to the \fB-d\fR
204 option with respect to latching and host versus per-tunnel behavior.
208 .ne 2
210 \fB\fB-F\fR\fR
212 .sp .6
213 .RS 4n
214 Flush all policies on all tunnels and also flush all host policies.
218 .ne 2
220 \fB\fB-i\fR \fIname\fR\fR
222 .sp .6
223 .RS 4n
224 Specify a tunnel interface name for use with the \fB-d\fR, \fB-f\fR, or
225 \fB-l\fR flags.
229 .ne 2
231 \fB\fB-l\fR\fR
233 .sp .6
234 .RS 4n
235 Listing of a single policy table, defaulting to the host policy. When
236 \fBipsecconf\fR is invoked without any arguments, a complete list of policy
237 entries with indexes added by the user since boot is displayed. The current
238 table can differ from the previous one if, for example, a multi-homed entry was
239 added or policy reordering occurred, or if a single rule entry generates two
240 \fBspd\fR rules In the case of a multi-homed entry, all the addresses are
241 listed explicitly. If a mask was not specified earlier but was instead inferred
242 from the address, it will be explicitly listed here. This option is used to
243 view policy entries in the correct order. The outbound and inbound policy
244 entries are listed separately.
248 .ne 2
250 \fB\fB-L\fR\fR
252 .sp .6
253 .RS 4n
254 Lists all policy tables, including host policy and all tunnel instances
255 (including configured but unplumbed).
257 If \fB-i\fR is specified, \fB-L\fR lists the policy table for a specific tunnel
258 interface.
262 .ne 2
264 \fB\fB-n\fR\fR
266 .sp .6
267 .RS 4n
268 Show network addresses, ports, protocols in numbers. The \fB-n\fR option may
269 only be used with the \fB-l\fR option.
273 .ne 2
275 \fB\fB-q\fR\fR
277 .sp .6
278 .RS 4n
279 Quiet mode. Suppresses the warning message generated when adding policies.
282 .SH OPERANDS
285 Each policy entry contains three parts specified as follows:
287 .in +2
289 {pattern} action {properties}
291 .in -2
297 .in +2
299 {pattern} action {properties} ["or" action {properties}]*
301 .in -2
305 Every policy entry begins on a new line and can span multiple lines. If an
306 entry exceeds the length of a line, you should split it only within a "braced"
307 section or immediately before the first (left-hand) brace of a braced section.
308 Avoid using the backslash character (\e). See EXAMPLES.
311 The \fIpattern\fR section, as shown in the syntax above, specifies the traffic
312 pattern that should be matched against the outbound and inbound datagrams. If
313 there is a match, a specific \fIaction\fR determined by the second argument
314 will be taken, depending upon the \fIproperties\fR of the policy entry.
317 If there is an \fBor\fR in the rule (multiple action-properties for a given
318 pattern), a transmitter will use the first action-property pair that works,
319 while a receiver will use any that are acceptable.
322 \fIpattern\fR and \fIproperties\fR are name-value pairs where name and value
323 are separated by a <space>, <tab> or <newline>. Multiple name-value pairs
324 should be separated by <space>, <tab> or <newline>. The beginning and end of
325 the pattern and properties are marked by \fB{\fR and \fB}\fR respectively.
328 Files can contain multiple policy entries. An unspecified name-value pair in
329 the \fIpattern\fR will be considered as a wildcard. Wildcard entries match any
330 corresponding entry in the datagram.
333 One thing to remember is that UDP port 500 is always bypassed regardless of any
334 policy entries. This is a requirement for \fBin.iked\fR(1M) to work.
337 File can be commented by using a \fB#\fR as the first character. Comments may
338 be inserted either at the beginning or the end of a line.
341 The complete syntax of a policy entry is:
343 .in +2
345 policy ::= { <pattern1> } <action1> { <properties1> } |
346      { <pattern2> } <action2> { <properties2> }
347      [ 'or' <action2> { <properties2>} ]*
349      pattern1 ::=  <pattern_name_value_pair1>*
351      pattern2 ::=  <pattern_name_value_pair2>*
353      action1 ::= apply | permit | bypass | pass
354      action2 ::=  bypass | pass | drop | ipsec
356      properties1 ::=   {<prop_name_value_pair1>}
357      properties2 ::=   {<prop_name_value_pair2>}
360      pattern_name_value_pair1 ::=
361         saddr <address>/<prefix> |
362         src  <address>/<prefix> |
363         srcaddr <address>/<prefix> |
364         smask <mask> |
365         sport <port> |
366         daddr <address>/<prefix> |
367         dst <address>/<prefix> |
368         dstaddr <address>/<prefix> |
369         dmask <mask> |
370         dport <port> |
371         ulp <protocol> |
372         proto <protocol> |
373         type <icmp-type> |
374         type <number>-<number> |
375         code <icmp-code>
376         code <number>-<number>
377         tunnel <interface-name> |
378         negotiate <tunnel,transport>
380      pattern_name_value_pair2 ::=
381         raddr <address>/<prefix> |
382         remote <address>/<prefix> |
383         rport <port> |
384         laddr <address>/<prefix> |
385         local <address>/<prefix> |
386         lport <port> |
387         ulp <protocol> |
388         type <icmp-type> |
389         type <number>-<number> |
390         code <icmp-code> |
391         code <number>-<number>
392         proto <protocol>  |
393         tunnel <interface-name> |
394         negotiate <tunnel,transport> |
395         dir <dir_val2>
397      address ::=  <IPv4 dot notation> | <IPv6 colon notation> |
398                   <String recognized by gethostbyname>|
399                   <String recognized by getnetbyname>
401      prefix ::=  <number>
403      mask ::= <0xhexdigit[hexdigit]> | <0Xhexdigit[hexdigit]> |
404               <IPv4 dot notation>
406      port ::= <number>| <String recognized by getservbyname>
408      protocol ::=  <number>| <String recognized by getprotobyname>
410      prop_name_value_pair1 ::=
411           auth_algs <auth_alg> |
412           encr_algs <encr_alg> |
413           encr_auth_algs <auth_alg> |
414           sa <sa_val> |
415           dir <dir_val1>
417      prop_name_value_pair2 ::=
418           auth_algs <auth_alg> |
419           encr_algs <encr_alg> |
420           encr_auth_algs <auth_alg> |
421           sa <sa_val>
423      auth_alg ::=  <auth_algname> ['(' <keylen> ')']
424      auth_algname ::= any | md5 | hmac-md5 | sha | sha1 | hmac-sha |
425                       hmac-sha1 | hmac-sha256 | hmac-sha384 |
426                       hmac-sha512 |<number>
428      encr_alg ::= <encr_algname> ['(' <keylen> ')']
429      encr_algname ::= any | aes | aes-cbc | des | des-cbc | 3des |
430                       3des-cbc | blowfish | blowfish-cbc | <number>
432      keylen ::= <number> | <number>'..' | '..'<number> | <number>'..' \e
433      <number>
435      sa_val ::= shared | unique
437      dir_val1 ::= out | in
438      dir_val2 ::= out | in | both
440      number ::= < 0 | 1 | 2 ... 9> <number>
441      icmp-type ::= <number> | unreach | echo | echorep | squench |
442                    redir | timex | paramprob | timest | timestrep |
443                    inforeq | inforep | maskreq | maskrep | unreach6 |
444                    pkttoobig6 | timex6 | paramprob6 | echo6 | echorep6 |
445                    router-sol6 | router-ad6 | neigh-sol6 | neigh-ad6 |
446                    redir6
448      icmp-code ::= <number> | net-unr | host-unr | proto-unr | port-unr |
449                    needfrag | srcfail | net-unk | host-unk | isolate |
450                    net-prohib | host-prohib | net-tos | host-tos |
451                    filter-prohib | host-preced | cutoff-preced |
452                    no-route6 | adm-prohib6 | addr-unr6 | port-unr6 |
453                    hop-limex6 | frag-re-timex6 | err-head6 | unrec-head6 |
454                    unreq-opt6
456 .in -2
460 Policy entries may contain the following (name value) pairs in the
461 \fIpattern\fR field. Each (name value) pair may appear only once in given
462 policy entry.
464 .ne 2
466 \fBladdr/plen\fR
470 \fBlocal/plen\fR
472 .sp .6
473 .RS 4n
474 The value that follows is the local address of the datagram with the prefix
475 length. Only plen leading bits of the source address of the packet will be
476 matched. plen is optional. Local means destination on incoming and source on
477 outgoing packets. The source address value can be a hostname as described in
478 getaddrinfo(3SOCKET) or a network name as described in
479 \fBgetnetbyname\fR(3XNET) or a host address or network address in the Internet
480 standard dot notation. See \fBinet_addr\fR(3XNET). If a hostname is given and
481 getaddrinfo(3SOCKET) returns multiple addresses for the host, then policy will
482 be added for each of the addresses with other entries remaining the same.
486 .ne 2
488 \fBraddr/plen\fR
492 \fBremote/plen\fR
494 .sp .6
495 .RS 4n
496 The value that follows is the remote address of the datagram with the prefix
497 length. Only plen leading bits of the remote address of the packet will be
498 matched. plen is optional. Remote means source on incoming packets and
499 destination on outgoing packets. The remote address value can be a hostname as
500 described in \fBgetaddrinfo\fR(3SOCKET) or a network name as described in
501 \fBgetnetbyname\fR(3XNET) or a host address or network address in the Internet
502 standard dot notation. See \fBinet_addr\fR(3XNET). If a hostname is given and
503 \fBgetaddrinfo\fR(3SOCKET) returns multiple addresses for the host, then policy
504 will be added for each of the addresses with other entries remaining the same.
508 .ne 2
510 \fBsrc/plen\fR
514 \fBsrcaddr/plen\fR
518 \fBsaddr/plen\fR
520 .sp .6
521 .RS 4n
522 The value that follows is the source address of the datagram with the prefix
523 length. Only \fIplen\fR leading bits of the source address of the packet will
524 be matched. \fIplen\fR is optional.
526 The source address value can be a hostname as described in
527 \fBgetaddrinfo\fR(3SOCKET) or a network name as described in
528 \fBgetnetbyname\fR(3XNET) or a host address or network address in the Internet
529 standard dot notation. See \fBinet_addr\fR(3XNET).
531 If a hostname is given and \fBgetaddrinfo\fR(3SOCKET) returns multiple
532 addresses for the host, then policy will be added for each of the addresses
533 with other entries remaining the same.
537 .ne 2
539 \fBdaddr/plen\fR
543 \fBdest/plen\fR
547 \fBdstaddr/plen\fR
549 .sp .6
550 .RS 4n
551 The value that follows is the destination address of the datagram with the
552 prefix length. Only \fIplen\fR leading bits of the destination address of the
553 packet will be matched. \fIplen\fR is optional.
555 See \fIsaddr\fR for valid values that can be given. If multiple source and
556 destination addresses are found, then a policy entry that covers each source
557 address-destination address pair will be added to the system.
561 .ne 2
563 \fB\fIsmask\fR\fR
565 .sp .6
566 .RS 4n
567 For IPv4 only. The value that follows is the source mask. If prefix length is
568 given with \fIsaddr\fR, this should not be given. This can be represented
569 either in hexadecimal number with a leading \fB0x\fR or \fB0X\fR, for example,
570 \fB0xffff0000\fR, \fB0Xffff0000\fR or in the Internet decimal dot notation, for
571 example, \fB255.255.0.0\fR and \fB255.255.255.0\fR. The mask should be
572 contiguous and the behavior is not defined for non-contiguous masks.
574 \fIsmask\fR is considered only when \fIsaddr\fR is given.
576 For both IPv4 and IPv6 addresses, the same information can be specified as a
577 \fIslen\fR value attached to the \fIsaddr\fR parameter.
581 .ne 2
583 \fB\fIdmask\fR\fR
585 .sp .6
586 .RS 4n
587 Analogous to \fIsmask.\fR
591 .ne 2
593 \fB\fIlport\fR\fR
595 .sp .6
596 .RS 4n
597 The value that follows is the local port of the datagram. This can be either a
598 port number or a string searched with a NULL proto argument, as described in
599 getservbyname(3XNET)
603 .ne 2
605 \fB\fIrport\fR\fR
607 .sp .6
608 .RS 4n
609 The value that follows is the remote port of the datagram. This can be either a
610 port number or a string searched with a NULL proto argument, as described in
611 getservbyname(3XNET)
615 .ne 2
617 \fB\fIsport\fR\fR
619 .sp .6
620 .RS 4n
621 The value that follows is the source port of the datagram. This can be either a
622 port number or a string searched with a \fBNULL\fR proto argument, as described
623 in \fBgetservbyname\fR(3XNET)
627 .ne 2
629 \fB\fIdport\fR\fR
631 .sp .6
632 .RS 4n
633 The value that follows is the destination port of the datagram. This can be
634 either a port number or a string as described in \fBgetservbyname\fR(3XNET)
635 searched with \fBNULL\fR proto argument.
639 .ne 2
641 \fB\fBproto\fR \fIulp\fR\fR
643 .sp .6
644 .RS 4n
645 The value that follows is the Upper Layer Protocol that this entry should be
646 matched against. It could be a number or a string as described in
647 \fBgetprotobyname\fR(3XNET). If no smask or plen is specified, a plen of 32 for
648 IPv4 or 128 for IPv6 will be used, meaning a host. If the \fIulp\fR is
649 \fBicmp\fR or \fBipv6-icmp\fR, any action applying IPsec must be the same for
650 all \fBicmp\fR rules.
654 .ne 2
656 \fB\fBtype\fR \fInum\fR or \fInum\fR-\fInum\fR\fR
658 .sp .6
659 .RS 4n
660 The value that follows is the ICMP type that this entry should be matched
661 against. \fBtype\fR must be a number from 0 to 255, or one of the appropriate
662 \fBicmp-type\fR keywords. Also, \fIulp\fR must be present and must specify
663 either \fBicmp\fR or \fBipv6-icmp\fR. A range of types can be specified with a
664 hyphen separating numbers.
668 .ne 2
670 \fB\fBcode\fR \fInum\fR or \fInum\fR-\fInum\fR\fR
672 .sp .6
673 .RS 4n
674 The value that follows is the ICMP code that this entry should be matched
675 against. The value following the keyword \fBcode\fR must be a number from 0 to
676 254 or one of the appropriate \fBicmp-code\fR keywords. Also, \fBtype\fR must
677 be present. A range of codes can be specified with a hyphen separating numbers.
681 .ne 2
683 \fB\fBtunnel\fR \fIname\fR\fR
685 .sp .6
686 .RS 4n
687 Specifies a tunnel network interface, as configured with \fBifconfig\fR(1M). If
688 a tunnel of \fIname\fR does not yet exist, the policy entries are added anyway,
689 and joined with the tunnel state when it is created. If a tunnel is unplumbed,
690 its policy entries disappear.
694 .ne 2
696 \fB\fBnegotiate\fR \fItunnel\fR\fR
700 \fB\fBnegotiate\fR \fItransport\fR\fR
702 .sp .6
703 .RS 4n
704 For per-tunnel security, specify whether the IPsec SAs protecting the traffic
705 should be tunnel-mode SAs or transport-mode SAs. If transport-mode SAs are
706 specified, no addresses can appear in the policy entry. Transport-mode is
707 backward compatible with Solaris 9, and tunnel IPsec policies configured with
708 \fBifconfig\fR(1M) will show up as transport mode entries here.
713 Policy entries may contain the following (name-value) pairs in the properties
714 field. Each (name-value) pair may appear only once in a given policy entry.
716 .ne 2
718 \fB\fBauth_algs\fR\fR
720 .sp .6
721 .RS 4n
722 An acceptable value following this implies that IPsec \fBAH\fR header will be
723 present in the outbound datagram. Values following this describe the
724 authentication algorithms that will be used while applying the IPsec \fBAH\fR
725 on outbound datagrams and verified to be present on inbound datagrams. See
726 \fIRFC 2402\fR.
728 This entry can contain either a string or a decimal number.
730 .ne 2
732 \fB\fBstring\fR\fR
734 .sp .6
735 .RS 4n
736 This should be either \fBMD5\fR or \fBHMAC-MD5\fR denoting the \fBHMAC-MD5\fR
737 algorithm as described in \fIRFC 2403\fR, and \fBSHA1\fR, or \fBHMAC-SHA1\fR or
738 \fBSHA\fR or \fBHMAC-SHA\fR denoting the \fBHMAC-SHA\fR algorithm described in
739 \fIRFC 2404\fR. You can use the \fBipsecalgs\fR(1M) command to obtain the
740 complete list of authentication algorithms.
742 The string can also be \fBANY\fR, which denotes no-preference for the
743 algorithm. Default algorithms will be chosen based upon the \fBSA\fRs available
744 at this time for manual \fBSA\fRs and the key negotiating daemon for automatic
745 \fBSA\fRs. Strings are not case-sensitive.
749 .ne 2
751 \fB\fBnumber\fR\fR
753 .sp .6
754 .RS 4n
755 A number in the range 1-255. This is useful when new algorithms can be
756 dynamically loaded.
759 If \fIauth_algs\fR is not present, the \fBAH\fR header will not be present in
760 the outbound datagram, and the same will be verified for the inbound datagram.
764 .ne 2
766 \fB\fBencr_algs\fR\fR
768 .sp .6
769 .RS 4n
770 An acceptable value following this implies that IPsec \fBESP\fR header will be
771 present in the outbound datagram. The value following this describes the
772 encryption algorithms that will be used to apply the IPsec \fBESP\fR protocol
773 to outbound datagrams and verify it to be present on inbound datagrams. See
774 \fIRFC 2406\fR.
776 This entry can contain either a string or a decimal number. Strings are not
777 case-sensitive.
779 .ne 2
781 \fB\fBstring\fR\fR
783 .sp .6
784 .RS 4n
785 Can be one of the following:
790 c c c
791 l l l .
792 string value:   Algorithm Used: See RFC:
794 DES or DES-CBC  DES-CBC 2405
795 3DES or 3DES-CBC        3DES-CBC        2451
796 BLOWFISH or BLOWFISH-CBC        BLOWFISH-CBC    2451
797 AES or AES-CBC  AES-CBC 2451
800 You can use the \fBipsecalgs\fR(1M) command to obtain the complete list of
801 authentication algorithms.
803 The value can be \fBNULL\fR, which implies a \fBNULL\fR encryption, pursuant to
804 \fIRFC 2410\fR. This means that the payload will not be encrypted. The string
805 can also be \fBANY\fR, which indicates no-preference for the algorithm. Default
806 algorithms will be chosen depending upon the SAs available at the time for
807 manual SAs and upon the key negotiating daemon for automatic SAs. Strings are
808 not case-sensitive.
812 .ne 2
814 \fB\fBnumber\fR\fR
816 .sp .6
817 .RS 4n
818 A decimal number in the range 1-255. This is useful when new algorithms can be
819 dynamically loaded.
825 .ne 2
827 \fB\fBencr_auth_algs\fR\fR
829 .sp .6
830 .RS 4n
831 An acceptable value following \fBencr_auth_algs\fR implies that the IPsec
832 \fBESP\fR header will be present in the outbound datagram. The values following
833 \fBencr_auth_algs\fR describe the authentication algorithms that will be used
834 while applying the IPsec \fBESP\fR protocol on outbound datagrams and verified
835 to be present on inbound datagrams. See \fIRFC 2406\fR. This entry can contain
836 either a string or a number. Strings are case-insensitive.
838 .ne 2
840 \fB\fBstring\fR\fR
842 .sp .6
843 .RS 4n
844 Valid values are the same as the ones described for \fBauth_algs\fR above.
848 .ne 2
850 \fB\fBnumber\fR\fR
852 .sp .6
853 .RS 4n
854 This should be a decimal number in the range 1-255. This is useful when new
855 algorithms can be dynamically loaded.
858 If \fBencr_algs\fR is present and \fBencr_auth_algs\fR is not present in a
859 policy entry, the system will use an \fBESP\fR \fBSA\fR regardless of whether
860 the \fBSA\fR has an authentication algorithm or not.
862 If \fBencr_algs\fR is not present and \fBencr_auth_algs\fR is present in a
863 policy entry, null encryption will be provided, which is equivalent to
864 \fBencr_algs\fR with \fBNULL\fR, for outbound and inbound datagrams.
866 If both \fBencr_algs\fR and \fBencr_auth_algs\fR are not present in a policy
867 entry, \fBESP\fR header will not be present for outbound datagrams and the same
868 will be verified for inbound datagrams.
870 If both \fBencr_algs\fR and \fBencr_auth_algs\fR are present in a policy entry,
871 \fBESP\fR header with integrity checksum will be present on outbound datagrams
872 and the same will be verified for inbound datagrams.
874 For \fBencr_algs\fR, \fBencr_auth_algs\fR, and \fBauth_algs\fR a key length
875 specification may be present. This is either a single value specifying the only
876 valid key length for the algorithm or a range specifying the valid minimum
877 and/or maximum key lengths. Minimum or maximum lengths may be omitted.
881 .ne 2
883 \fB\fBdir\fR\fR
885 .sp .6
886 .RS 4n
887 Values following this decides whether this entry is for outbound or inbound
888 datagram. Valid values are strings that should be one of the following:
890 .ne 2
892 \fB\fBout\fR\fR
894 .sp .6
895 .RS 4n
896 This means that this policy entry should be considered only for outbound
897 datagrams.
901 .ne 2
903 \fB\fBin\fR\fR
905 .sp .6
906 .RS 4n
907 This means that this policy entry should be considered only for inbound
908 datagrams.
912 .ne 2
914 \fB\fBboth\fR\fR
916 .sp .6
917 .RS 4n
918 This means that this policy entry should be considered for both inbound and
919 outbound datagrams
922 This entry is not needed when the action is "apply", "permit" or "ipsec". But
923 if it is given while the action is "apply" or "permit", it should be "out" or
924 "in" respectively. This is mandatory when the action is "bypass".
928 .ne 2
930 \fB\fBsa\fR\fR
932 .sp .6
933 .RS 4n
934 Values following this decide the attribute of the security association. Value
935 indicates whether a unique security association should be used or any existing
936 \fBSA\fR can be used. If there is a policy requirement, \fBSA\fRs are created
937 dynamically on the first outbound datagram using the key management daemon.
938 Static \fBSA\fRs can be created using \fBipseckey\fR(1M). The values used here
939 determine whether a new \fBSA\fR will be used/obtained. Valid values are
940 strings that could be one of the following:
942 .ne 2
944 \fB\fBunique\fR\fR
946 .sp .6
947 .RS 4n
948 Unique Association. A new/unused association will be obtained/used for packets
949 matching this policy entry. If an \fBSA\fR that was previously used by the same
950 5 tuples, that is, {Source address, Destination address, Source port,
951 Destination Port, Protocol (for example, \fBTCP\fR/\fBUDP\fR)} exists, it will
952 be reused. Thus uniqueness is expressed by the 5 tuples given above. The
953 security association used by the above 5 tuples will not be used by any other
954 socket. For inbound datagrams, uniqueness will not be verified.
956 For tunnel-mode tunnels, \fBunique\fR is ignored. SAs are assigned per-rule in
957 tunnel-mode tunnels. For transport-mode tunnels, \fBunique\fR is implicit,
958 because the enforcement happens only on the outer-packet addresses and protocol
959 value of either IPv4-in-IP or IPv6-in-IP.
963 .ne 2
965 \fB\fBshared\fR\fR
967 .sp .6
968 .RS 4n
969 Shared association. If an \fBSA\fR exists already for this source-destination
970 pair, it will be used. Otherwise a new \fBSA\fR will be obtained. This is the
971 default.
974 This is mandatory only for outbound policy entries and should not be given for
975 entries whose action is "bypass". If this entry is not given for inbound
976 entries, for example, when "dir" is in or "action" is permit, it will be
977 assumed to be shared.
982 Action follows the pattern and should be given before properties. It should be
983 one of the following and this field is mandatory.
985 .ne 2
987 \fB\fBipsec\fR\fR
989 .sp .6
990 .RS 4n
991 Use IPsec for the datagram as described by the properties, if the pattern
992 matches the datagram. If ipsec is given without a dir spec , the pattern is
993 matched to incoming and outgoing datagrams.
997 .ne 2
999 \fB\fBapply\fR\fR
1001 .sp .6
1002 .RS 4n
1003 Apply IPsec to the datagram as described by the properties, if the pattern
1004 matches the datagram. If \fBapply\fR is given, the pattern is matched only on
1005 the outbound datagram.
1009 .ne 2
1011 \fB\fBpermit\fR\fR
1013 .sp .6
1014 .RS 4n
1015 Permit the datagram if the pattern matches the incoming datagram and satisfies
1016 the constraints described by the properties. If it does not satisfy the
1017 properties, discard the datagram. If \fBpermit\fR is given, the pattern is
1018 matched only for inbound datagrams.
1022 .ne 2
1024 \fB\fBbypass\fR\fR
1028 \fB\fBpass\fR\fR
1030 .sp .6
1031 .RS 4n
1032 Bypass any policy checks if the pattern matches the datagram. \fBdir\fR in the
1033 properties decides whether the check is done on outbound or inbound datagrams.
1034 All the \fBbypass\fR entries are checked before checking with any other policy
1035 entry in the system. This has the highest precedence over any other entries.
1036 \fBdir\fR is the only field that should be present when action is \fBbypass\fR.
1040 .ne 2
1042 \fB\fBdrop\fR\fR
1044 .sp .6
1045 .RS 4n
1046 Drop any packets that match the pattern.
1051 If the file contains multiple policy entries, for example, they are assumed to
1052 be listed in the order in which they are to be applied. In cases of multiple
1053 entries matching the outbound and inbound datagram, the first match will be
1054 taken. The system will reorder the policy entry, that is, add the new entry
1055 before the old entry, only when:
1058 The level of protection is "stronger" than the old level of protection.
1061 Currently, strength is defined as:
1063 .in +2
1065 AH and ESP > ESP > AH
1067 .in -2
1072 The standard uses of \fBAH\fR and \fBESP\fR were what drove this ranking of
1073 "stronger". There are flaws with this. \fBESP \fR can be used either without
1074 authentication, which will allow cut-and-paste or replay attacks, or without
1075 encryption, which makes it equivalent or slightly weaker than \fBAH\fR. An
1076 administrator should take care to use \fBESP\fR properly. See
1077 \fBipsecesp\fR(7P) for more details.
1080 If the new entry has \fBbypass\fR as action, \fBbypass\fR has the highest
1081 precedence. It can be added in any order, and the system will still match all
1082 the \fBbypass\fR entries before matching any other entries. This is useful for
1083 key management daemons which can use this feature to bypass IPsec as it
1084 protects its own traffic.
1087 Entries with both \fBAH\fR (\fBauth_algs\fR present in the policy entry) and
1088 \fBESP\fR (\fBencr_auth_algs\fR or \fBencr_auth_algs\fR present in the policy
1089 entry) protection are ordered after all the entries with \fBAH\fR and \fBESP\fR
1090 and before any \fBAH\fR-only and \fBESP\fR-only entries. In all other cases the
1091 order specified by the user is not modified, that is, newer entries are added
1092 at the end of all the old entries. See .
1095 A new entry is considered duplicate of the old entry if an old entry matches
1096 the same traffic pattern as the new entry. See  for information on duplicates.
1097 .SH SECURITY
1100 If, for example, the policy file comes over the wire from an \fBNFS\fR mounted
1101 file system, an adversary can modify the data contained in the file, thus
1102 changing the policy configured on the machine to suit his needs. Administrators
1103 should be cautious about transmitting a copy of the policy file over a network.
1106 To prevent non-privileged users from modifying the security policy, ensure that
1107 the configuration file is writable only by trusted users.
1110 The configuration file is defined by a property of the \fBpolicy\fR
1111 \fBsmf\fR(5) service. The default configuration file, is
1112 \fB/etc/inet/ipsecinit.conf\fR. This can be changed using the \fBsvcprop\fR(1)
1113 command. See \fBNOTES\fR for more details.
1116 The policy description language supports the use of tokens that can be resolved
1117 by means of a name service, using functions such as \fBgethostbyname\fR(3NSL).
1118 While convenient, these functions are only secure as the name service the
1119 system is configured to use. Great care should be taken to secure the name
1120 service if it is used to resolve elements of the security policy.
1123 If your source address is a host that can be looked up over the network and
1124 your naming system itself is compromised, then any names used will no longer be
1125 trustworthy.
1128 If the name switch is configured to use a name service that is not local to the
1129 system, bypass policy entries might be required to prevent the policy from
1130 preventing communication to the name service. See \fBnsswitch.conf\fR(4).
1133 Policy is latched for \fBTCP/UDP\fR sockets on which a \fBconnect\fR(3SOCKET)
1134 or \fBaccept\fR(3SOCKET) has been issued. Adding new policy entries will not
1135 have any effect on them. This feature of latching may change in the future. It
1136 is not advisable to depend upon this feature.
1139 The \fBipsecconf\fR command can only be run by a user who has sufficient
1140 privilege to open the \fBpf_key\fR(7P) socket. The appropriate privilege can be
1141 assigned to a user with the Network IPsec Management profile. See
1142 \fBprofiles\fR(1), \fBrbac\fR(5), \fBprof_attr\fR(4).
1145 Make sure to set up the policies before starting any communications, as
1146 existing connections may be affected by the addition of new policy entries.
1147 Similarly, do not change policies in the middle of a communication.
1150 Note that certain \fBndd\fR tunables affect how policies configured with this
1151 tool are enforced; see \fBipsecesp\fR(7P) for more details.
1152 .SH EXAMPLES
1154 \fBExample 1 \fRProtecting Outbound \fBTCP\fR Traffic With \fBESP\fR and the
1155 \fBAES\fR Algorithm
1158 The following example specified that any \fBTCP\fR packet from spiderweb to
1159 arachnid should be encrypted with \fBAES\fR, and the \fB SA\fR could be a
1160 shared one. It does not verify whether or not the inbound traffic is encrypted.
1163 .in +2
1166 # Protect the outbound TCP traffic between hosts spiderweb
1167 # and arachnid with ESP and use AES algorithm.
1170      laddr spiderweb
1171      raddr arachnid
1172      ulp tcp
1173      dir out
1174 } ipsec {
1175              encr_algs AES
1178 .in -2
1181 \fBExample 2 \fRVerifying Whether or Not Inbound Traffic is Encrypted
1184 Example 1 does not verify whether or not the inbound traffic is encrypted. The
1185 entry in this example protects inbound traffic:
1188 .in +2
1191 # Protect the TCP traffic on inbound with ESP/DES from arachnid
1192 # to spiderweb
1195             laddr spiderweb
1196             raddr arachnid
1197             ulp tcp
1198             dir in
1199 } ipsec {
1200             encr_algs AES
1203 .in -2
1207 \fBsa\fR can be absent for inbound policy entries as it implies that it can be
1208 a shared one. Uniqueness is not verified on inbound. Note that in both the
1209 above entries, authentication was never specified. This can lead to cut and
1210 paste attacks. As mentioned previously, though the authentication is not
1211 specified, the system will still use an \fBESP\fR \fBSA\fR with
1212 \fBencr_auth_alg\fR specified, if it was found in the \fBSA\fR tables.
1215 \fBExample 3 \fRProtecting All Traffic Between Two Hosts
1218 The following example protects both directions at once:
1221 .in +2
1224             laddr spiderweb
1225             raddr arachnid
1226             ulp tcp
1227 } ipsec {
1228             encr_algs AES
1231 .in -2
1234 \fBExample 4 \fRAuthenticating All Inbound Traffic to the Telnet Port
1237 This entry specifies that any inbound datagram to telnet port should come in
1238 authenticated with the SHA1 algorithm. Otherwise the datagram should not be
1239 permitted. Without this entry, traffic destined to port number 23 can come in
1240 clear. \fBsa\fR is not specified, which implies that it is shared. This can be
1241 done only for inbound entries. You need to have an equivalent entry to protect
1242 outbound traffic so that the outbound traffic is authenticated as well, remove
1243 the dir.
1246 .in +2
1249 # All the inbound traffic to the telnet port should be
1250 # authenticated.
1253            lport telnet
1254            dir in
1255 } ipsec {
1256            auth_algs sha1
1259 .in -2
1262 \fBExample 5 \fRVerifying Inbound Traffic is Null-Encrypted
1265 The first entry specifies that any packet with address host-B should not be
1266 checked against any policies. The second entry specifies that all inbound
1267 traffic from network-B should be encrypted with a \fBNULL\fR encryption
1268 algorithm and the \fBMD5\fR authentication algorithm. \fBNULL\fR encryption
1269 implies that \fBESP\fR header will be used without encrypting the datagram. As
1270 the first entry is \fBbypass\fR it need not be given first in order, as
1271 \fBbypass\fR entries have the highest precedence. Thus any inbound traffic will
1272 be matched against all \fBbypass\fR entries before any other policy entries.
1275 .in +2
1278 # Make sure that all inbound traffic from network-B is NULL
1279 # encrypted, but bypass for host-B alone from that network.
1280 # Add the bypass first.
1282 raddr host-B
1283         dir in  
1284 } bypass {}
1286 # Now add for network-B.
1288         raddr network-B/16
1289         dir in
1290 } ipsec {
1291 encr_algs NULL
1292 encr_auth_algs md5
1295 .in -2
1298 \fBExample 6 \fREntries to Bypass Traffic from IPsec
1301 The first two entries provide that any datagram leaving the machine with source
1302 port 53 or coming into port number 53 should not be subjected to IPsec policy
1303 checks, irrespective of any other policy entry in the system. Thus the latter
1304 two entries will be considered only for ports other than port number 53.
1307 .in +2
1310 # Bypass traffic for port no 53
1311      #
1312 {lport 53} bypass {}
1313 {rport 53} bypass {}
1314 {raddr spiderweb } ipsec {encr_algs any sa unique}
1316 .in -2
1319 \fBExample 7 \fRProtecting Outbound Traffic
1321 .in +2
1324      # Protect the outbound traffic from all interfaces.
1325      #
1326 {raddr spiderweb dir out} ipsec {auth_algs any sa unique}
1328 .in -2
1332 If the \fBgethostbyname\fR(3XNET) call for spiderweb yields multiple addresses,
1333 multiple policy entries will be added for all the source address with the same
1334 properties.
1337 .in +2
1340     laddr arachnid
1341     raddr spiderweb
1342     dir in
1343 } ipsec {auth_algs any sa unique}
1345 .in -2
1349 If the \fBgethostbyname\fR(3XNET) call for spiderweb and the
1350 \fBgethostbyname\fR(3XNET) call for arachnid yield multiple addresses, multiple
1351 policy entries will be added for each (\fBsaddr\fR \fBdaddr\fR) pair with the
1352 same properties. Use \fBipsecconf\fR \fB-l\fR to view all the policy entries
1353 added.
1356 \fBExample 8 \fRBypassing Unauthenticated Traffic
1358 .in +2
1361 # Protect all the outbound traffic with ESP except any traffic
1362 # to network-b which should be authenticated and bypass anything
1363 # to network-c
1365 {raddr network-b/16 dir out} ipsec {auth_algs any}
1366 {dir out} ipsec {encr_algs any}
1367 {raddr network-c/16 dir out} bypass {} # NULL properties
1369 .in -2
1373 Note that \fBbypass\fR can be given anywhere and it will take precedence over
1374 all other entries. \fBNULL\fR pattern matches all the traffic.
1377 \fBExample 9 \fREncrypting IPv6 Traffic with 3DES and MD5
1380 The following entry on the host with the link local address
1381 \fBfe80::a00:20ff:fe21:4483\fR specifies that any outbound traffic between the
1382 hosts wtih IPv6 link-local addresses \fBfe80::a00:20ff:fe21:4483\fR and
1383 \fBfe80::a00:20ff:felf:e346\fR must be encrypted with \fB3DES\fR and \fBMD5.\fR
1386 .in +2
1389     laddr fe80::a00:20ff:fe21:4483
1390     raddr fe80::a00:20ff:felf:e346
1391     dir out
1392 } ipsec {
1393     encr_algs 3DES
1394     encr_auth_algs MD5
1397 .in -2
1400 \fBExample 10 \fRVerifying IPv6 Traffic is Authenticated with SHA1
1403 The following two entries require that all IPv6 traffic to and from the IPv6
1404 site-local network \fBfec0:abcd::0/32\fR be authenticated with \fBSHA1\fR.
1407 .in +2
1409 {raddr fec0:abcd::0/32} ipsec { auth_algs SHA1 }
1411 .in -2
1414 \fBExample 11 \fRKey Lengths
1416 .in +2
1418 # use aes at any key length
1419 {raddr spiderweb} ipsec {encr_algs aes}
1421 # use aes with a 192 bit key
1422 {raddr spiderweb} ipsec {encr_algs aes(192)}
1424 # use aes with any key length up to 192 bits
1425 # i.e. 192 bits or less
1426 {raddr spiderweb} ipsec {encr_algs aes(..192)}
1428 # use aes with any key length of 192 or more
1429 # i.e. 192 bits or more
1430 {raddr spiderweb} ipsec {encr_algs aes(192..)}
1432 #use aes with any key from 192 to 256 bits
1433 {raddr spiderweb} ipsec {encr_algs aes(192..256)}
1435 #use any algorithm with a key of 192 bits or longer
1436 {raddr spiderweb} ipsec {encr_algs any(192..)}
1438 .in -2
1441 \fBExample 12 \fRCorrect and Incorrect Policy Entries
1444 The following are examples of correctly formed policy entries:
1447 .in +2
1449 { raddr that_system rport telnet } ipsec { encr_algs 3des encr_auth_algs
1450 sha1 sa shared}
1453         raddr that_system
1454         rport telnet
1455 } ipsec {
1456         encr_algs 3des
1457         encr_auth_algs sha1
1458         sa shared
1461 { raddr that_system rport telnet } ipsec
1462         { encr_algs 3des encr_auth_algs sha1 sa shared}
1464 { raddr that_system rport telnet } ipsec
1465         { encr_algs 3des encr_auth_algs sha1 sa shared} or ipsec
1466         { encr_algs aes encr_auth_algs sha1 sa shared}
1468 .in -2
1473 \&...and the following is an incorrectly formed entry:
1476 .in +2
1478 { raddr that_system rport telnet } ipsec
1479         { encr_algs 3des encr_auth_algs sha1 sa shared}
1480         or ipsec { encr_algs aes encr_auth_algs sha1 sa shared}
1482 .in -2
1487 In the preceding, incorrect entry, note that the third line begins with "\fBor
1488 ipsec\fR". Such an entry causes \fBipsecconf\fR to return an error.
1491 \fBExample 13 \fRAllowing Neighbor Discovery to Occur in the Clear
1494 The following two entries require that all IPv6 traffic to and from the IPv6
1495 site-local network \fBfec0:abcd::0/32\fR be authenticated with SHA1. The second
1496 entry allows neighbor discovery to operate correctly.
1499 .in +2
1501 {raddr fec0:abcd::0/32} ipsec { auth_algs SHA1 }
1502 {raddr fec0:abcd::0/32 ulp ipv6-icmp type 133-137  dir both }
1503     pass { }
1505 .in -2
1508 \fBExample 14 \fRUsing "or"
1511 The following entry allows traffic using the AES or Blowfish algorithms from
1512 the remote machine spiderweb:
1515 .in +2
1517 {raddr spiderweb} ipsec {encr_algs aes} or ipsec {encr_algs blowfish}
1519 .in -2
1522 \fBExample 15 \fRConfiguring a Tunnel to be Backward-Compatible with Solaris 9
1525 The following example is equivalent to "\fBencr_algs aes encr_auth_algs md5\fR"
1526 in \fBifconfig\fR(1M):
1529 .in +2
1531 {tunnel ip.tun0 negotiate transport} ipsec {encr_algs aes
1532                                                    encr_auth_algs md5}
1534 .in -2
1537 \fBExample 16 \fRConfiguring a Tunnel to a VPN client with an Assigned Address
1540 The following example assumes a distinct "inside" network with its own
1541 topology, such that a client's default route goes "inside".
1544 .in +2
1546 # Unlike route(1m), the default route has to be spelled-out.
1547 {tunnel ip.tun0 negotiate tunnel raddr client-inside/32
1548 laddr 0.0.0.0/0} ipsec {encr_algs aes encr_auth_algs sha1}
1550 .in -2
1553 \fBExample 17 \fRTransit VPN router between Two Tunnelled Subnets and a Third
1556 The following example specifies a configuration for a VPN router that routes
1557 between two tunnelled subnets and a third subnet that is on-link. Consider
1558 remote-site A, remote-site B, and local site C, each with a \fB/24\fR address
1559 allocation.
1562 .in +2
1564 # ip.tun0 between me (C) and remote-site A.
1565 # Cover remote-site A to remote-side B.
1566 {tunnel ip.tun0 negotiate tunnel raddr A-prefix/24 laddr
1567 B-prefix/24} ipsec {encr_algs 3des encr_auth_algs md5}
1569 # Cover remote-site A traffic to my subnet.
1570 {tunnel ip.tun0 negotiate tunnel raddr A-prefix/24 laddr
1571 C-prefix/24} ipsec {encr_algs 3des encr_auth_algs md5}
1573 # ip.tun1 between me (C) and remote-site B.
1574 # Cover remote-site B to remote-site A.
1575 {tunnel ip.tun1 negotiate tunnel raddr B-prefix/24 laddr
1576 A-prefix/24} ipsec {encr_algs aes encr_auth_algs sha1}
1578 # Cover remote-site B traffic to my subnet.
1579 {tunnel ip.tun1 negotiate tunnel raddr B-prefix/24 laddr
1580 C-prefix/24} ipsec {encr_algs aes encr_auth_algs md5}
1582 .in -2
1584 .SH FILES
1586 .ne 2
1588 \fB\fB/var/run/ipsecpolicy.conf\fR\fR
1590 .sp .6
1591 .RS 4n
1592 Cache of IPsec policies currently configured for the system, maintained by
1593 \fBipsecconf\fR command. Do not edit this file.
1597 .ne 2
1599 \fB\fB/etc/inet/ipsecinit.conf\fR\fR
1601 .sp .6
1602 .RS 4n
1603 File containing IPsec policies to be installed at system restart by the
1604 \fBpolicy\fR \fBsmf\fR(5) service. See \fBNOTES\fR for more information.
1608 .ne 2
1610 \fB\fB/etc/inet/ipsecinit.sample\fR\fR
1612 .sp .6
1613 .RS 4n
1614 Sample input file for \fBipseconf\fR.
1617 .SH ATTRIBUTES
1620 See \fBattributes\fR(5) for descriptions of the following attributes:
1625 box;
1626 c | c
1627 l | l .
1628 ATTRIBUTE TYPE  ATTRIBUTE VALUE
1630 Interface Stability     Committed
1633 .SH SEE ALSO
1636 \fBauths\fR(1), \fBprofiles\fR(1), \fBsvcprop\fR(1), \fBsvcs\fR(1),
1637 \fBin.iked\fR(1M), \fBinit\fR(1M), \fBifconfig\fR(1M), \fBipsecalgs\fR(1M),
1638 \fBipseckey\fR(1M), \fBsvcadm\fR(1M), \fBsvccfg\fR(1M),
1639 \fBgethostbyname\fR(3NSL), \fBaccept\fR(3SOCKET), \fBconnect\fR(3SOCKET),
1640 \fBgethostbyname\fR(3XNET), \fBgetnetbyname\fR(3XNET),
1641 \fBgetprotobyname\fR(3XNET), \fBgetservbyname\fR(3XNET),
1642 \fBgetaddrinfo\fR(3SOCKET), \fBsocket\fR(3SOCKET), \fBike.config\fR(4),
1643 \fBnsswitch.conf\fR(4), \fBprof_attr\fR(4), \fBuser_attr\fR(4),
1644 \fBattributes\fR(5), \fBrbac\fR(5), \fBsmf\fR(5), \fBipsecah\fR(7P),
1645 \fBipsecesp\fR(7P), \fBpf_key\fR(7P)
1648 Glenn, R. and Kent, S. \fIRFC 2410, The NULL Encryption Algorithm and Its Use
1649 With IPsec\fR. The Internet Society. 1998.
1652 Kent, S. and Atkinson, R. \fIRFC 2402, IP Authentication Header\fR.The Internet
1653 Society. 1998.
1656 Kent, S. and Atkinson, R. \fIRFC 2406, IP Encapsulating Security Payload
1657 (ESP)\fR. The Internet Society. 1998.
1660 Madsen, C. and Glenn, R. \fIRFC 2403, The Use of HMAC-MD5-96 within ESP and
1661 AH\fR. The Internet Society. 1998.
1664 Madsen, C. and Glenn, R. \fIRFC 2404, The Use of HMAC-SHA-1-96 within ESP and
1665 AH\fR. The Internet Society. 1998.
1668 Madsen, C. and Doraswamy, N. \fIRFC 2405, The ESP DES-CBC Cipher Algorithm With
1669 Explicit IV\fR. The Internet Society. 1998.
1672 Pereira, R. and Adams, R. \fIRFC 2451, The ESP CBC-Mode Cipher Algorithms\fR.
1673 The Internet Society. 1998.
1676 Frankel, S. and Kelly, R. Glenn, \fIThe AES Cipher Algorithm and Its Use With
1677 IPsec\fR. 2001.
1678 .SH DIAGNOSTICS
1680 .ne 2
1682 \fBBad "string" on line \fIN\fR.\fR
1686 \fBDuplicate "string" on line \fIN\fR.\fR
1688 .sp .6
1689 .RS 4n
1690 \fIstring\fR refers to one of the names in pattern or properties. A Bad string
1691 indicates that an argument is malformed; a Duplicate string indicates that
1692 there are multiple arguments of a similar type, for example, multiple Source
1693 Address arguments.
1697 .ne 2
1699 \fBInterface name already selected\fR
1701 .sp .6
1702 .RS 4n
1703 Dual use of \fB-i\fR \fIname\fR and \fIname\fR,\fIindex\fR for an index.
1707 .ne 2
1709 \fBError before or at line \fIN\fR.\fR
1711 .sp .6
1712 .RS 4n
1713 Indicates parsing error before or at line \fIN\fR.
1717 .ne 2
1719 \fBNon-existent index\fR
1721 .sp .6
1722 .RS 4n
1723 Reported when the \fIindex\fR for delete is not a valid one.
1727 .ne 2
1729 \fBspd_msg return: File exists\fR
1731 .sp .6
1732 .RS 4n
1733 Reported when there is already a policy entry that matches the traffic of this
1734 new entry.
1737 .SH NOTES
1740 IPsec manual keys are managed by the service management facility, \fBsmf\fR(5).
1741 The services listed below manage the components of IPsec. These services are
1742 delivered as follows:
1744 .in +2
1746 svc:/network/ipsec/policy:default (enabled)
1747 svc:/network/ipsec/ipsecalgs:default (enabled)
1748 svc:/network/ipsec/manual-key:default (disabled)
1749 svc:/network/ipsec/ike:default (disabled)
1751 .in -2
1756 The manual-key service is delivered disabled. The system administrator must
1757 create manual IPsec Security Associations (SAs), as described in
1758 \fBipseckey\fR(1M), before enabling that service.
1761 The policy service is delivered enabled, but without a configuration file, so
1762 that, as a starting condition, packets are not protected by IPsec. After you
1763 create the configuration file \fB/etc/inet/ipsecinit.conf\fR, as described in
1764 this man page, and refresh the service (\fBsvcadm refresh\fR, see below), the
1765 policy contained in the configuration file is applied. If there is an error in
1766 this file, the service enters maintenance mode.
1769 Services that are delivered disabled are delivered that way because the system
1770 administrator must create configuration files for those services before
1771 enabling them. See \fBike.config\fR(4) for the \fBike\fR service.
1774 See \fBipsecalgs\fR(1M) for the \fBipsecalgs\fR service.
1777 The correct administrative procedure is to create the configuration file for
1778 each service, then enable each service using \fBsvcadm\fR(1M).
1781 If the configuration needs to be changed, edit the configuration file then
1782 refresh the service, as follows:
1784 .in +2
1786 example# \fBsvcadm refresh policy\fR
1788 .in -2
1793 The \fBsmf\fR(5) framework will record any errors in the service-specific log
1794 file. Use any of the following commands to examine the \fBlogfile\fR property:
1796 .in +2
1798 example# \fBsvcs -l policy\fR
1799 example# \fBsvcprop policy\fR
1800 example# \fBsvccfg -s policy listprop\fR
1802 .in -2
1807 The following property is defined for the \fBpolicy\fR service:
1809 .in +2
1811 config/config_file
1813 .in -2
1818 This property can be modified using \fBsvccfg\fR(1M) by users who have been
1819 assigned the following authorization:
1821 .in +2
1823 solaris.smf.value.ipsec
1825 .in -2
1830 See \fBauths\fR(1), \fBuser_attr\fR(4), \fBrbac\fR(5).
1833 The service needs to be refreshed using \fBsvcadm\fR(1M) before the new
1834 property is effective. General non-modifiable properties can be viewed with the
1835 \fBsvcprop\fR(1) command.
1837 .in +2
1839 # \fBsvccfg -s ipsec/policy setprop config/config_file = /new/config_file\fR
1840 # \fBsvcadm refresh policy\fR
1842 .in -2
1847 Administrative actions on this service, such as enabling, disabling,
1848 refreshing, and requesting restart can be performed using \fBsvcadm\fR(1M). A
1849 user who has been assigned the authorization shown below can perform these
1850 actions:
1852 .in +2
1854 solaris.smf.manage.ipsec
1856 .in -2
1861 The service's status can be queried using the \fBsvcs\fR(1) command.
1864 The \fBipsecconf\fR command is designed to be managed by the \fBpolicy\fR
1865 \fBsmf\fR(5) service. While the \fBipsecconf\fR command can be run from the
1866 command line, this is discouraged. If the \fBipsecconf\fR command is to be run
1867 from the command line, the \fBpolicy\fR \fBsmf\fR(5) service should be disabled
1868 first. See \fBsvcadm\fR(1M).