線下IDC伺服器可接入Security Center進行安全防護。如果IDC伺服器可以訪問公網,可直接安裝Security Center用戶端;如果無法訪問公網,則需要通過Proxy叢集方式接入。本文介紹如何通過Proxy叢集將IDC伺服器接入Security Center。
應用情境
如果線下IDC所有伺服器均可訪問公網,無需搭建Proxy叢集,可直接在IDC伺服器上手動安裝Security Center用戶端。具體操作,請參見手動安裝。
如果線下IDC中存在無法訪問公網的伺服器,您需要先在IDC內部搭建Proxy叢集,再安裝Security Center用戶端,如下圖所示。
操作流程
通過Proxy叢集將IDC伺服器接入Security Center的流程如下:
在IDC內部搭建一個Proxy叢集,實現IDC伺服器與公網的通訊。
修改hosts檔案或配置本地DNS,連通Proxy叢集和IDC伺服器。
在IDC伺服器上安裝Security Center用戶端,開啟Security Center對IDC伺服器的安全防護。
步驟一:搭建Proxy反向 Proxy叢集
Security Center用戶端通過jsrv.aegis.aliyun.com網域名稱串連長串連伺服器,通過update.aegis.aliyun.com網域名稱串連HTTP伺服器。長串連代理和HTTP代理需部署在不同伺服器上,因此至少需要兩台伺服器搭建Proxy叢集。
1. 準備工作
您可以根據IDC伺服器規模確定Proxy 伺服器數量。伺服器數量較多時,建議準備多台Proxy 伺服器以確保負載平衡和高可用性。
至少準備一台用於長串連代理的伺服器,並確認伺服器上已安裝GCC和Zlib-devel。
至少準備一台用於HTTP代理的伺服器。
已下載支援反向 Proxy的Nginx版本。點擊下載反向 Proxy的Nginx版本
2. 配置長串連Proxy 伺服器
TCP長串連使用四層代理。下載Nginx後,執行以下編譯命令安裝Nginx。執行編譯命令時需要加上
--with-stream參數。tar -xvf nginx-1.9.0.tar.gz cd nginx-1.9.0 sudo ./configure --without-http_rewrite_module --with-stream sudo make sudo make install進入Nginx設定檔所在的目錄,參考以下內容修改nginx.conf檔案。
#user nobody; worker_processes auto; error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { use epoll; worker_connections 60000; } stream { server { listen 80; proxy_timeout 20m; proxy_connect_timeout 60s; proxy_pass app; } upstream app { server jsrv.aegis.aliyun.com:80; } }設定檔修改完成後,重新啟動Nginx。
3. 配置HTTPProxy 伺服器
HTTP串連使用四層代理。下載Nginx後,執行以下編譯命令安裝Nginx。執行編譯命令時需要加上
--with-stream參數。tar -xvf nginx-1.9.0.tar.gz cd nginx-1.9.0 sudo ./configure --without-http_rewrite_module --with-stream sudo make sudo make install進入Nginx設定檔所在的目錄,參考以下內容修改nginx.conf檔案。
#user nobody; worker_processes auto; error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { use epoll; worker_connections 60000; } stream { upstream updatessl { server update.aegis.aliyun.com:443; } server { listen 443; proxy_connect_timeout 60s; proxy_pass updatessl; } upstream updatehttp { server update.aegis.aliyun.com:80; } server { listen 80; proxy_connect_timeout 60s; proxy_pass updatehttp; } }設定檔修改完成後,重新啟動Nginx。
步驟二:Proxy叢集連通IDC內部伺服器
以下兩種方法均可將Proxy叢集連通IDC內部伺服器,任選其一。
修改線下IDC伺服器的hosts檔案
修改IDC伺服器的hosts檔案,將Security Center網域名稱的訪問指向Proxy叢集。在hosts檔案中添加以下網域名稱綁定記錄,將xx.xx.xx.xx替換為IDC內伺服器可訪問的Proxy叢集地址。
jsrv相關網域名稱對應host綁定長串連Proxy 伺服器地址;alicdn和update相關網域名稱對應host綁定HTTPProxy 伺服器地址。
xx.xx.xx.xx jsrv.aegis.aliyun.com
xx.xx.xx.xx jsrv2.aegis.aliyun.com
xx.xx.xx.xx jsrv3.aegis.aliyun.com
xx.xx.xx.xx jsrv4.aegis.aliyun.com
xx.xx.xx.xx jsrv5.aegis.aliyun.com
xx.xx.xx.xx aegis.alicdn.com
xx.xx.xx.xx update.aegis.aliyun.com
xx.xx.xx.xx update2.aegis.aliyun.com
xx.xx.xx.xx update3.aegis.aliyun.com
xx.xx.xx.xx update4.aegis.aliyun.com
xx.xx.xx.xx update5.aegis.aliyun.com修改線下IDC的本地DNS服務
修改線下IDC的本地DNS服務,使jsrv.aegis.aliyun.com和update.aegis.aliyun.com網域名稱指向Proxy叢集的地址。
步驟三:在IDC伺服器安裝Security Center用戶端
IDC伺服器需安裝Security Center用戶端後才能獲得安全防護。您可以通過安裝程式(Windows)或指令碼命令(Linux)安裝用戶端。具體操作,請參見手動安裝。
相關文檔
查看不同Security Center版本提供的防護能力,請參見功能特性。
IDC伺服器接入Security Center後,您可以使用警示通知、病毒查殺、網站後門查殺、用戶端自保護、鏡像安全掃描等功能保護資產安全。具體操作,請參見常用功能配置(精簡版)。