
因為客戶的資安需求要從預設的 TLS 1.2 升級至更安全、更高效的 TLS 1.3。
內容涵蓋系統預設狀況、修改 TLS profile、調整管rhttpproxy 設定。
最後使用 openssl 、 sslscan 、Google Chrome瀏覽器工具驗證協議版本是否為TLS1.3。
以下請參考如何設定吧!
前置作業
先確認vmware esxi版本是否升級到8.0 Update 3,因為從 8.0 Update 3 開始,vSphere 透過 TLS 設定檔支援 TLS 1.3 和 1.2。
TLS 設定檔簡化了 TLS 參數的管理,並提高了可維護性。
以下操作為vmware esxi 8.0 Update 3以上版本的操作
tls1.3現況檢查
瀏覽器開啟esxi管理後台,啟用ssh服務

因為要多次重開機,建議SSH隨主機一同開啟

使用putty等工具ssh連入esxi
確認目前的tls server、tls client套用的是哪一中Profile
確認tls server Profile
esxcli system tls server get
[root@localhost:~] esxcli system tls server get
Profile: COMPATIBLE
Cipher List: <profile default>
Cipher Suite: <profile default>
Groups: <profile default>
Protocol Versions: <profile default>
Reboot Required: false
確認tls client Profile
esxcli system tls client get
[root@localhost:~] esxcli system tls client get
Profile: COMPATIBLE
Cipher List: <profile default>
Cipher Suite: <profile default>
Groups: <profile default>
Protocol Versions: <profile default>
Reboot Required: false
調整Profile
tls server、tls client Profile改成MANUAL
[root@localhost:~] esxcli system tls server set --profile MANUAL
[root@localhost:~] esxcli system tls client set --profile MANUAL
Profile中Protocol Versions 改成tls1.3
[root@localhost:~] esxcli system tls client set --protocol-versions tls1.3
[root@localhost:~] esxcli system tls server set --protocol-versions tls1.3
檢查修改結果
查詢tls server
[root@localhost:~] esxcli system tls server get
Profile: MANUAL
Cipher List: ECDHE+AESGCM:ECDHE+AES
Cipher Suite: TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384
Groups: prime256v1:secp384r1:secp521r1
Protocol Versions: tls1.3
Reboot Required: true
查詢tls client
[root@localhost:~] esxcli system tls client get
Profile: MANUAL
Cipher List: ECDHE+AESGCM:ECDHE+AES
Cipher Suite: TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384
Groups: prime256v1:secp384r1:secp521r1
Protocol Versions: tls1.3
Reboot Required: true
esxi重開機
reboot
tls1.3驗證
驗證工具可以用openssl 與 sslscan 工具或者是Google Chrome瀏覽器來驗證。
sslscan
sslscan.exe esxi_IP
可以看到改完Profile為MANUAL並指定Protocol Versions: tls1.3後
透過工具查詢TLS1.3 還是disabled

在vSphere TLS Configuration文件最後一段提到port 443 uses TLS 1.2
如果要修改為TLS 1.3 on port 443需參考Enabling non-FIPS TLS 1.3 on port 443 in ESX.
rhttpproxy修改
Step 1: Get current configuration to a json file.
[root@localhost:~] configstorecli config current get -c esx -g services -k rhttpproxy -o rhttpproxy-cfg.json
Data written to rhttpproxy-cfg.json
Step 2: Edit JSON file, add protocols field like below.
[root@localhost:~] vi rhttpproxy-cfg.json
內容修改如下
{
"vmacore": {
"ssl": {
"protocols": "tls1.3"
}
}
}
Step 3: Set the new configuration.
[root@localhost:~] configstorecli config current set -c esx -g services -k rhttpproxy -j rhttpproxy-cfg.json
Set: completed successfully
Step 4: Restart rhttpproxy to apply the configuration.
[root@localhost:~] /etc/init.d/rhttpproxy restart
VMware HTTP reverse proxy stopped.
VMware HTTP reverse proxy started.
再次驗證

Google Chrome瀏覽器來驗證


備註
以上設定在測試環境中測試,若要在正式環境,操作前請先備份VM,並關閉esxi上面的VM。
延伸閱讀


