<chapter id="ike-task-1"><title>Configuring IKE (Tasks)</title><highlights><para>This chapter describes how to configure IKE for your systems. After
IKE is configured, it automatically generates keying material for IPsec on
your network. This chapter contains the following information:</para><itemizedlist><listitem><para><olink targetptr="ike-task-7" remap="internal">Configuring IKE (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="ike-task-13" remap="internal">Configuring IKE With Preshared
Keys (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="ike-task-12" remap="internal">Configuring IKE With Public
Key Certificates (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="ike-task-38" remap="internal">Configuring IKE for Mobile
Systems (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="ike-task-17" remap="internal">Configuring IKE to Find Attached
Hardware (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="ike-task-19" remap="internal">Changing IKE Transmission Parameters
(Task Map)</olink></para>
</listitem>
</itemizedlist><para>For overview information about IKE, see <olink targetptr="ike-1" remap="internal">Chapter&nbsp;22,
Internet Key Exchange (Overview)</olink>. For reference information about
IKE, see <olink targetptr="ikeref-1" remap="internal">Chapter&nbsp;24, Internet Key Exchange
(Reference)</olink>. For more procedures, see the Examples sections of the <olink targetdoc="refman1m" targetptr="ikeadm-1m" remap="external"><citerefentry><refentrytitle>ikeadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>, <olink targetdoc="refman1m" targetptr="ikecert-1m" remap="external"><citerefentry><refentrytitle>ikecert</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>,  and <olink targetdoc="refman4" targetptr="ike.config-4" remap="external"><citerefentry><refentrytitle>ike.config</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> man pages.</para>
</highlights><sect1 id="ike-task-7"><title>Configuring IKE (Task Map)</title><para>You can use preshared keys, self-signed certificates, and certificates
from a Certificate Authority (CA) to authenticate IKE. A rule links the particular
IKE authentication method with the end points that are being protected. Therefore,
you can use one or all IKE authentication methods on a system. A pointer to
a PKCS&nbsp;#11 library enables certificates to use an attached hardware accelerator.</para><para>After configuring IKE, complete the IPsec
task that uses the IKE configuration. The following table refers you to task
maps that focus on a specific IKE configuration.</para><informaltable frame="all" pgwide="1"><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="23.80*"/><colspec colname="colspec1" colwidth="41.20*"/><colspec colname="colspec2" colwidth="34.00*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Configure IKE with preshared keys</para>
</entry><entry><para>Protects communications between two systems by having the systems share
a secret key.</para>
</entry><entry><para><olink targetptr="ike-task-13" remap="internal">Configuring IKE With Preshared Keys (Task
Map)</olink></para>
</entry>
</row><row><entry><para>Configure IKE with public key certificates</para>
</entry><entry><para>Protects communications with public key certificates. The certificates
can be self-signed, or they can be vouched for by a PKI organization.</para>
</entry><entry><para><olink targetptr="ike-task-12" remap="internal">Configuring IKE With Public Key Certificates
(Task Map)</olink></para>
</entry>
</row><row><entry><para>Cross a NAT boundary</para>
</entry><entry><para>Configures IPsec and IKE to communicate with a mobile system</para>
</entry><entry><para><olink targetptr="ike-task-38" remap="internal">Configuring IKE for Mobile Systems (Task
Map)</olink></para>
</entry>
</row><row><entry><para>Configure IKE to generate and store public key certificates on attached
hardware</para>
</entry><entry><para>Enables a Sun Crypto Accelerator 1000 board or a Sun Crypto Accelerator 4000 board to accelerate IKE operations.
Also enables the Sun Crypto Accelerator 4000 board to store public key certificates.</para>
</entry><entry><para><olink targetptr="ike-task-17" remap="internal">Configuring IKE to Find Attached Hardware
(Task Map)</olink></para>
</entry>
</row><row><entry><para>Tune Phase 1 key negotiation parameters</para>
</entry><entry><para>Changes the timing of IKE key negotiations.</para>
</entry><entry><para><olink targetptr="ike-task-19" remap="internal">Changing IKE Transmission Parameters
(Task Map)</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="ike-task-13"><title>Configuring IKE With Preshared Keys
(Task Map)</title><para>The following table points to procedures to configure and maintain
IKE with preshared keys.</para><informaltable frame="all" pgwide="1"><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="24.60*"/><colspec colname="colspec1" colwidth="40.60*"/><colspec colname="colspec2" colwidth="33.80*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Configure IKE with preshared keys</para>
</entry><entry><para>Creates an IKE policy file and one key to be shared.</para>
</entry><entry><para><olink targetptr="ike-task-24" remap="internal">How to Configure IKE With Preshared Keys</olink></para>
</entry>
</row><row><entry><para>Refresh preshared keys on a running IKE system</para>
</entry><entry><para>Adds fresh keying material for IKE on communicating systems.</para>
</entry><entry><para><olink targetptr="ike-task-10" remap="internal">How to Refresh IKE Preshared Keys</olink></para>
</entry>
</row><row><entry><para>Add preshared keys to a running IKE system</para>
</entry><entry><para>Adds a new IKE policy entry and new keying material to a system that
is currently enforcing IKE policy.</para>
</entry><entry><para><olink targetptr="ike-task-18" remap="internal">How to Add an IKE Preshared Key for a
New Policy Entry in ipsecinit.conf</olink></para>
</entry>
</row><row><entry><para>Check that preshared keys are identical</para>
</entry><entry><para>Displays the preshared keys on both systems to see that the keys are
identical.</para>
</entry><entry><para><olink targetptr="ike-task-44" remap="internal">How to Verify That IKE Preshared Keys
Are Identical</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="ike-task-15"><title>Configuring IKE With Preshared Keys</title><para>Preshared keys is the simplest authentication method for IKE. If you
are configuring two systems to use IKE, and you are the administrator for
both of the systems, using preshared keys is a good choice. However, unlike
public key certificates, preshared keys are tied to particular IP addresses.
Preshared keys cannot be used with mobile systems or systems that might be
renumbered. Also, when you use preshared keys, you cannot offload IKE computations
to attached hardware.</para><task id="ike-task-24"><title>How to Configure IKE With Preshared Keys</title><tasksummary><para>The IKE implementation offers algorithms whose keys vary in length.
The key length that you choose is determined by site security. In general,
longer keys provide more security than shorter keys.</para><para>These procedures use the system names <literal>enigma</literal> and <literal>partym</literal>.
Substitute the names of your systems for the names <literal>enigma</literal> and <literal>partym</literal>.</para>
</tasksummary><procedure><step><para>On the system console, assume the Primary Administrator role or
become superuser.</para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><note><para>Logging in remotely exposes security-critical traffic to eavesdropping.
Even if you somehow protect the remote login, the security of the system is
reduced to the security of the remote login session.</para>
</note>
</step><step><para>On each system, copy the file <filename>/etc/inet/ike/config.sample</filename> to
the file <filename>/etc/inet/ike/config</filename>. </para>
</step><step id="ike-task-config-1"><para>Enter rules and global parameters in the <filename>ike/config</filename> file
on each system.</para><para>The rules and global parameters in this file should
permit the IPsec policy in the system's <filename>ipsecinit.conf</filename> file
to succeed. The following <filename>ike/config</filename> examples work with
the <filename>ipsecinit.conf</filename> examples in <olink targetptr="ipsec-mgtasks-3" remap="internal">How to Secure Traffic Between Two Systems With
IPsec</olink>.</para><substeps><step><para>For example, modify the <filename>/etc/inet/ike/config</filename> file
on the <literal>enigma</literal> system:</para><screen>### ike/config file on enigma, 192.168.116.16

## Global parameters
#
## Phase 1 transform defaults
p1_lifetime_secs 14400
p1_nonce_len 40
#
## Defaults that individual rules can override.
p1_xform
  { auth_method preshared oakley_group 5 auth_alg sha encr_alg des }
p2_pfs 2
#
<userinput>## The rule to communicate with partym
#  Label must be unique
{ label "enigma-partym"
  local_addr 192.168.116.16
  remote_addr 192.168.13.213
  p1_xform
   { auth_method preshared oakley_group 5 auth_alg md5 encr_alg 3des }
  p2_pfs 5
}</userinput></screen><note><para>All arguments to the <literal>auth_method</literal> parameter
must be on the same line. </para>
</note>
</step><step><para>Modify the <filename>/etc/inet/ike/config</filename> file on the <literal>partym</literal> system:</para><screen>### ike/config file on partym, 192.168.13.213
## Global Parameters
#
p1_lifetime_secs 14400
p1_nonce_len 40
#
p1_xform
  { auth_method preshared oakley_group 5 auth_alg sha encr_alg des }
p2_pfs 2

<userinput>## The rule to communicate with enigma
#  Label must be unique
{ label "partym-enigma"
  local_addr 192.168.13.213
  remote_addr 192.168.116.16
p1_xform
   { auth_method preshared oakley_group 5 auth_alg md5 encr_alg 3des }
p2_pfs 5
}</userinput></screen>
</step>
</substeps>
</step><step><para>On each system, check the validity of the file.</para><screen># <userinput>/usr/lib/inet/in.iked -c -f /etc/inet/ike/config</userinput></screen>
</step><step id="ike-task-gennumber-1"><para>Generate random numbers for use as keying material. </para><para>If
your site has a random number generator, use that generator. On a Solaris
system, you can use the <command>od</command> command. For example, the following
command prints two lines of hexadecimal numbers:</para><screen>% <userinput>od -X -A n /dev/random | head -2</userinput>
         f47cb0f4 32e14480 951095f8 2b735ba8
         0a9467d0 8f92c880 68b6a40e 0efe067d</screen><para>For an explanation of the <command>od</command> command, see <olink targetptr="ipsec-mgtasks-12" remap="internal">How to Generate Random Numbers on a Solaris System</olink> and
the <olink targetdoc="refman1" targetptr="od-1" remap="external"><citerefentry><refentrytitle>od</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man page.</para><note><para>Other operating systems can require
ASCII keying material. To generate the identical key in hexadecimal and ASCII
formats, see <olink targetptr="iketask-key-ex-1" remap="internal">Example 23&ndash;1</olink>.</para>
</note>
</step><step><para>From the output of <olink targetptr="ike-task-gennumber-1" remap="internal">Step&nbsp;5</olink>, construct one key.</para><screen>f47cb0f432e14480951095f82b735ba80a9467d08f92c88068b6a40e</screen><para>The authentication algorithm in this procedure is MD5, as shown in <olink targetptr="ike-task-config-1" remap="internal">Step&nbsp;3</olink>. The size of the hash, that
is, the size of the authentication algorithm's output, determines the minimum
recommended size of a preshared key. The output of the MD5 algorithm is 128
bits, or 32 characters. The example key is 56 characters long, which provides
additional keying material for IKE to use.</para>
</step><step><para>Create the file <filename>/etc/inet/secret/ike.preshared</filename> on
each system.</para><para>Put the preshared key in each file.</para><substeps><step><para>For example, on the <literal>enigma</literal> system, the <filename>ike.preshared</filename> file would appear similar to the following:</para><screen># ike.preshared on enigma, 192.168.116.16
#&hellip;
{ localidtype IP
	localid 192.168.116.16
	remoteidtype IP
	remoteid 192.168.13.213
	# enigma and partym's shared key in hex (192 bits)
	key f47cb0f432e14480951095f82b735ba80a9467d08f92c88068b6a40e
	}</screen>
</step><step><para>On the <literal>partym</literal> system, the <filename>ike.preshared</filename> file would appear similar to the following:</para><screen># ike.preshared on partym, 192.168.13.213
#&hellip;
{ localidtype IP
	localid 192.168.13.213
	remoteidtype IP
	remoteid 192.168.116.16
	# partym and enigma's shared key in hex (192 bits)
	key f47cb0f432e14480951095f82b735ba80a9467d08f92c88068b6a40e
	}</screen>
</step>
</substeps><note><para>The preshared keys on each system must be identical.</para>
</note>
</step>
</procedure><example id="iketask-key-ex-1"><title>Generating Identical Key Material for Two Systems With Different Operating
Systems</title><para>Solaris IPsec interoperates with other operating systems. If your
system is communicating with a system that requires ASCII preshared keys,
you need to generate one key in two formats, ASCII and hexadecimal.</para><para>In this example, the Solaris system administrator wants 56 characters
of keying material. The administrator uses the following command to generate
a hexadecimal key from an ASCII passphrase. The option <option>tx1</option> prints
the bytes one at a time on all Solaris systems.</para><screen># <userinput>/bin/echo "papiermache with cashews and\c" | od -tx1 | cut -c 8-55 | \</userinput>
<userinput>tr -d '\n' | tr -d ' ' | awk '{print}'</userinput>
7061706965726d616368652077697468206361736865777320616e64</screen><para>By removing the offsets and concatenating the hexadecimal output, the
hexadecimal key for the Solaris system is <literal>7061706965726d616368652077697468206361736865777320616e64</literal>. The administrator places this value in the <filename>ike.preshared</filename> file
on the Solaris system.</para><screen># Shared key in hex (192 bits)
key 7061706965726d616368652077697468206361736865777320616e64</screen><para>On the system that requires ASCII preshared keys, the passphrase is
the preshared key. The Solaris system administrator telephones the other administrator
with the passphrase, <literal>papiermache with cashews and</literal>.</para>
</example>
</task><task id="ike-task-10"><title>How to Refresh IKE Preshared Keys</title><tasksummary><para>This procedure assumes that you want to replace an existing preshared
key at regular intervals without rebooting. If you use a strong encryption
algorithm, such 3DES or Blowfish, you might want to refresh keys just before
you reboot both systems.</para>
</tasksummary><procedure><step><para>On the system console, assume the Primary Administrator role or
become superuser.</para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><note><para>Logging in remotely exposes security-critical traffic to eavesdropping.
Even if you somehow protect the remote login, the security of the system is
reduced to the security of the remote login session.</para>
</note>
</step><step><para>Generate random numbers and construct a key of the appropriate
length.</para><para>For details, see <olink targetptr="ipsec-mgtasks-12" remap="internal">How
to Generate Random Numbers on a Solaris System</olink>.  If you are generating a preshared key for
a Solaris system that is communicating with an operating system that requires
ASCII, see <olink targetptr="iketask-key-ex-1" remap="internal">Example 23&ndash;1</olink>.</para>
</step><step><para>Replace the current key with a new key.</para><para>For example,
on the hosts <literal>enigma</literal> and <literal>partym</literal>,
you would replace the value of <literal>key</literal> in the <filename>/etc/inet/secret/ike.preshared</filename> file with a new number of the same length.</para>
</step><step><para>Check the privilege level of the <command>in.iked</command> daemon.</para><screen># <userinput>/usr/sbin/ikeadm get priv</userinput>
Current privilege level is 0x0, base privileges enabled</screen><para>You can change the keying material if the command returns a privilege
level of <literal>0x1</literal> or <literal>0x2</literal>. Level <literal>0x0</literal> does
not permit operations to modify or view keying material. By default, the <command>in.iked</command> daemon runs at the <literal>0x0</literal> level of privilege.</para><stepalternatives><step><para>If the privilege level is <literal>0x0</literal>, kill and restart
the daemon.</para><para>When the daemon restarts, it reads the new version
of the <filename>ike.preshared</filename> file.</para><screen># <userinput>pkill in.iked</userinput>
# <userinput>/usr/lib/inet/in.iked</userinput></screen>
</step><step><para>If the privilege level is <literal>0x1</literal> or <literal>0x2</literal>,
read in the new version of the <filename>ike.preshared</filename> file.</para><screen># <userinput>ikeadm read preshared</userinput></screen>
</step>
</stepalternatives>
</step>
</procedure>
</task><task id="ike-task-18"><title>How to Add an IKE Preshared Key for a New Policy
Entry in <command>ipsecinit.conf</command></title><tasksummary><para>You must have one preshared key for every policy entry in the <filename>ipsecinit.conf</filename> file. If you add a new policy entry while IPsec and IKE are running,
the <command>in.iked</command> daemon can read in new keys.</para>
</tasksummary><taskprerequisites><para>This procedure assumes the following:</para><itemizedlist><listitem><para>The <literal>enigma</literal> system is set up as described
in <olink targetptr="ike-task-24" remap="internal">How to Configure IKE With Preshared Keys</olink>.</para>
</listitem><listitem><para>The <literal>enigma</literal> system is going to protect
its traffic with a new system, <literal>ada</literal>.</para>
</listitem><listitem><para>The <command>in.iked</command> daemon is running on both systems.</para>
</listitem><listitem><para>The systems' interfaces are included as entries in the <filename>/etc/hosts</filename> file on both systems. The following entry is an example.</para><screen>192.168.15.7 ada
192.168.116.16 enigma</screen><para>This procedure also works with an IPv6 address.  In Solaris Express, Developer Edition 2/07, IPv6 addresses are placed in the <filename>/etc/hosts</filename> file.</para>
</listitem><listitem><para>You have added a new policy entry to the <filename>/etc/inet/ipsecinit.conf</filename> file on both systems. The entries appear similar to the following:</para><screen># ipsecinit.conf file for enigma
{laddr enigma raddr ada} ipsec {auth_algs any encr_algs any sa shared}</screen><screen># ipsecinit.conf file for ada
{laddr ada raddr enigma} ipsec {auth_algs any encr_algs any sa shared}</screen>
</listitem>
</itemizedlist>
</taskprerequisites><procedure><step><para>On the system console, assume the Primary Administrator role or
become superuser.</para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><note><para>Logging in remotely exposes security-critical traffic to eavesdropping.
Even if you somehow protect the remote login, the security of the system is
reduced to the security of the remote login session.</para>
</note>
</step><step id="ike-task-rule-1"><para>Create a rule for IKE to manage the keys
for <literal>enigma</literal> and <literal>ada</literal>.</para><substeps><step><para>For example, the rule in the <filename>/etc/inet/ike/config</filename> file
on the <literal>enigma</literal> system appears similar to the following:</para><screen>### ike/config file on enigma, 192.168.116.16
&hellip;
## The rule to communicate with ada

{label "enigma-to-ada"
 local_addr 192.168.116.16
 remote_addr 192.168.15.7
 p1_xform
 {auth_method preshared oakley_group 5 auth_alg md5 encr_alg blowfish}
 p2_pfs 5
	}</screen>
</step><step><para>The rule in the <filename>/etc/inet/ike/config</filename> file
on the <literal>ada</literal> system appears similar to the following:</para><screen>### ike/config file on ada, 192.168.15.7
&hellip;
## The rule to communicate with enigma

{label "ada-to-enigma"
 local_addr 192.168.15.7
 remote_addr 192.168.116.16
 p1_xform
 {auth_method preshared oakley_group 5 auth_alg md5 encr_alg blowfish}
 p2_pfs 5
}</screen>
</step>
</substeps>
</step><step><para>Check the privilege level of the <command>in.iked</command> daemon.</para><screen># <userinput>/usr/sbin/ikeadm get priv</userinput>
Current privilege level is 0x0, base privileges enabled</screen><stepalternatives><step><para>If the privilege level is <literal>0x1</literal> or <literal>0x2</literal>,
continue with the next step.</para>
</step><step><para>If the privilege level is <literal>0x0</literal>, stop the daemon.
Then, restart the daemon with the appropriate privilege level.</para><screen># <userinput>pkill in.iked</userinput>
# <userinput>/usr/lib/inet/in.iked -p 2</userinput>
Setting privilege level to 2!</screen>
</step>
</stepalternatives>
</step><step><para>Generate random numbers and construct a key of 64 to 448 bits.</para><para>For details, see <olink targetptr="ipsec-mgtasks-12" remap="internal">How to Generate
Random Numbers on a Solaris System</olink>.  If you are generating a preshared key for a Solaris system
that is communicating with an operating system that requires ASCII, see <olink targetptr="iketask-key-ex-1" remap="internal">Example 23&ndash;1</olink>.</para>
</step><step><para>By some means, send the key to the administrator of the remote
system.</para><para>You both need to add the same preshared key at the same
time. Your key is only as safe as the safety of your transmission mechanism.
An out-of-band mechanism, such as registered mail or a protected fax machine,
is best.</para>
</step><step><para>Add the new keying material with the <command>add preshared</command> subcommand
in <command>ikeadm</command> command mode.</para><screen>ikeadm> add preshared { localidtype <replaceable>id-type</replaceable> localid <replaceable>id</replaceable>
remoteidtype <replaceable>id-type</replaceable> remoteid <replaceable>id</replaceable> ike_mode <replaceable>mode</replaceable> key <replaceable>key</replaceable> }</screen><variablelist><varlistentry><term><replaceable>id-type</replaceable></term><listitem><para>Specifies the type of the <replaceable>id</replaceable>.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>id</replaceable></term><listitem><para>Specifies the IP address when <replaceable>id-type</replaceable> is
IP.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>mode</replaceable></term><listitem><para>Specifies the IKE mode. The only accepted value is <literal>main</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>key</replaceable></term><listitem><para>Specifies the preshared key in hexadecimal format.</para>
</listitem>
</varlistentry>
</variablelist><substeps><step><para>For example, on host <literal>enigma</literal>, you would
add the key for the remote system, <literal>ada</literal>, and exit
the <command>ikeadm</command> interactive mode.</para><screen># <userinput>ikeadm</userinput>
ikeadm> <userinput>add preshared { localidtype ip localid 192.168.116.16</userinput>
<userinput>remoteidtype ip remoteid 192.168.15.7</userinput>
<userinput>key 8d1fb4ee500e2bea071deb2e781cb48374411af5a9671714672bb1749ad9364d }</userinput>
ikeadm: Successfully created new preshared key.
ikeadm> <userinput>exit</userinput>
#</screen>
</step><step><para>On host <literal>ada</literal>, you would add the identical
key for the remote system, <literal>enigma</literal>, and exit the interactive
mode.</para><screen># <userinput>ikeadm</userinput>
ikeadm> <userinput>add preshared { localidtype ip localid 192.168.15.7</userinput>
<userinput>remoteidtype ip remoteid 192.168.116.16</userinput>
<userinput>key 8d1fb4ee500e2bea071deb2e781cb48374411af5a9671714672bb1749ad9364d }</userinput>
ikeadm: Successfully created new preshared key.
ikeadm> <userinput>exit</userinput>
#</screen>
</step>
</substeps>
</step><step><para>On each system, lower the privilege level of the <command>in.iked</command> daemon.</para><screen># <userinput>ikeadm set priv base</userinput></screen>
</step><step><para>On each system, activate the <filename>ipsecinit.conf</filename> file
to secure the added interface.</para><screen># <userinput>ipsecconf -a /etc/inet/ipsecinit.conf</userinput></screen><caution><para>Read the warning when you execute the <command>ipsecconf</command> command.
The same warning applies to restarting the <command>in.iked</command> daemon.
A socket that is already latched, that is, the socket is in use, provides
an unsecured back door into the system. For more extensive discussion, see <olink targetptr="ipsecref-42" remap="internal">Security Considerations for ipsecinit.conf and ipsecconf</olink>.</para>
</caution>
</step><step><para>On each system, read in the new rules by using the <command>ikeadm</command> command.</para><screen># <userinput>ikeadm read rules</userinput></screen><para>You created the rules in <olink targetptr="ike-task-rule-1" remap="internal">Step&nbsp;2</olink>.
Because the rules are in the <filename>/etc/inet/ike/config</filename> file,
the name of the file does not have to be specified to the <command>ikeadm</command> command.</para>
</step><step><para>Ensure that IKE preshared keys are available at reboot.</para><para>Add
the keys to the <filename>/etc/inet/secret/ike.preshared</filename> file.</para><substeps><step><para>For example, on the <literal>enigma</literal> system, you
would add the following keying information to the <filename>ike.preshared</filename> file:</para><screen># ike.preshared on enigma for the ada interface
#&hellip;
{ localidtype IP
  localid 192.168.116.16
  remoteidtype IP
  remoteid 192.168.15.7
  # enigma and ada's shared key in hex (32 - 448 bits required)
  key 8d1fb4ee500e2bea071deb2e781cb48374411af5a9671714672bb1749ad9364d
}</screen>
</step><step><para>On the <literal>ada</literal> system, you would add the
following keying information to the <filename>ike.preshared</filename> file:</para><screen># ike.preshared on ada for the enigma interface
#&hellip;
{ localidtype IP
  localid 192.168.15.7
  remoteidtype IP
  remoteid 192.168.116.16
  # ada and enigma's shared key in hex (32 - 448 bits required)
  key 8d1fb4ee500e2bea071deb2e781cb48374411af5a9671714672bb1749ad9364d
}</screen>
</step>
</substeps>
</step><step><para>Verify that the systems can communicate.</para><para>See <olink targetptr="ike-task-44" remap="internal">How to Verify That IKE Preshared Keys Are Identical</olink>.</para>
</step>
</procedure>
</task><task id="ike-task-44"><title>How to Verify That IKE Preshared Keys
Are Identical</title><tasksummary><para>If the preshared keys on the communicating systems are not identical,
the systems cannot authenticate.</para>
</tasksummary><taskprerequisites><para>IPsec has been configured and is enabled between the two systems that
you are testing.</para>
</taskprerequisites><procedure><step><para>On the system console, assume the Primary Administrator role or
become superuser.</para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><note><para>Logging in remotely exposes security-critical traffic to eavesdropping.
Even if you somehow protect the remote login, the security of the system is
reduced to the security of the remote login session.</para>
</note>
</step><step><para>Check the privilege level of the <command>in.iked</command> daemon.</para><screen># <userinput>/usr/sbin/ikeadm get priv</userinput>
Current privilege level is 0x0, base privileges enabled</screen><stepalternatives><step><para>If the privilege level is <literal>0x1</literal> or <literal>0x2</literal>,
continue with the next step.</para>
</step><step><para>If the privilege level is <literal>0x0</literal>, stop the daemon.
Then, restart the daemon with the appropriate privilege level.</para><screen># <userinput>pkill in.iked</userinput>
# <userinput>/usr/lib/inet/in.iked -p 2</userinput>
Setting privilege level to 2!</screen>
</step>
</stepalternatives>
</step><step><para>On each system, view the preshared key information.</para><screen># <userinput>ikeadm dump preshared</userinput>
PSKEY: Preshared key (24 bytes): f47cb&hellip;/192
LOCIP: AF_INET: port 0, 192.168.116.16 (enigma).
REMIP: AF_INET: port 0, 192.168.13.213 (partym).</screen>
</step><step><para>Compare the two dumps.</para><para>If the preshared keys are not
identical, replace one key with the other key in the <filename>/etc/inet/secret/ike.preshared</filename> file.</para>
</step><step><para>When the verification is complete, lower the privilege level of
the <command>in.iked</command> daemon on each system.</para><screen># <userinput>ikeadm set priv base</userinput></screen>
</step>
</procedure>
</task>
</sect1><sect1 id="ike-task-12"><title>Configuring IKE With Public Key Certificates
(Task Map)</title><para>The following table provides pointers to procedures for creating
public key certificates for IKE. The procedures include how to accelerate
and store the certificates on attached hardware.</para><informaltable frame="all" pgwide="1"><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="27.40*"/><colspec colname="colspec1" colwidth="42.43*"/><colspec colname="colspec2" colwidth="29.17*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Configure IKE with self-signed public key certificates</para>
</entry><entry><para>Creates and places two certificates on each system:</para><itemizedlist><listitem><para>A self-signed certificate</para>
</listitem><listitem><para>The public key certificate from the remote system</para>
</listitem>
</itemizedlist>
</entry><entry><para><olink targetptr="ike-task-42" remap="internal">How to Configure IKE With Self-Signed
Public Key Certificates</olink></para>
</entry>
</row><row><entry><para>Configure IKE with a PKI Certificate Authority</para>
</entry><entry><para>Creates a certificate request, and then places three certificates on
each system:</para><itemizedlist><listitem><para>The  certificate that the Certificate Authority (CA) creates
from your request</para>
</listitem><listitem><para>The public key certificate from the CA</para>
</listitem><listitem><para>The CRL from the CA</para>
</listitem>
</itemizedlist>
</entry><entry><para><olink targetptr="ike-task-41" remap="internal">How to Configure IKE With Certificates
Signed by a CA</olink></para>
</entry>
</row><row><entry><para>Configure public key certificates on local hardware</para>
</entry><entry><para>Involves one of: </para><itemizedlist><listitem><para>Generating a self-signed certificate on the local hardware
and then adding the public key from a remote system to the hardware.</para>
</listitem><listitem><para>Generating a certificate request on the local hardware and
then adding the public key certificates from the CA to the hardware.</para>
</listitem>
</itemizedlist>
</entry><entry><para><olink targetptr="ike-task-14" remap="internal">How to Generate and Store Public Key
Certificates on Hardware</olink></para>
</entry>
</row><row><entry><para>Update the certificate revocation list (CRL) from a PKI</para>
</entry><entry><para>Accesses the CRL from a central distribution point.</para>
</entry><entry><para><olink targetptr="ike-task-22" remap="internal">How to Handle a Certificate Revocation
List</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="ike-task-25"><title>Configuring IKE With Public Key Certificates</title><para>Public key certificates eliminate the need for communicating systems
to share secret keying material out of band. Unlike preshared keys, a public
key certificate can be used on a mobile machine or on a system that might
be renumbered.</para><para>Public key certificates can also be stored on attached hardware. For
the procedure, see <olink targetptr="ike-task-17" remap="internal">Configuring IKE to Find
Attached Hardware (Task Map)</olink>.</para><task id="ike-task-42"><title>How to Configure IKE With Self-Signed Public
Key Certificates</title><tasksummary><para>Self-signed certificates require less overhead than public certificates
from a CA, but do not scale very easily.</para>
</tasksummary><procedure><step><para>On the system console, assume the Primary Administrator role or
become superuser.</para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><note><para>Logging in remotely exposes security-critical traffic to eavesdropping.
Even if you somehow protect the remote login, the security of the system is
reduced to the security of the remote login session.</para>
</note>
</step><step id="ike-task-step-ksgen-1"><para>Add a self-signed certificate to the <filename class="directory">ike.privatekeys</filename> database. </para><screen># ikecert certlocal -ks|-kc -m <replaceable>keysize</replaceable> -t <replaceable>keytype</replaceable> \
-D <replaceable>dname</replaceable> -A <replaceable>altname</replaceable> \
[<option>S</option> <replaceable>validity-start-time</replaceable>] [<option>F</option> <replaceable>validity-end-time</replaceable>] [<option>T</option> <replaceable>token-ID</replaceable></screen><variablelist><varlistentry><term><option>ks</option></term><listitem><para>Creates a self-signed certificate.</para>
</listitem>
</varlistentry><varlistentry><term><option>kc</option></term><listitem><para>Creates a certificate request. For the procedure, see <olink targetptr="ike-task-41" remap="internal">How to Configure IKE With Certificates Signed by a
CA</olink>.</para>
</listitem>
</varlistentry><varlistentry><term><option>m</option> <replaceable>keysize</replaceable></term><listitem><para>Is the size of the key. The <replaceable>keysize</replaceable> can
be 512, 1024, 2048, 3072, or 4096.</para>
</listitem>
</varlistentry><varlistentry><term><option>t</option> <replaceable>keytype</replaceable></term><listitem><para>Specifies the type of algorithm to use. The <replaceable>keytype</replaceable> can
be <literal>rsa-sha1</literal>, <literal>rsa-md5</literal>, or <literal>dsa-sha1</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><option>D</option> <replaceable>dname</replaceable></term><listitem><para>Is the X.509 distinguished name for the certificate subject.
The <replaceable>dname</replaceable> typically has the form: C=country, O=organization,
OU=organizational unit, CN=common name. Valid tags are C, O, OU, and CN.</para>
</listitem>
</varlistentry><varlistentry><term><option>A</option> <replaceable>altname</replaceable></term><listitem><para>Is the alternate name for the certificate. The <replaceable>altname</replaceable> is in the form of <literal>tag=value</literal>. Valid tags
are <literal>IP</literal>, <literal>DNS</literal>, <literal>email</literal>, and <literal>DN</literal>.</para>
</listitem>
</varlistentry><varlistentry><term><option>S</option> <replaceable>validity-start-time</replaceable></term><listitem><para>Provides an absolute or relative valid start time for the
certificate.</para>
</listitem>
</varlistentry><varlistentry><term><option>F</option> <replaceable>validity-end-time</replaceable></term><listitem><para>Provides an absolute or relative valid end time for the certificate.</para>
</listitem>
</varlistentry><varlistentry><term><option>T</option> <replaceable>token-ID</replaceable></term><listitem><para>Enables a PKCS&nbsp;#11 hardware token to generate the keys.
The certificates are then stored in the hardware.</para>
</listitem>
</varlistentry>
</variablelist><substeps><step><para>For example, the command on the <literal>partym</literal> system
would appear similar to the following:</para><screen># <userinput>ikecert certlocal -ks -m 1024 -t rsa-md5 \</userinput>
<userinput>-D "C=US, O=PartyCompany, OU=US-Partym, CN=Partym" \</userinput>
<userinput>-A IP=192.168.13.213</userinput>
Creating software private keys.
  Writing private key to file /etc/inet/secret/ike.privatekeys/0.
Enabling external key providers - done.
Acquiring private keys for signing - done.
Certificate: 
 Proceeding with the signing operation.
 Certificate generated successfully (&hellip;/publickeys/0)
Finished successfully.
Certificate added to database.
-----BEGIN X509 CERTIFICATE-----
MIICLTCCAZagAwIBAgIBATANBgkqhkiG9w0BAQQFADBNMQswCQYDVQQGEwJVUzEX
&hellip;
6sKTxpg4GP3GkQGcd0r1rhW/3yaWBkDwOdFCqEUyffzU
-----END X509 CERTIFICATE-----</screen>
</step><step><para>The command on the <literal>enigma</literal> system would
appear similar to the following:</para><screen># <userinput>ikecert certlocal -ks -m 1024 -t rsa-md5 \</userinput>
<userinput>-D "C=JA, O=EnigmaCo, OU=JA-Enigmax, CN=Enigmax" \</userinput>
<userinput>-A IP=192.168.116.16</userinput>
Creating software private keys.
  &hellip;
Certificate added to database.
-----BEGIN X509 CERTIFICATE-----
MIICKDCCAZGgAwIBAgIBATANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzEV
&hellip;
jpxfLM98xyFVyLCbkr3dZ3Tvxvi732BXePKF2A==
-----END X509 CERTIFICATE-----</screen>
</step>
</substeps>
</step><step><para>Save the certificate and send it to the remote system.</para><para>You
can paste the certificate into an email.</para><substeps><step><para>For example, you would send the following <literal>partym</literal> certificate
to the <literal>enigma</literal> administrator:</para><screen>To: admin@ja.enigmaexample.com
From: admin@us.partyexample.com
Message: -----BEGIN X509 CERTIFICATE-----
MIICLTCCAZagAwIBAgIBATANBgkqhkiG9w0BAQQFADBNMQswCQYDVQQGEwJVUzEX
&hellip;
6sKTxpg4GP3GkQGcd0r1rhW/3yaWBkDwOdFCqEUyffzU
-----END X509 CERTIFICATE-----</screen>
</step><step><para>The <literal>enigma</literal> administrator would send you
the following <literal>enigma</literal> certificate:</para><screen>To: admin@us.partyexample.com
From: admin@ja.enigmaexample.com
Message: -----BEGIN X509 CERTIFICATE-----
MIICKDCCAZGgAwIBAgIBATANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzEV
&hellip;
jpxfLM98xyFVyLCbkr3dZ3Tvxvi732BXePKF2A==
-----END X509 CERTIFICATE-----</screen>
</step>
</substeps>
</step><step id="iketask-verify-cert-1"><para>Verify with the other administrator that
the keys have not been tampered with.</para><para>For example, you can phone
the other administrator to compare the values of the public key hash. The
public key hash for the shared certificate should be identical on the two
systems. </para><substeps><step><para>List the stored certificate on your system.</para><para>For example,
on the <literal>partym</literal> system, the public certificate is in
slot 1, and the private certificate is in slot 0.</para><screen>partym # <userinput>ikecert certdb -l</userinput>
Certificate Slot Name: 0   Type: rsa-md5 <lineannotation>Private Key</lineannotation>
    Subject Name: &lt;C=US, O=PartyCompany, OU=US-Partym, CN=Partym>
    Key Size: 1024
    Public key hash: B2BD13FCE95FD27ECE6D2DCD0DE760E2

Certificate Slot Name: 1   Type: rsa-md5 <lineannotation>Public Certificate</lineannotation>
    (Private key in certlocal slot 0) <lineannotation>Points to certificate's private key</lineannotation>
    Subject Name: &lt;C=JA, O=EnigmaCo, OU=JA-Enigmax, CN=Enigmax>
    Key Size: 1024
    Public key hash: <userinput>2239A6A127F88EE0CB40F7C24A65B818</userinput></screen>
</step><step><para>Compare this value with the public key hash on the <literal>enigma</literal> system.</para><para>You can read the public key hash over the phone.</para><screen>enigma # <userinput>ikecert certdb -l</userinput>
Certificate Slot Name: 4   Type: rsa-md5 <lineannotation>Private Key</lineannotation>
    Subject Name: &lt;C=JA, O=EnigmaCo, OU=JA-Enigmax, CN=Enigmax>
    Key Size: 1024
    Public key hash: DF3F108F6AC669C88C6BD026B0FCE3A0

Certificate Slot Name: 5   Type: rsa-md5 <lineannotation>Public Certificate</lineannotation>
    (Private key in certlocal slot 4)
    Subject Name: &lt;C=US, O=PartyCompany, OU=US-Partym, CN=Partym>
    Key Size: 1024
    Public key hash: <userinput>2239A6A127F88EE0CB40F7C24A65B818</userinput></screen>
</step>
</substeps>
</step><step><para>On each system, trust both certificates.</para><para>Edit the <filename>/etc/inet/ike/config</filename> file to recognize the certificates.</para><para>The administrator of the remote system provides the values for
the <literal>cert_trust</literal>, <literal>remote_addr</literal>, and <literal>remote_id</literal> parameters.</para><substeps><step><para>For example, on the <literal>partym</literal> system, the <filename>ike/config</filename> file would appear similar to the following:</para><screen># Explicitly trust the following self-signed certs
# Use the Subject Alternate Name to identify the cert

# Verified remote address and remote ID
# Verified public key hash per phone call from administrator
cert_trust "192.168.13.213" <lineannotation>Local system's certificate Subject Alt Name</lineannotation>
cert_trust "192.168.116.16" <lineannotation>Remote system's certificate Subject Alt Name</lineannotation>

## Parameters that may also show up in rules.

p1_xform 
  { auth_method preshared oakley_group 5 auth_alg sha encr_alg des }
p2_pfs 5

{
 label "US-partym to JA-enigmax"
 local_id_type dn
 local_id "C=US, O=PartyCompany, OU=US-Partym, CN=Partym"
 remote_id "C=JA, O=EnigmaCo, OU=JA-Enigmax, CN=Enigmax"

 local_addr  192.168.13.213
 remote_addr 192.168.116.16

 p1_xform
  {auth_method rsa_sig oakley_group 2 auth_alg md5 encr_alg 3des}
}</screen>
</step><step><para>On the <literal>enigma</literal> system, add <literal>enigma</literal> values
for local parameters in the <filename>ike/config</filename> file.</para><para>For
the remote parameters, use <literal>partym</literal> values. Ensure that
the value for the <literal>label</literal> keyword is unique. This value must
be different from the remote system's <literal>label</literal> value.</para><screen>&hellip;
{
 label "JA-enigmax to US-partym"
 local_id_type dn
 local_id "C=JA, O=EnigmaCo, OU=JA-Enigmax, CN=Enigmax"
 remote_id "C=US, O=PartyCompany, OU=US-Partym, CN=Partym"

 local_addr  192.168.116.16
 remote_addr 192.168.13.213
&hellip;</screen>
</step>
</substeps>
</step><step><para>On each system, add the certificate that you received. </para><substeps><step><para>Copy the public key from the administrator's email.</para>
</step><step><para>Type the <command>ikecert certdb -a</command> command and press
the <keysym>Return</keysym> key. </para><para>No prompts display when you
press the <keysym>Return</keysym> key.</para><screen># <userinput>ikecert certdb -a</userinput> <lineannotation>Press the Return key</lineannotation></screen>
</step><step><para>Paste the public key. Then press the <keysym>Return</keysym> key.
To end the entry, press <keysym>Control</keysym>-D.</para><screen><userinput>-----BEGIN X509 CERTIFICATE-----
MIIC&hellip;
&hellip;
----END X509 CERTIFICATE-----</userinput> <lineannotation>Press the Return key</lineannotation>
<userinput>&lt;Control>-D</userinput></screen>
</step>
</substeps>
</step>
</procedure><example id="ike-task-51"><title>Giving a Start Time and an End Time to a Certificate</title><para>The administrator on the machine <literal>partym</literal> establishes
dates within which the certificate is valid. The certificate is backdated
by 2 1/2 days, and is valid for 4 years and 6 months from the date of creation.</para><screen># <userinput>ikecert certlocal -ks -m 1024 -t rsa-md5 \</userinput>
<userinput>-D "C=US, O=PartyCompany, OU=US-Partym, CN=Partym" \</userinput>
<userinput>-A IP=192.168.13.213 \</userinput>
<userinput>-S -2d12h -F +4y6m</userinput></screen><para>The administrator on the machine <literal>enigma</literal> establishes
dates within which the certificate is valid. The certificate is backdated
by 2 days, and is valid until midnight of December 31, 2010.</para><screen># <userinput>ikecert certlocal -ks -m 1024 -t rsa-md5 \</userinput>
<userinput>-D "C=JA, O=EnigmaCo, OU=JA-Enigmax, CN=Enigmax" \</userinput>
<userinput>-A IP=192.168.116.16 \</userinput>
<userinput>-S -2d -F "12/31/2010 12:00 AM"</userinput></screen>
</example>
</task><task id="ike-task-41"><title>How to Configure IKE With Certificates
Signed by a CA</title><tasksummary><para>Public certificates from a Certificate Authority (CA) require negotiation
with an outside organization. The certificates very easily scale to protect
a large number of communicating systems.</para>
</tasksummary><procedure><step><para>On the system console, assume the Primary Administrator role or
become superuser.</para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><note><para>Logging in remotely exposes security-critical traffic to eavesdropping.
Even if you somehow protect the remote login, the security of the system is
reduced to the security of the remote login session.</para>
</note>
</step><step><para>Use the <command>ikecert certlocal -kc</command> command to create
a certificate request.</para><para>For a description of the arguments to the
command, see <olink targetptr="ike-task-step-ksgen-1" remap="internal">Step&nbsp;2</olink> in <olink targetptr="ike-task-42" remap="internal">How to Configure IKE With Self-Signed Public Key Certificates</olink>.</para><screen># ikecert certlocal -kc -m <replaceable>keysize</replaceable> -t <replaceable>keytype</replaceable> \
-D <replaceable>dname</replaceable> -A <replaceable>altname</replaceable></screen><substeps><step><para>For example, the following command creates a certificate request
on the <literal>partym</literal> system:</para><screen># <userinput>ikecert certlocal -kc -m 1024 -t rsa-md5 \</userinput>
> <userinput>-D "C=US, O=PartyCompany\, Inc., OU=US-Partym, CN=Partym" \</userinput>
> <userinput>-A "DN=C=US, O=PartyCompany\, Inc., OU=US-Partym"</userinput>
Creating software private keys.
  Writing private key to file /etc/inet/secret/ike.privatekeys/2.
Enabling external key providers - done.
Certificate Request: 
  Proceeding with the signing operation.
  Certificate request generated successfully (&hellip;/publickeys/0)
Finished successfully.
-----BEGIN CERTIFICATE REQUEST-----
MIIByjCCATMCAQAwUzELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFEV4YW1wbGVDb21w
&hellip;
lcM+tw0ThRrfuJX9t/Qa1R/KxRlMA3zckO80mO9X
-----END CERTIFICATE REQUEST-----</screen>
</step><step><para>The following command creates a certificate request on the <literal>enigma</literal> system:</para><screen># <userinput>ikecert certlocal -kc -m 1024 -t rsa-md5 \</userinput>
> <userinput>-D "C=JA, O=EnigmaCo\, Inc., OU=JA-Enigmax, CN=Enigmax" \</userinput>
> <userinput>-A "DN=C=JA, O=EnigmaCo\, Inc., OU=JA-Enigmax"</userinput>
Creating software private keys.
&hellip;
Finished successfully.
-----BEGIN CERTIFICATE REQUEST-----
MIIBuDCCASECAQAwSTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDFBhcnR5Q29tcGFu
&hellip;
8qlqdjaStLGfhDOO
-----END CERTIFICATE REQUEST-----</screen>
</step>
</substeps>
</step><step id="ike-task-pki-1"><para>Submit the certificate request to a PKI organization.</para><para>The PKI organization can tell you how to submit the certificate
request. Most organizations have a web site with a submission form. The form
requires proof that the submission is legitimate. Typically, you paste your
certificate request into the form. When your request has been checked by the
organization, the organization issues you the following two certificate objects
and a list of revoked certificates:</para><itemizedlist><listitem><para>Your public key certificate &ndash; This certificate is based
on the request that you submitted to the organization. The request that you
submitted is part of this public key certificate. The certificate uniquely
identifies you.</para>
</listitem><listitem><para>A Certificate Authority &ndash; The organization's signature.
The CA verifies that your public key certificate is legitimate.</para>
</listitem><listitem><para>A Certificate Revocation List (CRL) &ndash; The latest list
of certificates that the organization has revoked. The CRL is not sent separately
as a certificate object if access to the CRL is embedded in the public key
certificate.</para><para>When a URI for the CRL is embedded in the public
key certificate, IKE can automatically retrieve the CRL for you. Similarly,
when a DN (directory name on an LDAP server) entry is embedded in the public
key certificate, IKE can retrieve and cache the CRL from an LDAP server that
you specify.</para><para>See <olink targetptr="ike-task-22" remap="internal">How to Handle
a Certificate Revocation List</olink> for an example of an embedded URI and
an embedded DN entry in a public key certificate.</para>
</listitem>
</itemizedlist>
</step><step><para>Add each certificate to your system.</para><para>The <option>a</option> option
to the <command>ikecert certdb -a</command> adds the pasted object to the
appropriate certificate database on your system. For more information, see <olink targetptr="ike-29" remap="internal">IKE With Public Key Certificates</olink>.</para><substeps><step><para>On the system console, assume the Primary Administrator role or
become superuser.</para>
</step><step><para>Add the public key certificate that you received from the PKI
organization.</para><screen># <userinput>ikecert certdb -a</userinput>
<lineannotation>Press the Return key</lineannotation>
<lineannotation>Paste the certificate:</lineannotation>
<userinput>-----BEGIN X509 CERTIFICATE-----
&hellip;
-----END X509 CERTIFICATE----</userinput>
<lineannotation>Press the Return key</lineannotation>
<userinput>&lt;Control>-D</userinput></screen>
</step><step><para>Add the CA from the PKI organization.</para><screen># <userinput>ikecert certdb -a</userinput>
<lineannotation>Press the Return key</lineannotation>
<lineannotation>Paste the CA:</lineannotation>
<userinput>-----BEGIN X509 CERTIFICATE-----
&hellip;
-----END X509 CERTIFICATE----</userinput>
<lineannotation>Press the Return key</lineannotation>
<userinput>&lt;Control>-D</userinput></screen>
</step><step><para>If the PKI organization has sent a list of revoked certificates,
add the CRL to the <literal>certrldb</literal> database:</para><screen># <userinput>ikecert certrldb -a</userinput>
<lineannotation>Press the Return key</lineannotation>
<lineannotation>Paste the CRL:</lineannotation>
<userinput>-----BEGIN CRL-----
&hellip;
-----END CRL----</userinput>
<lineannotation>Press the Return key</lineannotation>
<userinput>&lt;Control>-D</userinput></screen>
</step>
</substeps>
</step><step><para>Use the <literal>cert_root</literal> keyword to identify the PKI
organization in the <filename>/etc/inet/ike/config</filename> file.</para><para>Use
the name that the PKI organization provides.</para><substeps><step><para>For example, the <filename>ike/config</filename> file on the <literal>partym</literal> system
might appear similar to the following:</para><screen># Trusted root cert
# This certificate is from Example PKI
# This is the X.509 distinguished name for the CA that it issues.

<userinput>cert_root "C=US, O=ExamplePKI\, Inc., OU=PKI-Example, CN=Example PKI"</userinput>

## Parameters that may also show up in rules.

p1_xform 
 { auth_method rsa_sig oakley_group 1 auth_alg sha1 encr_alg des }
p2_pfs 2

{
 label "US-partym to JA-enigmax - Example PKI"
 local_id_type dn
 local_id  "C=US, O=PartyCompany, OU=US-Partym, CN=Partym"
 remote_id "C=JA, O=EnigmaCo, OU=JA-Enigmax, CN=Enigmax"

 local_addr  192.168.13.213
 remote_addr 192.168.116.16

 p1_xform
  {auth_method rsa_sig oakley_group 2 auth_alg md5 encr_alg 3des}
}</screen><note><para>All arguments to the <literal>auth_method</literal> parameter
must be on the same line. </para>
</note>
</step><step><para>On the <literal>enigma</literal> system, create a similar
file.</para><para>Specifically, the <literal>enigma</literal> <filename>ike/config</filename> file should do the following:</para><itemizedlist><listitem><para>Include the same <literal>cert_root</literal> value.</para>
</listitem><listitem><para>Use <literal>enigma</literal> values for local parameters.</para>
</listitem><listitem><para>Use <literal>partym</literal> values for remote parameters.</para>
</listitem><listitem><para>Create a unique value for the <literal>label</literal> keyword.
This value must be different from the remote system's <literal>label</literal> value.</para>
</listitem>
</itemizedlist><screen>&hellip;
cert_root "C=US, O=ExamplePKI\, Inc., OU=PKI-Example, CN=Example PKI"
&hellip;
{
 label "JA-enigmax to US-partym - Example PKI"
 local_id_type dn
 local_id   "C=JA, O=EnigmaCo, OU=JA-Enigmax, CN=Enigmax"
 remote_id  "C=US, O=PartyCompany, OU=US-Partym, CN=Partym"
 
 local_addr  192.168.116.16
 remote_addr 192.168.13.213
&hellip;</screen>
</step>
</substeps>
</step><step id="ike-task-trcert-1"><para>Tell IKE how to handle CRLs.</para><para>Choose the appropriate
option:</para><stepalternatives><step><para>No CRL available</para><para>If the PKI organization does not
provide a CRL, add the keyword <literal>ignore_crls</literal> to the <filename>ike/config</filename> file.</para><screen># Trusted root cert
&hellip;
cert_root "C=US, O=ExamplePKI\, Inc., OU=PKI-Example,&hellip;
<userinput>ignore_crls</userinput>
&hellip;</screen><para>The <literal>ignore_crls</literal> keyword tells IKE not to search for
CRLs.</para>
</step><step><para>CRL available</para><para>If the PKI organization provides a central
distribution point for CRLs, you can modify the <filename>ike/config</filename> file
to point to that location.</para><para>See <olink targetptr="ike-task-22" remap="internal">How
to Handle a Certificate Revocation List</olink> for examples.</para>
</step>
</stepalternatives>
</step>
</procedure><example id="ike-task-45"><title>Using <literal>rsa_encrypt</literal> When Configuring IKE</title><para>When you use <literal>auth_method rsa_encrypt</literal> in the <filename>ike/config</filename> file, you must add the peer's certificate to the <filename>publickeys</filename> database.</para><orderedlist><listitem><para>Send the certificate to the remote system's administrator. </para><para>You can paste the certificate into an email.</para><para>For example,
the <literal>partym</literal> administrator would send the following email:</para><screen>To: admin@ja.enigmaexample.com
From: admin@us.partyexample.com
Message: -----BEGIN X509 CERTIFICATE-----
MII&hellip;
----END X509 CERTIFICATE-----</screen><para>The <literal>enigma</literal> administrator would send the following
email:</para><screen>To: admin@us.partyexample.com
From: admin@ja.enigmaexample.com
Message: -----BEGIN X509 CERTIFICATE-----
MII
&hellip;
-----END X509 CERTIFICATE-----</screen>
</listitem><listitem><para>On each system, add the emailed certificate to the local <filename>publickeys</filename> database. </para><screen># <userinput>ikecert certdb -a</userinput>
<lineannotation>Press the Return key</lineannotation>
<userinput>-----BEGIN X509 CERTIFICATE-----
MII&hellip;
-----END X509 CERTIFICATE-----</userinput>
<lineannotation>Press the Return key</lineannotation>
<userinput>&lt;Control>-D</userinput></screen>
</listitem>
</orderedlist><para>The authentication method for RSA encryption hides identities in IKE
from eavesdroppers. Because the <literal>rsa_encrypt</literal> method hides
the peer's identity, IKE cannot retrieve the peer's certificate. As a result,
the <literal>rsa_encrypt</literal> method requires that the IKE peers know
each other's public keys.</para><para>Therefore, when you use an <literal>auth_method</literal> of <literal>rsa_encrypt</literal> in the <filename>/etc/inet/ike/config</filename> file, you must
add the peer's certificate to the <filename>publickeys</filename> database.
The <filename>publickeys</filename> database then holds three certificates
for each communicating pair of systems:</para><itemizedlist><listitem><para>Your public key certificate</para>
</listitem><listitem><para>The CA certificate</para>
</listitem><listitem><para>The peer's public key certificate</para>
</listitem>
</itemizedlist><para><emphasis role="strong">Troubleshooting &ndash;</emphasis> The
IKE payload, which includes the three certificates, can become too large for <literal>rsa_encrypt</literal> to encrypt. Errors such as &ldquo;authorization failed&rdquo;
and &ldquo;malformed payload&rdquo; can indicate that the <literal>rsa_encrypt</literal> method
cannot encrypt the total payload. Reduce the size of the payload by using
a method, such as <literal>rsa_sig</literal>, that requires only two certificates.</para>
</example>
</task><task id="ike-task-14"><title>How to Generate and Store Public Key Certificates
on Hardware</title><tasksummary><para>Generating and storing public key certificates on hardware is similar
to generating and storing public key certificates on your system. On hardware, the <command>ikecert certlocal</command> and <command>ikecert certdb</command> commands must identify the hardware. The <option>T</option> option
with the token ID identifies the hardware to the commands.</para>
</tasksummary><taskprerequisites><itemizedlist><listitem><para>The hardware must be configured.</para>
</listitem><listitem><para>The hardware
uses the <filename>/usr/lib/libpkcs11.so</filename> library unless the <literal>pkcs11_path</literal> keyword in the <filename class="directory">/etc/inet/ike/config</filename> file points
to a different library. The library must be implemented according
to the following standard: RSA Security Inc. PKCS&nbsp;#11 Cryptographic Token
Interface (Cryptoki), that is, a PKCS&nbsp;#11 library.</para><para>See <olink targetptr="ike-task-11" remap="internal">How to Configure IKE to Find
the Sun Crypto Accelerator 4000 Board</olink> for setup instructions.</para>
</listitem>
</itemizedlist>
</taskprerequisites><procedure><step><para>On the system console, assume the Primary Administrator role or
become superuser.</para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><note><para>Logging in remotely exposes security-critical traffic to eavesdropping.
Even if you somehow protect the remote login, the security of the system is
reduced to the security of the remote login session.</para>
</note>
</step><step><para>Generate a self-signed certificate or a certificate request, and
specify the token ID.</para><para>Choose one of the following options:</para><note><para>The Sun Crypto Accelerator 4000 board supports keys up to 2048 bits for RSA. For DSA,
this board supports keys up to 1024 bits.</para>
</note><stepalternatives><step><para>For a self-signed certificate, use this syntax.</para><screen># <userinput>ikecert certlocal -ks -m 1024 -t rsa-md5 \</userinput>
> <userinput>-D "C=US, O=PartyCompany, OU=US-Partym, CN=Partym" \</userinput>
> <userinput>-a -T dca0-accel-stor IP=192.168.116.16</userinput>
Creating hardware private keys.
Enter PIN for PKCS#11 token: <lineannotation>Type user:password</lineannotation></screen><para>The argument to the <option>T</option> option is the token ID from the
attached Sun Crypto Accelerator 4000 board.</para>
</step><step><para>For a certificate request, use this syntax.</para><screen># <userinput>ikecert certlocal -kc -m 1024 -t rsa-md5 \</userinput>
> <userinput>-D "C=US, O=PartyCompany, OU=US-Partym, CN=Partym" \</userinput>
> <userinput>-a -T dca0-accel-stor IP=192.168.116.16</userinput>
Creating hardware private keys.
Enter PIN for PKCS#11 token: <lineannotation>Type user:password</lineannotation></screen>
</step>
</stepalternatives><para>For a description of the arguments to the <command>ikecert</command> command,
see the <olink targetdoc="refman1m" targetptr="ikecert-1m" remap="external"><citerefentry><refentrytitle>ikecert</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</step><step id="ike-task-pin-1"><para>At the prompt for a PIN, type the Sun Crypto Accelerator 4000 user,
a colon, and the user's password. </para><para>If the Sun Crypto Accelerator 4000 board has a user <literal>ikemgr</literal> whose password is <literal>rgm4tigt</literal>, you would
type the following:</para><screen>Enter PIN for PKCS#11 token: <userinput>ikemgr:rgm4tigt</userinput></screen><note><para>The PIN response is stored on disk <emphasis>as clear text</emphasis>.</para>
</note><para>After you type the password, the certificate prints out:</para><screen>Enter PIN for PKCS#11 token: <userinput>ikemgr:rgm4tigt</userinput>
-----BEGIN X509 CERTIFICATE-----
MIIBuDCCASECAQAwSTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDFBhcnR5Q29tcGFu
&hellip;
oKUDBbZ9O/pLWYGr
-----END X509 CERTIFICATE-----</screen>
</step><step><para>Send your certificate for use by the other party.</para><para>Choose
one of the following options:</para><stepalternatives><step><para>Send the self-signed certificate to the remote system.</para><para>You
can paste the certificate into an email.</para>
</step><step><para>Send the certificate request to an organization that handles PKI.</para><para>Follow the instructions of the PKI organization to submit the certificate
request. For a more detailed discussion, see <olink targetptr="ike-task-pki-1" remap="internal">Step&nbsp;3</olink> of <olink targetptr="ike-task-41" remap="internal">How to Configure IKE With Certificates
Signed by a CA</olink>.</para>
</step>
</stepalternatives>
</step><step><para>On your system, edit the <filename>/etc/inet/ike/config</filename> file
to recognize the certificates.</para><para>Choose one of the following options.</para><stepalternatives><step><para>Self-signed certificate</para><para>Use the values that the administrator
of the remote system provides for the <literal>cert_trust</literal>, <literal>remote_id</literal>, and <literal>remote_addr</literal> parameters. For example, on
the <literal>enigma</literal> system, the <filename>ike/config</filename> file
would appear similar to the following:</para><screen># Explicitly trust the following self-signed certs
# Use the Subject Alternate Name to identify the cert

cert_trust "192.168.116.16"  <lineannotation>Local system's certificate Subject Alt Name</lineannotation>
cert_trust "192.168.13.213"  <lineannotation>Remote system's certificate Subject Alt name</lineannotation>


# Solaris 10 1/06 release: default path does not have to be typed in
#pkcs11_path "/usr/lib/libpkcs11.so" <lineannotation>Hardware connection</lineannotation>

# Solaris 10 release: use this path
#pkcs11_path "/opt/SUNWconn/cryptov2/lib/libvpkcs11.so"
&hellip;
{
 label "JA-enigmax to US-partym"
 local_id_type dn
 local_id "C=JA, O=EnigmaCo, OU=JA-Enigmax, CN=Enigmax"
 remote_id "C=US, O=PartyCompany, OU=US-Partym, CN=Partym"

 local_addr  192.168.116.16
 remote_addr 192.168.13.213

 p1_xform
  {auth_method rsa_sig oakley_group 2 auth_alg md5 encr_alg 3des}
}</screen>
</step><step><para>Certificate request</para><para>Type the name that the PKI organization provides as the value
for the <literal>cert_root</literal> keyword. For example, the <filename>ike/config</filename> file on the <literal>enigma</literal> system might appear
similar to the following:</para><screen># Trusted root cert
# This certificate is from Example PKI
# This is the X.509 distinguished name for the CA that it issues.

cert_root "C=US, O=ExamplePKI\, Inc., OU=PKI-Example, CN=Example PKI"

# Solaris 10 1/06 release: default path does not have to be typed in
#pkcs11_path "/usr/lib/libpkcs11.so" <lineannotation>Hardware connection</lineannotation>

# Solaris 10 release: use this path
#pkcs11_path "/opt/SUNWconn/cryptov2/lib/libvpkcs11.so"
&hellip;
{
 label "JA-enigmax to US-partym - Example PKI"
 local_id_type dn
 local_id "C=JA, O=EnigmaCo, OU=JA-Enigmax, CN=Enigmax"
 remote_id  "C=US, O=PartyCompany, OU=US-Partym, CN=Partym"

 local_addr  192.168.116.16
 remote_addr 192.168.13.213

 p1_xform
  {auth_method rsa_sig oakley_group 2 auth_alg md5 encr_alg 3des}
}</screen>
</step>
</stepalternatives>
</step><step><para>Place the certificates from the other party in the hardware.</para><para>Respond to the PIN request as you responded in <olink targetptr="ike-task-pin-1" remap="internal">Step&nbsp;3</olink>.</para><note><para>You <emphasis>must</emphasis> add the public key certificates
to the same attached hardware that generated your private key.</para>
</note><stepalternatives><step><para>Self-signed certificate.</para><para>Add the remote system's self-signed
certificate. In this
example, the certificate is stored in the file, <filename>DCA.ACCEL.STOR.CERT</filename>.</para><screen># <userinput>ikecert certdb -a -T dca0-accel-stor &lt; DCA.ACCEL.STOR.CERT</userinput>
Enter PIN for PKCS#11 token: <lineannotation>Type user:password</lineannotation></screen><para>If the self-signed certificate used <literal>rsa_encrypt</literal> as
the value for the <literal>auth_method</literal> parameter, add the peer's
certificate to the hardware store.</para>
</step><step><para>Certificates from a PKI organization.</para><para>Add the certificate
that the organization generated from your certificate request, and add the
certificate authority (CA).</para><screen># <userinput>ikecert certdb -a -T dca0-accel-stor &lt; DCA.ACCEL.STOR.CERT</userinput>
Enter PIN for PKCS#11 token: <lineannotation>Type user:password</lineannotation></screen><screen># <userinput>ikecert certdb -a -T dca0-accel-stor &lt; DCA.ACCEL.STOR.CA.CERT</userinput>
Enter PIN for PKCS#11 token: <lineannotation>Type user:password</lineannotation></screen><para>To add a certificate revocation list (CRL) from the PKI organization,
see <olink targetptr="ike-task-22" remap="internal">How to Handle a Certificate Revocation
List</olink>.</para>
</step>
</stepalternatives>
</step>
</procedure>
</task><task id="ike-task-22"><title>How to Handle a Certificate Revocation List</title><tasksummary><para>A certificate revocation list (CRL) contains outdated or compromised
certificates from a Certificate Authority. You have four ways to handle CRLs.</para><itemizedlist><listitem><para>You must instruct IKE to ignore CRLs if your CA organization
does not issue CRLs. This option is shown in <olink targetptr="ike-task-trcert-1" remap="internal">Step&nbsp;6</olink> in <olink targetptr="ike-task-41" remap="internal">How to Configure IKE
With Certificates Signed by a CA</olink>.</para>
</listitem><listitem><para>You can instruct IKE to access the CRLs from a URI (uniform resource
indicator) whose address is embedded in the public key certificate from the
CA.</para>
</listitem><listitem><para>You can instruct IKE to access the CRLs from an LDAP server whose
DN (directory name) entry is embedded in the public key certificate from the
CA.</para>
</listitem><listitem><para>You can provide the CRL as an argument to the <command>ikecert
certrldb</command> command. For an example, see <olink targetptr="ike-task-23" remap="internal">Example
23&ndash;4</olink>.</para>
</listitem>
</itemizedlist><para>The following procedure describes how to instruct IKE to use CRLs from
a central distribution point.</para>
</tasksummary><procedure><step><para>Display the certificate that you received from the CA.</para><screen># ikecert certdb -lv <replaceable>certspec</replaceable></screen><variablelist><varlistentry><term><option>l</option></term><listitem><para>Lists certificates in the IKE certificate database.</para>
</listitem>
</varlistentry><varlistentry><term><option>v</option></term><listitem><para>Lists the certificates in verbose mode. Use this option with
care.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>certspec</replaceable></term><listitem><para>Is a pattern that matches a certificate in the IKE certificate
database.</para>
</listitem>
</varlistentry>
</variablelist><para>For example, the following certificate was issued by Sun Microsystems.
Details have been altered.</para><screen># <userinput>ikecert certdb -lv example-protect.sun.com</userinput>
Certificate Slot Name: 0   Type: dsa-sha1
   (Private key in certlocal slot 0)
 Subject Name: &lt;O=Sun Microsystems Inc, CN=example-protect.sun.com>
 Issuer Name: &lt;CN=Sun Microsystems Inc CA (Cl B), O=Sun Microsystems Inc>
 SerialNumber: 14000D93
   Validity:
      Not Valid Before: 2002 Jul 19th, 21:11:11 GMT
      Not Valid After:  2005 Jul 18th, 21:11:11 GMT
   Public Key Info:
      Public Modulus  (n) (2048 bits): C575A&hellip;A5
      Public Exponent (e) (  24 bits): 010001
   Extensions:
      Subject Alternative Names:
              DNS = example-protect.sun.com
      Key Usage: DigitalSignature KeyEncipherment
      [CRITICAL]
   <userinput>CRL Distribution Points</userinput>:
      Full Name:
         URI = #Ihttp://www.sun.com/pki/pkismica.crl#i
         DN = &lt;CN=Sun Microsystems Inc CA (Cl B), O=Sun Microsystems Inc>
      CRL Issuer: 
      Authority Key ID:
      Key ID:              4F &hellip; 6B
      SubjectKeyID:        A5 &hellip; FD
      Certificate Policies
      Authority Information Access</screen><para>Notice the <literal>CRL Distribution Points</literal> entry. The URI
entry indicates that this organization's CRL is available on the web. The
DN entry indicates that the CRL is available on an LDAP server. Once accessed
by IKE, the CRL is cached for further use.</para><para>To access the CRL,
you need to reach a distribution point.</para>
</step><step><para>Choose one of the following methods to access the CRL from a central
distribution point.</para><stepalternatives><step><para>Use the URI.</para><para>Add the keyword <literal>use_http</literal> to
the host's <filename>/etc/inet/ike/config</filename> file. For example, the <filename>ike/config</filename> file would appear similar to the following:</para><screen># Use CRL from organization's URI
<userinput>use_http</userinput>
&hellip;</screen>
</step><step><para>Use a web proxy.</para><para>Add the keyword <literal>proxy</literal> to
the <filename>ike/config</filename> file. The <literal>proxy</literal> keyword
takes a URL as an argument, as in the following:</para><screen># Use own web proxy
<userinput>proxy "http://proxy1:8080"</userinput></screen>
</step><step><para>Use an LDAP server.</para><para>Name the LDAP server as an argument
to the <literal>ldap-list</literal> keyword in the host's <filename>/etc/inet/ike/config</filename> file. Your organization provides the name of the LDAP server.
The entry in the <filename>ike/config</filename> file would appear similar
to the following:</para><screen># Use CRL from organization's LDAP
ldap-list "ldap1.sun.com:389,ldap2.sun.com"
&hellip;</screen>
</step>
</stepalternatives><para>IKE retrieves the CRL and caches the CRL until the certificate expires.</para>
</step>
</procedure><example id="ike-task-23"><title>Pasting a CRL Into the Local <literal>certrldb</literal> Database</title><para>If the PKI organization's CRL is not available from a central
distribution point, you can add the CRL manually to the local <literal>certrldb</literal> database.
Follow the PKI organization's instructions for extracting the CRL into a file, then add the
CRL to the database with the <command>ikecert certrldb -a</command> command.</para><screen># <userinput>ikecert certrldb -a &lt; Sun.Cert.CRL</userinput></screen>
</example>
</task>
</sect1><sect1 id="ike-task-38"><title>Configuring IKE for Mobile Systems
(Task Map)</title><para>The following table points to procedures to configure IKE to handle
systems that log in remotely to a central site.</para><informaltable frame="all" pgwide="1"><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="33.31*"/><colspec colname="colspec1" colwidth="39.52*"/><colspec colname="colspec2" colwidth="26.17*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Communicate with a central site from off-site</para>
</entry><entry><para>Enables off-site systems to communicate with a central site. The off-site
systems might be mobile.</para>
</entry><entry><para><olink targetptr="ike-task-40" remap="internal">How to Configure IKE for Off-Site Systems</olink></para>
</entry>
</row><row><entry><para>Use a root certificate and IKE on a central system that accepts traffic
from mobile systems</para>
</entry><entry><para>Configures a gateway system to accept IPsec traffic from a system that
does not have a fixed IP address.</para>
</entry><entry><para><olink targetptr="ike-task-39" remap="internal">Example 23&ndash;5</olink></para>
</entry>
</row><row><entry><para>Use a root certificate and IKE on a system that does not have a fixed
IP address</para>
</entry><entry><para>Configures a mobile system to protect its traffic to a central site,
such as company headquarters.</para>
</entry><entry><para><olink targetptr="ike-task-43" remap="internal">Example 23&ndash;6</olink></para>
</entry>
</row><row><entry><para>Use self-signed certificates and IKE on a central system that accepts
traffic from mobile systems</para>
</entry><entry><para>Configures a gateway system with self-signed certificates to accept
IPsec traffic from a mobile system.</para>
</entry><entry><para><olink targetptr="ike-task-47" remap="internal">Example 23&ndash;7</olink></para>
</entry>
</row><row><entry><para>Use self-signed certificates and IKE on a system that does not have
a fixed IP address</para>
</entry><entry><para>Configures a mobile system with self-signed certificates to protect
its traffic to a central site.</para>
</entry><entry><para><olink targetptr="ike-task-49" remap="internal">Example 23&ndash;8</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="ike-task-48"><title>Configuring IKE for Mobile Systems</title><para>When configured properly, home offices and mobile laptops can use IPsec
and IKE to communicate with their company's central computers. A blanket IPsec
policy that is combined with a public key authentication method enables off-site
systems to protect their traffic to a central system.</para><task id="ike-task-40"><title>How to Configure IKE for Off-Site Systems</title><tasksummary><para>IPsec and IKE require a unique ID to identify source and destination.
For off-site or mobile systems that do not have a unique IP address, you must
use another ID type. ID types such as DNS, DN, or email can be used to uniquely
identify a system. </para><para>Off-site or mobile systems that have unique IP addresses are still best
configured with a different ID type. For example, if the systems attempt to
connect to a central site from behind a NAT box, their unique addresses are
not used. A NAT box assigns an arbitrary IP address, which the central system
would not recognize.</para><para>Preshared keys also do not work well as an authentication mechanism
for mobile systems, because preshared keys require fixed IP addresses. Self-signed
certificates, or certificates from a PKI enable mobile systems to communicate
with the central site.</para>
</tasksummary><procedure><step><para>On the system console of the central system, assume the Primary
Administrator role or become superuser.</para><para>The Primary Administrator
role includes the Primary Administrator profile. To create the role and assign
the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><note><para>Logging in remotely exposes security-critical traffic to eavesdropping.
Even if you somehow protect the remote login, the security of the system is
reduced to the security of the remote login session.</para>
</note>
</step><step><para>Configure the central system to recognize mobile systems.</para><substeps><step><para>Set up the <filename>/etc/hosts</filename> file.</para><para>The
central system does not have to recognize specific addresses for the mobile
systems.</para><screen># /etc/hosts on <replaceable>central</replaceable>
<replaceable>central</replaceable> 192.<replaceable>xxx.xxx.x</replaceable></screen>
</step><step><para>Set up the <filename>ipsecinit.conf</filename> file.</para><para>The
central system needs a policy that allows a wide range of IP addresses. Later,
certificates in the IKE policy ensure that the connecting systems are legitimate.</para><screen># /etc/inet/ipsecinit.conf on <replaceable>central</replaceable>
# Keep everyone out unless they use this IPsec policy:
{} ipsec {encr_algs aes encr_auth_algs md5 sa shared}</screen>
</step><step><para>Set up the <filename>ike.config</filename> file.</para><para>DNS
identifies the central system. Certificates are used to authenticate the system.</para><screen>## /etc/inet/ike/ike.config on <replaceable>central</replaceable>
# Global parameters
#
# Find CRLs by URI, URL, or LDAP
# Use CRL from organization's URI
use_http
#
# Use web proxy
proxy "http://<replaceable>somecache.domain:port</replaceable>/"
#
# Use LDAP server
ldap_server   "<replaceable>ldap-server1.domain.org</replaceable>,<replaceable>ldap2.domain.org:port</replaceable>"
#
# List CA-signed certificates
cert_root    "C=US, O=<replaceable>Domain</replaceable> <replaceable>Org</replaceable>, CN=<replaceable>Domain STATE</replaceable>"
#
# List self-signed certificates - trust server and enumerated others
#cert_trust    "DNS=<replaceable>central.domain.org</replaceable>"
#cert_trust    "DNS=<replaceable>mobile.domain.org</replaceable>"
#cert_trust    "DN=CN=<replaceable>Domain Org STATE</replaceable> (<replaceable>CLASS</replaceable>), O=<replaceable>Domain Org</replaceable>
#cert_trust    "email=root@<replaceable>central.domain.org</replaceable>"
#cert_trust    "email=<replaceable>user1@mobile.domain.org</replaceable>"
#

# Rule for mobile systems with certificate
{
  label "Mobile systems with certificate"
  local_id_type DNS

# Any mobile system who knows my DNS or IP can find me.

  local_id "<replaceable>central.domain.org</replaceable>"
  local_addr 192.<replaceable>xxx.xxx.x</replaceable>

# Root certificate ensures trust,
# so allow any remote_id and any remote IP address.
  remote_id ""
  remote_addr 0.0.0.0/0

p2_pfs 5

p1_xform
{auth_method rsa_sig oakley_group 5 encr_alg blowfish auth_alg md5 }
}</screen>
</step>
</substeps>
</step><step><para>Log in to each mobile system, and configure the system to find
the central system.</para><substeps><step><para>Set up the <filename>/etc/hosts</filename> file.</para><para>The <filename>/etc/hosts</filename> file does not need an address for the mobile system,
but can provide one. The file must contain a public IP address for the central
system.</para><screen># /etc/hosts on <replaceable>mobile</replaceable>
<replaceable>mobile</replaceable> 10.<replaceable>x.x.xx</replaceable>
<replaceable>central</replaceable> 192.<replaceable>xxx.xxx.x</replaceable></screen>
</step><step><para>Set up the <filename>ipsecinit.conf</filename> file.</para><para>The
mobile system needs to find the central system by its public IP address. The
systems must configure the same IPsec policy.</para><screen># /etc/inet/ipsecinit.conf on <replaceable>mobile</replaceable>
# Find <replaceable>central</replaceable>
{raddr 192.<replaceable>xxx.xxx.x</replaceable>} ipsec {encr_algs aes encr_auth_algs md5 sa shared}</screen>
</step><step><para>Set up the <filename>ike.config</filename> file. </para><para>The
identifier cannot be an IP address. The following identifiers are valid for
mobile systems:</para><itemizedlist><listitem><para><literal>DN=</literal><replaceable>ldap-directory-name</replaceable></para>
</listitem><listitem><para><literal>DNS=</literal><replaceable>domain-name-server-address</replaceable></para>
</listitem><listitem><para><literal>email=</literal><replaceable>email-address</replaceable></para>
</listitem>
</itemizedlist><para>Certificates are used to authenticate the mobile system.</para><screen>## /etc/inet/ike/ike.config on <replaceable>mobile</replaceable>
# Global parameters
#
# Find CRLs by URI, URL, or LDAP
# Use CRL from organization's URI
use_http
#
# Use web proxy
proxy "http://<replaceable>somecache.domain:port</replaceable>/"
#
# Use LDAP server
ldap_server   "<replaceable>ldap-server1.domain.org</replaceable>,<replaceable>ldap2.domain.org:port</replaceable>"
#
# List CA-signed certificates
cert_root    "C=US, O=<replaceable>Domain</replaceable> <replaceable>Org</replaceable>, CN=<replaceable>Domain STATE</replaceable>"
#
# Self-signed certificates - trust me and enumerated others
#cert_trust    "DNS=<replaceable>mobile.domain.org</replaceable>"
#cert_trust    "DNS=<replaceable>central.domain.org</replaceable>"
#cert_trust    "DN=CN=<replaceable>Domain Org STATE</replaceable> (<replaceable>CLASS</replaceable>), O=<replaceable>Domain Org</replaceable>
#cert_trust    "email=<replaceable>user1@domain.org</replaceable>"
#cert_trust    "email=root@<replaceable>central.domain.org</replaceable>"
#
# Rule for off-site systems with root certificate
{
	label "Off-site <replaceable>mobile</replaceable> with certificate"
	local_id_type DNS

# NAT-T can translate local_addr into any public IP address
# <replaceable>central</replaceable> knows me by my DNS

	local_id "<replaceable>mobile.domain.org</replaceable>"
	local_addr 0.0.0.0/0

# Find <replaceable>central</replaceable> and trust the root certificate
	remote_id "<replaceable>central.domain.org</replaceable>"
	remote_addr 192.<replaceable>xxx.xxx.x</replaceable>

p2_pfs 5

p1_xform
{auth_method rsa_sig oakley_group 5 encr_alg blowfish auth_alg md5 }
}</screen>
</step>
</substeps>
</step><step><para>Reboot each system when it is configured.</para><para>Or, stop
and start the <command>in.iked</command> daemon.</para>
</step>
</procedure><example id="ike-task-39"><title>Configuring a Central Computer to Accept IPsec Traffic From a Mobile
System</title><para>IKE can initiate negotiations from behind a NAT box. However, the ideal
setup for IKE is without an intervening NAT box. In the following example,
root certificates have been issued by a CA. The CA certificates have been
 placed on the mobile system and the central system. A central system accepts IPsec negotiations
from a system behind a NAT box. <literal>main1</literal> is the company
system that can accept connections from off-site systems. To set up the off-site
systems, see <olink targetptr="ike-task-43" remap="internal">Example 23&ndash;6</olink>.</para><screen>## /etc/hosts on main1
main1 192.168.0.100</screen><screen>## /etc/inet/ipsecinit.conf on main1
# Keep everyone out unless they use this IPsec policy:
{} ipsec {encr_algs aes encr_auth_algs md5 sa shared}</screen><screen>## /etc/inet/ike/ike.config on main1
# Global parameters
#
# Find CRLs by URI, URL, or LDAP
# Use CRL from organization's URI
use_http
#
# Use web proxy
proxy "http://cache1.domain.org:8080/"
#
# Use LDAP server
ldap_server   "ldap1.domain.org,ldap2.domain.org:389"
#
# List CA-signed certificate
cert_root "C=US, O=ExamplePKI Inc, OU=PKI-Example, CN=Example PKI"
#
# Rule for off-site systems with root certificate
{
  label "Off-site system with root certificate"
  local_id_type DNS
  local_id "main1.domain.org"
  local_addr 192.168.0.100

# Root certificate ensures trust,
# so allow any remote_id and any remote IP address.
  remote_id ""
  remote_addr 0.0.0.0/0

p2_pfs 5

p1_xform
{auth_method rsa_sig oakley_group 5 encr_alg blowfish auth_alg md5}
p1_xform
{auth_method rsa_sig oakley_group 5 encr_alg 3des auth_alg md5}
p1_xform
{auth_method rsa_sig oakley_group 5 encr_alg blowfish auth_alg sha}
p1_xform
{auth_method rsa_sig oakley_group 5 encr_alg 3des auth_alg sha}
}</screen>
</example><example id="ike-task-43"><title>Configuring a System Behind a NAT With IPsec</title><para>In the following example, root certificates have been issued by a CA
and placed on the mobile system and the central system. <literal>mobile1</literal> is connecting
to the company headquarters from home. The Internet service provider (ISP)
network uses a NAT box to enable the ISP to assign <literal>mobile1</literal> a
private address. The NAT box then translates the private address into a public
IP address that is shared with other ISP network nodes. Company headquarters
is not behind a NAT. For setting up the computer at company headquarters,
see <olink targetptr="ike-task-39" remap="internal">Example 23&ndash;5</olink>.</para><screen>## /etc/hosts on mobile1
mobile1 10.1.3.3
main1 192.168.0.100</screen><screen>## /etc/inet/ipsecinit.conf on mobile1
# Find main1
{raddr 192.168.0.100} ipsec {encr_algs aes encr_auth_algs md5 sa shared}</screen><screen>## /etc/inet/ike/ike.config on mobile1
# Global parameters
#
# Find CRLs by URI, URL, or LDAP
# Use CRL from organization's URI
use_http
#
# Use web proxy
proxy "http://cache1.domain.org:8080/"
#
# Use LDAP server
ldap_server   "ldap1.domain.org,ldap2.domain.org:389"
#
# List CA-signed certificate
cert_root "C=US, O=ExamplePKI Inc, OU=PKI-Example, CN=Example PKI"
#
# Rule for off-site systems with root certificate
{
  label "Off-site mobile1 with root certificate"
  local_id_type DNS
  local_id "mobile1.domain.org"
  local_addr 0.0.0.0/0

# Find main1 and trust the root certificate
  remote_id "main1.domain.org"
  remote_addr 192.168.0.100

p2_pfs 5

p1_xform
{auth_method rsa_sig oakley_group 5 encr_alg blowfish auth_alg md5 }
}</screen>
</example><example id="ike-task-47"><title>Accepting Self-Signed Certificates From a Mobile System</title><para>In the following example, self-signed certificates have been issued
and are on the mobile and the central system. <literal>main1</literal> is
the company system that can accept connections from off-site systems. To set
up the off-site systems, see <olink targetptr="ike-task-49" remap="internal">Example 23&ndash;8</olink>.</para><screen>## /etc/hosts on main1
main1 192.168.0.100</screen><screen>## /etc/inet/ipsecinit.conf on main1
# Keep everyone out unless they use this IPsec policy:
{} ipsec {encr_algs aes encr_auth_algs md5 sa shared}</screen><screen>## /etc/inet/ike/ike.config on main1
# Global parameters
#
# Self-signed certificates - trust me and enumerated others
cert_trust    "DNS=main1.domain.org"
cert_trust    "jdoe@domain.org"
cert_trust    "user2@domain.org"
cert_trust    "user3@domain.org"
#
# Rule for off-site systems with trusted certificate
{
  label "Off-site systems with trusted certificates"
  local_id_type DNS
  local_id "main1.domain.org"
  local_addr 192.168.0.100

# Trust the self-signed certificates
# so allow any remote_id and any remote IP address.
  remote_id ""
  remote_addr 0.0.0.0/0

p2_pfs 5

p1_xform
{auth_method rsa_sig oakley_group 5 encr_alg blowfish auth_alg md5 }
}</screen>
</example><example id="ike-task-49"><title>Using Self-Signed Certificates to Contact a Central System</title><para>In the following example, <literal>mobile1</literal> is connecting
to the company headquarters from home. The certificates have been issued and
placed on the mobile and the central system. The ISP network uses a NAT box
to enable the ISP to assign <literal>mobile1</literal> a private address.
The NAT box then translates the private address into a public IP address that
is shared with other ISP network nodes. Company headquarters is not behind
a NAT. To set up the computer at company headquarters, see <olink targetptr="ike-task-47" remap="internal">Example 23&ndash;7</olink>.</para><screen>## /etc/hosts on mobile1
mobile1 10.1.3.3
main1 192.168.0.100</screen><screen>## /etc/inet/ipsecinit.conf on mobile1
# Find main1
{raddr 192.168.0.100} ipsec {encr_algs aes encr_auth_algs md5 sa shared}</screen><screen>## /etc/inet/ike/ike.config on mobile1
# Global parameters

# Self-signed certificates - trust me and the central system
cert_trust    "jdoe@domain.org"
cert_trust    "DNS=main1.domain.org"
#
# Rule for off-site systems with trusted certificate
{
  label "Off-site mobile1 with trusted certificate"
  local_id_type email
  local_id "jdoe@domain.org"
  local_addr 0.0.0.0/0

# Find main1 and trust the certificate
  remote_id "main1.domain.org"
  remote_addr 192.168.0.100

p2_pfs 5

p1_xform
{auth_method rsa_sig oakley_group 5 encr_alg blowfish auth_alg md5 }
}</screen>
</example>
</task>
</sect1><sect1 id="ike-task-17"><title>Configuring IKE to Find Attached
Hardware (Task Map)</title><para>The following table points to procedures that inform IKE about
attached hardware. You must inform IKE about attached hardware before IKE
can use the hardware. To use the hardware, follow the hardware procedures
in <olink targetptr="ike-task-25" remap="internal">Configuring IKE With Public Key Certificates</olink>.</para><informaltable frame="all" pgwide="1"><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="30.91*"/><colspec colname="colspec1" colwidth="33.00*"/><colspec colname="colspec2" colwidth="35.09*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Offload IKE key operations to the Sun Crypto Accelerator 1000 board</para>
</entry><entry><para>Links IKE to the PKCS&nbsp;#11 library.</para>
</entry><entry><para><olink targetptr="ike-task-32" remap="internal">How to Configure IKE to Find the Sun
Crypto Accelerator 1000 Board</olink></para>
</entry>
</row><row><entry><para>Offload IKE key operations and store the keys on the Sun Crypto Accelerator 4000 board</para>
</entry><entry><para>Links IKE to the PKCS&nbsp;#11 library and lists the name of the attached
hardware.</para>
</entry><entry><para><olink targetptr="ike-task-11" remap="internal">How to Configure IKE to Find the Sun
Crypto Accelerator 4000 Board</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="ike-task-35"><title>Configuring IKE to Find Attached Hardware</title><para>Public key certificates can also be stored on attached hardware,
the Sun Crypto Accelerator 1000 board and the Sun Crypto Accelerator 4000 board. With the Sun Crypto Accelerator 4000 board, public key operations
can also be offloaded from the system to the board.</para><task id="ike-task-32"><title>How to Configure IKE to Find the Sun Crypto Accelerator 1000 Board</title><taskprerequisites><para>The following procedure assumes that a Sun Crypto Accelerator 1000 board is attached to the
system. The procedure also assumes that the software for the board has been
installed and that the software has been configured. For instructions, see
the <citetitle>Sun Crypto Accelerator 1000 Board Version 1.1 Installation
and User's Guide</citetitle>.</para>
</taskprerequisites><procedure><step><para>On the system console, assume the Primary Administrator role or
become superuser.</para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><note><para>Logging in remotely exposes security-critical traffic to eavesdropping.
Even if you somehow protect the remote login, the security of the system is
reduced to the security of the remote login session.</para>
</note>
</step><step><para>Check that the
library is linked.</para><para>Type
the following command to determine whether a PKCS&nbsp;#11 library is linked:</para><screen># <userinput>ikeadm get stats</userinput>
Phase 1 SA counts:
Current:   initiator:          0   responder:          0
Total:     initiator:          0   responder:          0
Attempted: initiator:          0   responder:          0
Failed:    initiator:          0   responder:          0
           initiator fails include 0 time-out(s)
PKCS#11 library linked in from /usr/lib/libpkcs11.so
# </screen>
</step><step><para>Solaris 10 1/06: In this release, you can store keys in the softtoken
keystore.</para><para>For information on the keystore that is provided by
the Solaris cryptographic framework, see the <olink targetdoc="refman1m" targetptr="cryptoadm-1m" remap="external"><citerefentry><refentrytitle>cryptoadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page. For an example
of using the keystore, see <olink targetptr="ike-task-46" remap="internal">Example
23&ndash;9</olink>.</para>
</step>
</procedure>
</task><task id="ike-task-11"><title>How to Configure IKE to Find the Sun Crypto Accelerator 4000 Board</title><taskprerequisites><para>The following procedure assumes that a Sun Crypto Accelerator 4000 board is attached to the
system. The procedure also assumes that the software for the board has been
installed and that the software has been configured. For instructions, see
the <citetitle>Sun Crypto Accelerator 4000 Board Installation and User's Guide</citetitle>.
The guide is available from the <ulink url="http://www.sun.com/products-n-solutions/hardware/docs" type="url">Sun
Hardware Documentation</ulink> web site, under Network and Security Products.</para>
</taskprerequisites><procedure><step><para>On the system console, assume the Primary Administrator role or
become superuser.</para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><note><para>Logging in remotely exposes security-critical traffic to eavesdropping.
Even if you somehow protect the remote login, the security of the system is
reduced to the security of the remote login session.</para>
</note>
</step><step><para>Check that the PKCS&nbsp;#11 library is linked.</para><para>IKE uses the library's
routines to handle key generation and key storage on the Sun Crypto Accelerator 4000 board. Type the following command to determine whether a PKCS&nbsp;#11
library has been linked:</para><screen>$ <userinput>ikeadm get stats</userinput>
&hellip;
PKCS#11 library linked in from /usr/lib/libpkcs11.so
$</screen><note><para>The Sun Crypto Accelerator 4000 board supports keys up to 2048 bits for RSA. For DSA,
this board supports keys up to 1024 bits.</para>
</note>
</step><step><para>Find the token ID for the attached Sun Crypto Accelerator 4000 board.</para><screen>$ <userinput>ikecert tokens</userinput>
Available tokens with library "/usr/lib/libpkcs11.so":

"Sun Metaslot                     "</screen><para>The library returns a token ID, also called a <olink targetptr="glossary-124" remap="internal">keystore name</olink>, of 32 characters. In this
example, you could use the <literal>Sun Metaslot</literal> token
with the <command>ikecert</command> commands to store and to accelerate IKE
keys.</para><para>For instructions on how to use the token, see <olink targetptr="ike-task-14" remap="internal">How to Generate and Store Public Key Certificates
on Hardware</olink>.</para><para>The trailing spaces are automatically padded
by the <command>ikecert</command> command.</para>
</step>
</procedure><example id="ike-task-46"><title>Finding and Using Metaslot Tokens</title><para>Tokens can be stored on disk, on an attached board, or in the softtoken
keystore that the Solaris encryption framework provides. The softtoken keystore
token ID might resemble the following.</para><screen>$ <userinput>ikecert tokens</userinput>
Available tokens with library "/usr/lib/libpkcs11.so":

"Sun Metaslot                   "</screen><para>To create a passphrase for the softtoken keystore, see the <olink targetdoc="refman1" targetptr="pktool-1" remap="external"><citerefentry><refentrytitle>pktool</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man page.</para><para>A command that resembles the following would add a certificate to the
softtoken keystore. <filename>Sun.Metaslot.cert</filename> is a file that contains the CA certificate:</para><screen># <userinput>ikecert certdb -a -T "Sun Metaslot" &lt; Sun.Metaslot.cert</userinput>
Enter PIN for PKCS#11 token: <lineannotation>Type user:passphrase</lineannotation></screen>
</example>
</task>
</sect1><sect1 id="ike-task-19"><title>Changing IKE Transmission Parameters
(Task Map)</title><para>The following table points to procedures to configure transmission
parameters for IKE.</para><informaltable frame="all" pgwide="1"><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="33.33*"/><colspec colname="colspec1" colwidth="30.10*"/><colspec colname="colspec2" colwidth="35.57*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Make key negotiation more efficient</para>
</entry><entry><para>Changes the key negotiation parameters.</para>
</entry><entry><para><olink targetptr="ike-task-34" remap="internal">How to Change the Duration of Phase 1
IKE Key Negotiation</olink></para>
</entry>
</row><row><entry><para>Configure key negotiation to allow for delays in transmission</para>
</entry><entry><para>Lengthens the key negotiation parameters.</para>
</entry><entry><para><olink targetptr="ike-task-26" remap="internal">Example 23&ndash;10</olink></para>
</entry>
</row><row><entry><para>Configure key negotiation to succeed quickly, or to show failures quickly</para>
</entry><entry><para>Shortens the key negotiation parameters.</para>
</entry><entry><para><olink targetptr="ike-task-28" remap="internal">Example 23&ndash;11</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="ike-task-20"><title>Changing IKE Transmission Parameters</title><para>When IKE negotiates keys, the speed of transmission can affect the success
of the negotiation. Normally, you would not need to change the default values
for IKE transmission parameters. However, when optimizing key negotiation
over very dirty lines, or when reproducing a problem, you might want to change
the transmission values.</para><para>Longer duration times enable IKE to negotiate keys over unreliable transmission
lines. You can lengthen certain parameters so that initial attempts succeed.
If the initial attempt does not succeed, you can space subsequent attempts
to offer more time for success.</para><para>Shorter duration times enable you to take advantage of reliable transmission
lines. You can more quickly retry a failed negotiation to speed up the negotiation.
When diagnosing a problem, you might also want to speed up the negotiation
for a quick failure. Shorter durations also enable the Phase 1 SAs to be used
for their lifetime.</para><task id="ike-task-34"><title>How to Change the Duration of Phase
1 IKE Key Negotiation</title><procedure><step><para>On the system console, assume the Primary Administrator role or
become superuser.</para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para><note><para>Logging in remotely exposes security-critical traffic to eavesdropping.
Even if you somehow protect the remote login, the security of the system is
reduced to the security of the remote login session.</para>
</note>
</step><step><para>Change the default values of the global transmission parameters
on each system.</para><para>On each system, modify Phase 1 duration parameters the <filename>/etc/inet/ike/config</filename> file.</para><screen>### ike/config file on <lineannotation>system</lineannotation>

## Global parameters
#
## Phase 1 transform defaults
#
#expire_timer      300
#retry_limit         5
#retry_timer_init    0.5 (integer or float)
#retry_timer_max    30   (integer or float)</screen><variablelist><varlistentry><term><literal>expire_timer</literal></term><listitem><para>The number of seconds to let a not-yet-complete IKE Phase
I negotiation linger before deleting the negotiation attempt. By default,
the attempt lingers for 30 seconds.</para>
</listitem>
</varlistentry><varlistentry><term><literal>retry_limit</literal></term><listitem><para>The number of retransmits before any IKE negotiation is aborted.
By default, IKE tries five times.</para>
</listitem>
</varlistentry><varlistentry><term><literal>retry_timer_init</literal></term><listitem><para>The initial interval between retransmits. This interval is
doubled until the <literal>retry_timer_max</literal>  value is  reached. The
initial interval is 0.5 seconds.</para>
</listitem>
</varlistentry><varlistentry><term><literal>retry_timer_max</literal></term><listitem><para>The maximum interval in seconds between retransmits. The retransmit
interval stops growing at this limit. By default, the limit is 30 seconds.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step><para>Reboot the system.</para><para>Or, stop and start the <command>in.iked</command> daemon.</para>
</step>
</procedure><example id="ike-task-26"><title>Lengthening IKE Phase 1 Negotiation Times</title><para>In the following example, a system is connected to its IKE peers by
a high-traffic transmission line. The original settings are in comments in
the file. The new settings lengthen the negotiation time.</para><screen>### ike/config file on partym
## Global Parameters
#
## Phase 1 transform defaults
#expire_timer   300
#retry_limit      5
#retry_timer_init 0.5 (integer or float)
#retry_timer_max 30   (integer or float)
#
<userinput>expire_timer  600</userinput>
<userinput>retry_limit  10</userinput>
<userinput>retry_timer_init  2.5</userinput>
<userinput>retry_timer_max  180</userinput></screen>
</example><example id="ike-task-28"><title>Shortening IKE Phase 1 Negotiation Times</title><para>In the following example, a system is connected to its IKE peers by
a high-speed line with little traffic. The original settings are in comments
in the file. The new settings shorten the negotiation time.</para><screen>### ike/config file on partym
## Global Parameters
#
## Phase 1 transform defaults
#expire_timer   300
#retry_limit      5
#retry_timer_init 0.5 (integer or float)
#retry_timer_max 30   (integer or float)
#
<userinput>expire_timer  120</userinput>
<userinput>retry_timer_init  0.20</userinput></screen>
</example>
</task>
</sect1>
</chapter>