SSL 連線-Secure Gateway

    版本為 07:09, 20 Sep 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    設定前的必要元件

    1. Citrix Secure Gateway: 從 XenApp 光碟內安裝
    2. Certificate Service: 從 Windows 2K3 Server 光碟安裝
    3. Web Interface/Secure Gateway 主機必須有 FQDN 名稱,並且內外網路的使用戶都能正常解析這名稱,例如是 xapp.osslab.com.tw。

    安裝 Secure Gateway

    1. 從光碟目錄內 Secure Gateway/Windows/CSG_GWY.msi
    2. Installation mode: Secure Gateway
    3. Account: NETWORK SERVICE
    4. 安裝完後會要求作設定,按取消先跳過

    安裝 Certificate Service

    Windows > 控制台 > 新增移除程式 > Windows 元件 > Certificate Service

    • 安裝前會提醒: 爾後將無法修改電腦名稱及網域
    • 選擇 獨立根 CA (必須設定 CA 的根名稱,這名稱是用來識別憑證授權的單位,例如是 osslab,預設有效期限是指 Root 憑證)
    • 提醒: 會暫時重啟 IIS 服務,選 Yes
    • 提醒: 立即啟動 ASP 服務,選 Yes
    • 手動重啟 Windows

    設定 IIS 的 SSL port

    IIS 管理員 > 預設網站 > 內容

    • 網站 > TCP 連接埠: 80,SSL 連接埠: 444 (注意:這裡不可以用 443)

    建立 Server & CARoot Certificate

    注意:

    • 建立 Server Certificate 後,同時系統也會自動產生相應的 CARoot Certificate。
    • Server Certificate 必須安裝在 Secure Gateway 這台主機,
    • Server 憑證的有效期只有一年,一年後必須重新發行一組新的 Server & CARoot Certificate。
    • CARoot 憑證的有效期預設是五年,這是在第一次安裝 Certificate Service 時所設定的。
    1. 透過 IIS 產生一組新的憑證簽署檔

    IIS 管理員 > 預設網站 > 內容 > 目錄安全設定 > 伺服器憑證

    1. 建立新憑證
    2. 新憑證名稱: citrix-xenapp
    3. 公司/單位: osslab
    4. 網站名稱: 必須輸入 xapp.osslab.com.tw (*重要*,這個 FQDN 必須與用戶實際登入的 URL 相同)
    5. 國家/省/地區: 隨便
    6. 輸出檔案 C:\certreq.txt
    2. 透過 Windows 憑證授權單位對新的憑證要求檔作發行

    憑證授權單位 > [CA 的根名稱]

    • 所有工作 > 提交新要求 > 選擇 C:\certreq.txt
    • 擱置要求 > 選擇憑證後作發行
    • 已發出的憑證 > 發行後的 Server 憑證會出現在這 > 開啟 > 詳細資料 > 複製檔案 > DER 編碼... >  C:\xapp-SERVER.cer
    3. 回到 IIS 設定這個 Server 憑證

    IIS 管理員 > 預設網站 > 內容 > 目錄安全設定 > 伺服器憑證 >

    1. 處裡擱置要求及安裝憑證 (PS. 此項必須之前有作過要求憑證才會顯示)
    2. 匯入 C:\xapp-SERVER.cer

    匯出 Root Certificate

    在發行新的 Server 憑證之後,系統也會產生一組對應的 Root 憑證,將 Root 憑證匯出後,傳給要登入的用戶電腦。

    憑證授權單位 > [CA 的根名稱] > 內容 > 一般 > 選擇最新(最下方)的憑證,如果有 #0, #1 要選 #1 > 檢視憑證 > 詳細資料 > 複製到檔案 C:\xapp-ROOT.cer

    設定 Web Interface

    Web Interface Management > XenApp Web Sites >

    > Site URL https://xapp.osslab.com.tw:444/Citrix/XenApp (PS. 在設定 IIS 的 SSL 及憑證後,這裡會自動轉換從 http > https,並且以憑證所設定的網站名稱為 URL)

    > Secure Access (在右側)

    • Default,type 改為 Gateway direct
    • Address(FQDN): xapp.osslab.com.tw,port: 443,Enable session reliability: 不選
    • Secure Ticket Authority URLs > Add
      • 輸入 http://xapp.osslab.com.tw:8080/scripts/ctxsta.dll (*重要*)
        PS. 這裡的 8080 必須 XML port
      • Use for load balancing (單機時就不選)
    • 如果有設定 LAN 子網路,type 為 Direct 請刪除此項。

    設定 Secure Gateway

    Secure Gateway Configuration Wizard >

    1. Configuration type: standard
    2. Select a server certificate: 透過 view 按鈕檢視正確的 server 憑證,並選擇 (PS. 這裡通常會顯示建立 server 憑證時的網站名稱)
    3. Monitor all IPv4 addresses 勾選,TCP port:443
    4. Outbound connections: No outbound traffic restrictions
    5. Add STA(Secure Ticket Authority) *重要*
      • FQDN: xapp.osslab.com.tw
      • Path: /Scripts/CtxSTA.dll
      • Secure traffic between the STA and the secure gateway 不選
      • Use default: 不選
      • TCP port: 8080 (PS. 這裡與 XML port 相同)
      • 按 OK 後,如果連線正常就會顯示一組 ID
      • 註: 如果出現 the Secure Ticket Authority specified cannot be contacted
        1. 檢查 FQDN 是否可以正常解析
        2. 檢查 XML port 是否正確
        3. 如果主機放在 NAT,FQDN 所解析的 IP 必須是內部 IP,如果沒有內部 DNS server,可以修改 c:\windows\system32\drivers\etc\hosts
    6. Access options:
      • Indirect
      • Installed on this computer
      • TCP port: 80 (PS. 這裡是指 Web Interface 的 port,一般是 80)

    設定網路防火牆設備

    只需要對 443 port 開放

    外IP:443 -> 內IP(Secure Gateway):443

    用戶端設定

    • 適用 Firefox 13, Internet Explorer 8, Chrome 20
    • 必須可解析主機端的 FQDN,如果只是做測試,又不想架設 DNS Server,可修改以下檔案:
      C:\Windows\System32\Drivers\etc\hosts
    • 從主機端取得 Root 憑證 C:\xapp-ROOT.cer
    Windows

    安裝Root 憑證
    Firefox 13)

    1. Firefox > 選項 > 進階 > 加密 > 檢視憑證選單 > 伺服器 > 匯入 xapp-ROOT.cer (PS. IE 或 Chrome 不需此步驟)
    2. Firefox > 選項 > 進階 > 加密 > 檢視憑證選單 > 伺服器 > 選擇剛匯入的憑證 > 編輯信任
      • 選擇: 不信任此憑證的鑑別
      • 編輯憑證機構信任關係: 全選
    3. Firefox > 下載安裝最新板 CitrixReceiver,http://www.citrix.com/English/ps2/pr...tentID=1689163 (PS. 不要下載安裝 XenApp 入口網頁上的 Plugin)
    4. Firefox > URL https://xapp.osslab.com.tw,此時應該可以會看到登入畫面。
      如果沒有看到登入畫面,請檢查所有步驟。
    5. 安裝憑證到 Windows,檔案總管 > 選擇 xapp-ROOT.cer > 按右鍵 安裝憑證 > 下一步 >
      • 將所有憑證放入以下的存放區:信任的根憑證授權

    TIPs:

    - Firefox 如果沒有匯入 Root 憑證,網頁無法正確顯示

    - Windows 如果沒有安裝 Root 憑證,所發佈的應用程式無法被開啟,出現錯誤
    SSL 錯誤 61 您尚未選擇信任伺服器安全性憑證....

    其他補充

    • Secure Gateway Management Console > Session Information 必須正常顯示登入的用戶,如果用戶有登入但這裡沒有顯示,表示該用戶並未使用 SSL 連線。
    • 在 LAN 端的用戶,將 xapp.osslab.com.tw 指向內部 IP,可以同時使用 HTTP(80) 或 HTTPS(443) 的方式連接。
    Powered by MindTouch Core