本节说明如何配置 SGD Gateway 使用的连接。
介绍了以下配置任务:
配置客户端设备与 SGD Gateway 之间的连接涉及以下配置任务:
(可选)配置 SGD Gateway 使用的端口和连接。
在安装 SGD Gateway 时配置了这些设置。
要更改这些设置,请参见第 2.2.1.1 节 “如何配置 SGD Gateway 的端口和连接”。
(可选)在 SGD Gateway 上,安装用于客户端连接的 SSL 证书。
仅当要更改安装 SGD Gateway 期间进行的设置时才需要执行此过程。
在 SGD Gateway 主机上,以超级用户 (root) 身份登录。
运行 gateway config create 命令。
# /opt/SUNWsgdg/bin/gateway config create
回答屏幕上的问题以配置以下各项:
SGD Gateway 端口设置。SGD Gateway 用于传入连接的接口和端口。
网络入口点。客户端设备用于连接到 SGD Gateway 的 IP 地址或 DNS 名称和端口。它并非总是与 SGD Gateway 的地址相同。可以是负载平衡器的地址,也可以是其他外部设备的地址,具体取决于网络配置。
安全连接。是否保护 SGD Gateway 与阵列中的 SGD 服务器之间的连接安全。要使用安全连接,阵列中的 SGD 服务器必须在安全模式下运行。
保存连接和端口设置。
SGD Gateway 将使用输入的设置进行配置。
SGD Gateway 用于客户端连接的 SSL 证书称为 SGD Gateway SSL 证书。SSL 证书存储在客户端密钥库 /opt/SUNWsgdg/proxy/etc/keystore.client
中。
默认情况下,SGD Gateway 使用自签名 SGD Gateway SSL 证书进行客户端连接,但是,您可以将自签名 SSL 证书替换为证书颁发结构 (Certificate Authority, CA) 签名的证书。
以下过程假定您拥有 CA 签名的 SSL 证书。
安装的私钥必须采用保密性增强的电子邮件 (Privacy Enhanced Mail, PEM) 格式。
在 SGD Gateway 主机上,以超级用户 (root) 身份登录。
将 SSL 证书和相应的私钥复制到 SGD Gateway 主机。
将 SSL 证书和私钥导入到客户端密钥库中。
按如下方式使用 gateway sslkey import 命令:
# /opt/SUNWsgdg/bin/gateway sslkey import \ --keyfiletemp.key
\ --keyalg RSA \ --certfileexample.com.pem
此时,证书文件 example.com.pem
和 RSA 编码的相应私钥 temp.key
将导入到客户端密钥库中。
客户端密钥库中的现有自签名 SSL 证书将被覆盖。
(可选)重新启动 SGD Gateway。
此步骤只能在不执行 SGD Gateway 初始配置时执行。如果在初始配置阶段重新启动 SGD Gateway,则会显示一条错误消息,因为 SGD Gateway 的初始配置尚未完成。
如果要替换已配置且正在运行的 SGD Gateway 上的 SSL 证书,请重新启动 SGD Gateway。
重新启动 SGD Gateway 将断开正通过 SGD Gateway 运行的所有用户会话和应用程序会话的连接。
在 SGD Gateway 主机上,运行以下命令:
# /opt/SUNWsgdg/bin/gateway restart
SGD Gateway 与阵列中的 SGD 服务器之间的连接使用证书进行相互授权。配置这些连接涉及以下配置任务:
在 SGD Gateway 上安装 SGD 服务器证书。
在 SGD 阵列上安装 SGD Gateway 证书。
配置 SGD Gateway 的 SGD Client 连接。
要执行此过程,阵列中的 SGD 服务器必须在安全模式下运行。
在标准安装中,SGD 服务器将自动配置为使用安全连接。如果需要有关如何在 SGD 服务器上启用安全服务的更多信息,请参见《Oracle Secure Global Desktop Administration Guide for Release 4.7》第 1 章中的 “Secure Connections to SGD Servers”。
对阵列中的每个 SGD 服务器重复以下过程。
在 SGD 主机上,以超级用户 (root) 身份登录。
将 CA 证书从 SGD 服务器复制到 SGD Gateway 密钥库目录。
SGD 服务器的 CA 证书位于 SGD 主机的 /opt/tarantella/var/info/certs/PeerCAcert.pem
中。
此证书与 SGD 服务器用于阵列内安全通信的 CA 证书相同。
SGD Gateway 密钥库目录为 /opt/SUNWsgdg/proxy/etc
。
复制 CA 证书时,最佳做法是重命名证书文件,以便您可以标识该文件所包含的内容及其所源自的 SGD 服务器。
将 SSL 证书从 SGD 服务器复制到 SGD Gateway 密钥库目录。
在安全模式下运行的 SGD 服务器的 SSL 证书位于 SGD 主机的 /opt/tarantella/var/tsp/cert.pem
中。
SGD Gateway 密钥库目录为 /opt/SUNWsgdg/proxy/etc
。
复制 SSL 证书时,最佳做法是重命名证书文件,以便您可以标识该文件所包含的内容及其所源自的 SGD 服务器。
在 SGD Gateway 主机上,以超级用户 (root) 身份登录。
将证书导入到 SGD Gateway 密钥库中。
# /opt/SUNWsgdg/bin/gateway server add --serversgd-server1
\ --certfile /opt/SUNWsgdg/proxy/etc/PeerCAcert.pem --urlhttps://sgd1.example.com
\ --ssl-certfile /opt/SUNWsgdg/proxy/etc/cert.pem
--server
选项定义在密钥库中存储证书时使用的别名。在此示例中,使用 sgd-server1
别名存储 CA 证书,使用 sgd-server1-ssl
别名存储 SSL 证书。
https://sgd1.example.com
是 SGD Web 服务器的 URL。
重新启动 SGD Gateway。
重新启动 SGD Gateway 将断开正通过 SGD Gateway 运行的所有用户会话和应用程序会话的连接。
在 SGD Gateway 主机上,运行以下命令:
# /opt/SUNWsgdg/bin/gateway restart
对每个 SGD Gateway 重复以下过程。
导出 SGD Gateway 证书。
在 SGD Gateway 主机上,以超级用户 (root) 身份登录。
从 SGD Gateway 密钥库导出 SGD Gateway 证书。
按如下方式使用 gateway cert export 命令:
# /opt/SUNWsgdg/bin/gateway cert export --certfile gateway1.pem
证书将导出至 gateway1.pem
文件中。
将证书复制到阵列中主 SGD 服务器的 /opt/tarantella/var/tsp
目录中。
导出证书时,最佳做法是为证书文件指定合适的名称,以便您可以标识其所源自的 SGD Gateway。
更改 Gateway 证书的文件权限和所有权。
# chmod 600 /opt/tarantella/var/tsp/gateway1.pem
# chown ttasys:ttaserv /opt/tarantella/var/tsp/gateway1.pem
将 SGD Gateway 注册到 SGD 阵列中。
在主 SGD 服务器上,以超级用户 (root) 身份登录。
导入 SGD Gateway 证书。
# tarantella gateway add --namesgd-gateway1
\ --certfile /opt/tarantella/var/tsp/gateway1.pem
其中,sgd-gateway1
是 SGD 用于标识 SGD Gateway 的名称,gateway1.pem
是 SGD Gateway 证书的文件名。
要同时注册多个 SGD Gateway,请使用带 --file
选项的 tarantella gateway add 命令。有关更多详细信息,请参见第 B.27 节 “tarantella gateway 命令”。
使用 tarantella gateway add 所做的配置更改将复制到阵列中的其他 SGD 服务器。
配置使用 SGD Gateway 的 SGD Client 连接。
在主 SGD 服务器上,设置 --security-gateway
全局属性以基于 SGD Client 的 IP 地址或 DNS 名称定义哪些 SGD Client 可以使用 SGD Gateway。
要指定所有 SGD Client 连接都通过一个 SGD Gateway (gateway1.example.com
) 的 TCP 端口 443 进行路由,请使用以下命令:
$ tarantella config edit --security-gateway \ "*:sgdg:gateway1.example.com
:443
"
要指定所有 SGD Client 连接都通过一个外部负载平衡器 (lb.example.com
) 的 TCP 端口 443 进行路由,请使用以下命令:
$ tarantella config edit --security-gateway \ "*:sgdg:lb.example.com
:443
"
对 --security-gateway
属性的更改会影响阵列中的所有 SGD 服务器。更改仅应用于新用户会话。
有关如何使用 --security-gateway
属性定义多个 SGD Client 连接过滤器的更多详细信息,请参见第 B.31 节 “--security-gateway 属性”。
配置客户端设备与外部负载平衡器之间的连接涉及以下配置任务:
配置负载平衡器以接受来自客户端设备的连接。
有关如何执行此操作的详细信息,请参见所用负载平衡器的文档。
(可选)将 SGD Gateway 的 SSL 证书安装到负载平衡器上。
有关如何执行此操作的详细信息,请参见所用负载平衡器的文档。
配置外部负载平衡器与 SGD Gateway 之间的连接涉及以下配置任务:
配置 SGD Gateway 使用的端口和连接。
(可选)在 SGD Gateway 上,安装用于传入客户端连接的 SSL 证书。