如果将 IPsec 策略项添加到相同对等方之间的工作配置,则需要刷新 IPsec 策略服务。无需重新配置或重新启动 IKE。
如果将新的对等方添加到 IPsec 策略,则除了进行 IPsec 更改之外,还必须修改 IKEv2 配置。
开始之前
您已更新了对等方系统的 ipsecinit.conf 文件并刷新了 IPsec 策略。
您必须成为分配有 "Network IPsec Management"(网络 IPsec 管理)权限配置文件的管理员。您必须在配置文件 shell 中键入信息。有关更多信息,请参见在 Oracle Solaris 11.2 中确保用户和进程的安全 中的使用所指定的管理权限。
如果执行远程管理,请参见Example 7–1 和在 Oracle Solaris 11.2 中管理安全 Shell 访问 中的如何使用安全 Shell 远程管理 ZFS,了解进行安全远程登录的说明。
# pfedit ikev2.config ## ikev2.config file on enigma, 192.168.116.16 ... ## The rule to communicate with ada ## Label must be unique {label "enigma-ada" auth_method preshared local_addr 192.168.116.16 remote_addr 192.168.15.7 }
有关 pfedit 命令的选项的信息,请参见 pfedit(1M) 手册页。
## ikev2.config file on ada, 192.168.15.7 ... ## The rule to communicate with enigma {label "ada-enigma" auth_method preshared local_addr 192.168.15.7 remote_addr 192.168.116.16 }
# /usr/lib/inet/in.ikev2d -c -f /etc/inet/ike/ikev2.config
# pfedit -s /etc/inet/ike/ikev2.preshared ## ikev2.preshared on enigma for the ada interface ... ## The rule to communicate with ada ## Label must match the label of the rule { label "enigma-ada" # enigma and ada's shared key key "Twas brillig and the slivey toves did *s0mEtHiNg* be CareFULL hEEEr" }
有关 pfedit 命令的选项的信息,请参见 pfedit(1M) 手册页。
# ikev2.preshared on ada for the enigma interface # { label "ada-enigma" # ada and enigma's shared key key "Twas brillig and the slivey toves did *s0mEtHiNg* be CareFULL hEEEr" }
# svcadm refresh ikev2
# svcadm enable ikev2
接下来的步骤
如果建立 IPsec 策略未完成,请返回到 IPsec 过程以启用或刷新 IPsec 策略。有关保护 VPN 的 IPsec 策略的示例,请参见使用 IPsec 保护 VPN。有关 IPsec 策略的其他示例,请参见如何使用 IPsec 保护两台服务器之间的网络通信。