ソースと宛先を識別するために、IPsec と IKE は一意の ID を必要とします。一意の IP アドレスを持たない遠隔地のシステムまたは移動体システムの場合、別の種類の ID を使用する必要があります。システムを一意に識別するために、DNS、DN、または email などの ID の種類を使用できます。
一意の IP アドレスを持つ遠隔地のシステムまたは移動体システムで、別の種類の ID で構成するようにします。たとえば、システムが NAT 越しに中央システムに接続しようとした場合、そのシステムの一意なアドレスは使用されません。NAT ボックスが任意の IP アドレスを割り当てるため、中央システムは認識できません。
事前共有鍵は固定 IP アドレスを必要とするため、事前共有鍵も移動体システム用の認証メカニズムとしては機能しません。自己署名付き証明書、または CA からの証明書を使用すると、移動体システムは中央サイトと通信できます。
次のタスクマップは、リモートから中央サイトにログインするシステムを処理するために IKEv1 を構成する手順を一覧表示したものです。
|
始める前に
root 役割になる必要があります。詳細は、Oracle Solaris 11.3 でのユーザーとプロセスのセキュリティー保護 の 割り当てられている管理権利の使用を参照してください。リモートで管理する場合は、セキュアなリモートログイン手順について、使用例 27およびOracle Solaris 11.3 での Secure Shell アクセスの管理 の Secure Shell を使用して ZFS をリモートで管理する方法を参照してください。
中央システムには、IP アドレスの広い範囲を許可するポリシーを必要とします。そのあと、IKE ポリシーの証明書で接続システムが合法であることを確認します。
# /etc/inet/ipsecinit.conf on central
# Keep everyone out unless they use this IPsec policy:
{} ipsec {encr_algs aes encr_auth_algs sha256 sa shared}
DNS は中央システムを識別します。証明書を使用して、システムを認証します。
## /etc/inet/ike/ike.config on central
# Global parameters
#
# Find CRLs by URI, URL, or LDAP
# Use CRL from organization's URI
use_http
#
# Use web proxy
proxy "http://somecache.domain:port/"
#
# Use LDAP server
ldap_server "ldap-server1.domain.org,ldap2.domain.org:port"
#
# List CA-signed certificates
cert_root "C=US, O=Domain Org, CN=Domain STATE"
#
# List self-signed certificates - trust server and enumerated others
#cert_trust "DNS=central.domain.org"
#cert_trust "DNS=mobile.domain.org"
#cert_trust "DN=CN=Domain Org STATE (CLASS), O=Domain Org
#cert_trust "email=root@central.domain.org"
#cert_trust "email=user1@mobile.domain.org"
#
# Rule for mobile systems with certificate
{
label "Mobile systems with certificate"
local_id_type DNS
# CA's public certificate ensures trust,
# so allow any remote_id and any remote IP address.
remote_id ""
remote_addr 0.0.0.0/0
p2_pfs 14
p1_xform
{auth_method rsa_sig oakley_group 14 encr_alg aes auth_alg sha256 }
}
/etc/hosts ファイルは、移動体システムのアドレスを必要としませんが、提供は可能です。このファイルは、中央システムの公開 IP アドレスである central を含んでいる必要があります。
# /etc/hosts on mobile central 192.xxx.xxx.x
移動体システムは、公開 IP アドレスで中央システムを見つける必要があります。システムは同じ IPsec ポリシーで構成する必要があります。
# /etc/inet/ipsecinit.conf on mobile
# Find central
{raddr 192.xxx.xxx.x} ipsec {encr_algs aes encr_auth_algs sha256 sa shared}
識別子は IP アドレスであってはなりません。移動体システムに有効な識別子は次のとおりです。
DN=ldap-directory-name
DNS=domain-name-server-address
email=email-address
証明書は、移動体システムである mobile の認証に使用されます。
## /etc/inet/ike/ike.config on mobile
# Global parameters
#
# Find CRLs by URI, URL, or LDAP
# Use CRL from organization's URI
use_http
#
# Use web proxy
proxy "http://somecache.domain:port/"
#
# Use LDAP server
ldap_server "ldap-server1.domain.org,ldap2.domain.org:port"
#
# List CA-signed certificates
cert_root "C=US, O=Domain Org, CN=Domain STATE"
#
# Self-signed certificates - trust me and enumerated others
#cert_trust "DNS=mobile.domain.org"
#cert_trust "DNS=central.domain.org"
#cert_trust "DN=CN=Domain Org STATE (CLASS), O=Domain Org
#cert_trust "email=user1@domain.org"
#cert_trust "email=root@central.domain.org"
#
# Rule for off-site systems with root certificate
{
label "Off-site mobile with certificate"
local_id_type DNS
# NAT-T can translate local_addr into any public IP address
# central knows me by my DNS
local_id "mobile.domain.org"
local_addr 0.0.0.0/0
# Find central and trust the root certificate
remote_id "central.domain.org"
remote_addr 192.xxx.xxx.x
p2_pfs 14
p1_xform
{auth_method rsa_sig oakley_group 14 encr_alg aes auth_alg sha256 }
}
# svcadm enable svc:/network/ipsec/ike:default
IKE は、NAT ボックス越しのネゴシエーションを開始できます。しかし、IKE の理想的な設定は NAT ボックスをはさまないことです。次の例では、CA の公開証明書は移動体システムと中央システムに格納されています。中央システムは NAT 越しのシステムからの IPsec ネゴシエーションを受け入れます。main1 は、遠隔地のシステムからの接続を受け入れることができる会社のシステムです。遠隔地のシステムを設定するには、使用例 44を参照してください。
## /etc/hosts on main1 main1 192.168.0.100
## /etc/inet/ipsecinit.conf on main1
# Keep everyone out unless they use this IPsec policy:
{} ipsec {encr_algs aes encr_auth_algs sha256 sa shared}
## /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=ExampleCA Inc, OU=CA-Example, CN=Example CA"
#
# 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
# CA's public certificate ensures trust,
# so allow any remote_id and any remote IP address.
remote_id ""
remote_addr 0.0.0.0/0
p2_pfs 14
p1_xform
{auth_method rsa_sig oakley_group 14 encr_alg aes auth_alg sha256}
p1_xform
{auth_method rsa_sig oakley_group 14 encr_alg aes auth_alg sha256}
p1_xform
{auth_method rsa_sig oakley_group 14 encr_alg aes auth_alg sha256}
p1_xform
{auth_method rsa_sig oakley_group 14 encr_alg aes auth_alg sha256}
}
使用例 44 NAT 越しのシステムを IPsec と IKEv1 で構成する
次の例では、CA の公開証明書は移動体システムと中央システムに格納されています。mobile1 は、家から会社の本社に接続しています。インターネットサービスプロバイダ (ISP) ネットワークは NAT ボックスを使用しているため、ISP は mobile1 に非公開アドレスを割り当てることができます。NAT ボックスは、非公開アドレスを公開 IP アドレスに変換します。この公開アドレスは、ほかの ISP ネットワークノードと共有されます。企業の本社は NAT を越えません。企業の本社のコンピュータの設定については、使用例 43を参照してください。
## /etc/hosts on mobile1 mobile1 10.1.3.3 main1 192.168.0.100
## /etc/inet/ipsecinit.conf on mobile1
# Find main1
{raddr 192.168.0.100} ipsec {encr_algs aes encr_auth_algs sha256 sa shared}
## /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=ExampleCA Inc, OU=CA-Example, CN=Example CA"
#
# 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 14
p1_xform
{auth_method rsa_sig oakley_group 14 encr_alg aes auth_alg sha256 }
}
使用例 45 移動体システムからの自己署名付き証明書の受け入れ 次の例では、自己署名付き証明書が発行されており、移動体システムと中央システムに格納されています。main1 は、遠隔地のシステムからの接続を受け入れることができる会社のシステムです。遠隔地のシステムを設定するには、使用例 46を参照してください。
## /etc/hosts on main1 main1 192.168.0.100
## /etc/inet/ipsecinit.conf on main1
# Keep everyone out unless they use this IPsec policy:
{} ipsec {encr_algs aes encr_auth_algs sha256 sa shared}
## /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 14
p1_xform
{auth_method rsa_sig oakley_group 14 encr_alg aes auth_alg sha256 }
}
使用例 46 自己署名付き証明書による中央システムとの接続
次の例では、mobile1 は家から会社の本社に接続しています。自己署名付き証明書が発行されており、移動体システムと中央システムに格納されています。ISP ネットワークは NAT ボックスを使用しているため、ISP は mobile1 に非公開アドレスを割り当てることができます。NAT ボックスは、非公開アドレスを公開 IP アドレスに変換します。この公開アドレスは、ほかの ISP ネットワークノードと共有されます。企業の本社は NAT を越えません。企業の本社のコンピュータを設定するには、使用例 45を参照してください。
## /etc/hosts on mobile1 mobile1 10.1.3.3 main1 192.168.0.100
## /etc/inet/ipsecinit.conf on mobile1
# Find main1
{raddr 192.168.0.100} ipsec {encr_algs aes encr_auth_algs sha256 sa shared}
## /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 14
p1_xform
{auth_method rsa_sig oakley_group 14 encr_alg aes auth_alg sha256 }
}
次のステップ
IPsec ポリシーの設定がまだ完了していない場合、IPsec の手順に戻って IPsec ポリシーを有効にするかリフレッシュしてください。VPN を保護する IPsec ポリシーの例については、IPsec による VPN の保護を参照してください。IPsec ポリシーのその他の例については、IPsec によって 2 つのサーバー間でネットワークトラフィックをセキュリティー保護する方法を参照してください。