Sun Cluster Geographic Edition 系统管理指南

Procedure如何为安全群集通信配置 IPsec

在 Sun Cluster Geographic Edition 基础结构中,逻辑主机的主机名与群集名称完全一样。逻辑主机名是一种特殊的 HA 资源。根据群集配置情况,您必须为 Sun Cluster Geographic Edition 的各种组件设置多个不同的 IP 地址。

在每个伙伴群集上,必须配置加密和授权,以便在物理节点和逻辑主机名地址之间交换传入和外发包。 在伙伴群集之间,这些地址上的 IPsec 配置参数值必须保持一致。

IPsec 使用两个配置文件:

以下过程将配置群集 cluster-paris 与另一个群集 cluster-newyork 进行 IPsec 安全通信。两个群集均运行 Solaris OS 版本 9。该过程假定 cluster-paris 上的本地逻辑主机名为 lh-paris-1,远程逻辑主机名为 lh-newyork-1。传入的消息将被发送至 lh-paris-1,传出的消息将被发送至 lh-newyork-1

cluster-paris 的每个节点上执行以下过程。

  1. 作为超级用户登录至主群集的第一个节点 phys-paris-1

    有关哪个节点是 phys-paris-1 的提示信息,请参见Sun Cluster Geographic Edition 群集配置示例

  2. 在 IPsec 策略文件中为本地地址和远程地址设置一个条目。

    策略文件位于 /etc/inet/ipsecinit.conf。此文件的权限应为 644。有关此文件的更多信息,请参阅 ipsecconf(1M) 手册页。

    有关 Sun Cluster Geographic Edition 软件支持的名称和值的信息,请参见附录 B,Sun Cluster Geographic Edition 实体合法的名称和值

    1. 配置通信策略。

      tcp_udp 插件的默认端口为 2084。您可以在 etc/cacao/instances/default/modules/com.sun.cluster.geocontrol.xml 文件中指定此值。

      以下命令配置了一个没有设置任何授权或加密算法首选项的策略:


      # {raddr lh-newyork-1 rport 2084} ipsec {auth_algs any encr_algs any \
      sa shared} {laddr lh-paris-1 lport 2084} ipsec {auth_algs any encr_algs \
      any sa shared}
      

      当您在辅助群集 cluster-newyork 上配置通信策略时,必须使用相反的策略。


      # {laddr lh-newyork-1 lport 2084} ipsec {auth_algs any encr_algs \
      any sa shared} {raddr lh-paris-1 rport 2084} ipsec {auth_algs any encr_algs \
      any sa shared}
      
    2. 通过重新引导节点或运行以下命令的方式添加策略。


      # ipsecconf -a /etc/inet/ipsecinit.conf
      
  3. 设置传入和外发通信的加密和授权密钥。

    通信文件位于 /etc/init/secret/ipseckeys。此文件的权限应为 600

    添加密钥:


    # ipseckey -f /etc/init/secret/ipseckeys
    

    密钥条目具有以下常规格式:


    # inbound to cluster-paris
    add esp spi paris-encr-spi dst lh-paris-1 encr_alg paris-encr-algorithm \
    encrkey paris-encrkey-value
    add ah spi newyork-auth-spi dst lh-paris-1 auth_alg paris-auth-algorithm \
    authkey paris-authkey-value
    
    # outbound to cluster-newyork
    add esp spi newyork-encr-spi dst lh-newyork-1 encr_alg newyork-encr-algorithm \
    encrkey newyork-encrkey-value
    add ah spi newyork-auth-spi dst lh-newyork-1 auth_alg newyork-auth-algorithm \
    authkey newyork-authkey-value
    

    有关通信文件的更多信息,请参阅 ipsecconf(1M) 手册页。