Solaris オペレーティングシステムを起動したときに IPsec セキュリティポリシーを呼び出すには、特定の IPsec ポリシーエントリを利用して、IPsec を初期化する構成ファイルを作成します。ファイルの名前は、/etc/inet/ipsecinit.conf とします。ポリシーエントリとその形式の詳細については、ipsecconf(1M) のマニュアルページを参照してください。ポリシーの構成後、ipsecconf コマンドを使用してポリシーを一時的に削除したり、既存の構成を表示したりすることができます。
Solaris ソフトウェアには、IPsec ポリシーファイルの例が含まれています。このサンプルファイルの名前は ipsecinit.sample です。このファイルをテンプレートとして独自の ipsecinit.conf ファイルを作成することができます。ipsecinit.sample ファイルには、次のエントリが含まれています。
# #ident "@(#)ipsecinit.sample 1.6 01/10/18 SMI" # # Copyright (c) 1999,2001 by Sun Microsystems, Inc. # All rights reserved. # # This file should be copied to /etc/inet/ipsecinit.conf to enable IPsec # systemwide policy (and as a side-effect, load IPsec kernel modules). # Even if this file has no entries, IPsec will be loaded if # /etc/inet/ipsecinit.conf exists. # # Add entries to protect the traffic using IPsec. The entries in this # file are currently configured using ipsecconf from inetinit script # after /usr is mounted. # # For example, # # {rport 23} ipsec {encr_algs des encr_auth_algs md5} # # Or, in the older (but still usable) syntax # # {dport 23} apply {encr_algs des encr_auth_algs md5 sa shared} # {sport 23} permit {encr_algs des encr_auth_algs md5} # # will protect the telnet traffic originating from the host with ESP using # DES and MD5. Also: # # {raddr 10.5.5.0/24} ipsec {auth_algs any} # # Or, in the older (but still usable) syntax # # {daddr 10.5.5.0/24} apply {auth_algs any sa shared} # {saddr 10.5.5.0/24} permit {auth_algs any} # # will protect traffic to or from the 10.5.5.0 subnet with AH # using any available algorithm. # # # To do basic filtering, a drop rule may be used. For example: # # {lport 23 dir in} drop {} # {lport 23 dir out} drop {} # # will disallow any remote system from telnetting in. # # # WARNING: This file is read before default routes are established, and # before any naming services have been started. The # ipsecconf(1M) command attempts to resolve names, but it will # fail unless the machine uses files, or DNS and the DNS server # is reachable via routing information before ipsecconf(1M) # invocation. (that is, the DNS server is on-subnet, or DHCP # has loaded up the default router already.) # # It is suggested that for this file, use hostnames only if # they are in /etc/hosts, or use numeric IP addresses. # # If DNS gets used, the DNS server is implicitly trusted, which # could lead to compromise of this machine if the DNS server # has been compromised. # |
たとえば、/etc/inet/ipsecinit.conf ファイルを、NFS マウントファイルシステムから送信すると、ファイル内のデータが不正に変更される可能性があります。また、設定ポリシーも変更される可能性があります。そのため、ipsecinit.conf ファイルのコピーをネットワークで送信しないでください。
TCP ソケットまたは UDP ソケットに対して、 connect(3SOCKET) または accept(3SOCKET) を実行した場合、これらのソケットのポリシーを変更することはできません。ポリシーの変更ができないソケットを、ラッチされたソケットと呼びます。新しいポリシーエントリを追加しても、ラッチされたソケットは変更されません。
ポリシーは通信を開始する前にセットアップしてください。新しいポリシーエントリを追加すると既存の接続が影響を受けることがあるためです。同じ理由から、通信の途中ではポリシーを変更しないでください。
ネーミングシステムを保護してください。次の 2 つの条件に該当する場合、そのホスト名は信頼できません。
ソースアドレスが、ネットワークを介して参照できるホストである
ネーミングシステムの信頼性に問題がある
セキュリティの弱点の多くは、実際のツールではなく、ツールの使用方法にあります。ipsecconf コマンドを使用するときは注意が必要です。安全に操作するため、コンソールなどの、ハード接続の TTY を使用してください。