一、加密介紹
成都創(chuàng)新互聯(lián)是專業(yè)的開江網(wǎng)站建設公司,開江接單;提供網(wǎng)站設計、成都網(wǎng)站建設,網(wǎng)頁設計,網(wǎng)站設計,建網(wǎng)站,PHP網(wǎng)站建設等專業(yè)做網(wǎng)站服務;采用PHP框架,可快速的進行開江網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!1、總覽
Zabbix版本從3.0之后,開始支持Zabbix server, Zabbix proxy, Zabbix agent, zabbix_sender and zabbix_get之間的通信加密,加密方式有預共享密鑰(PSK)和證書加密。
加密配置是可選項,一些proxies和agents可以使用證書認證加密通信,另外一些可以使用PSK加密通信,而剩余的可以不使用加密進行通信。
關于porxy的配置設備,我這里就不在介紹了,大家可以去看官方文檔。
但是并不是所有的通信都進行了加密,下面的幾點就是沒有覆蓋到。
Private keys are stored in plain text in files readable by Zabbix components during startup.
Pre-shared keys are entered in Zabbix frontend and stored in Zabbix database in plain text.
Built-in encryption does not protect communications:
between web server running Zabbix frontend and user web browser,
between Zabbix frontend and Zabbix server,
between Zabbix server (proxy) and Zabbix database.
Currently each encrypted connection opens with a full TLS handshake, no session caching and tickets are implemented.
Adding encryption increases time of checks and actions, depending on network latency.
For example, if packet delay is 100ms then opening a TCP connection and sending unencrypted request takes around 200ms.
With encryption about 1000 ms are added for establishing TLS connection.
Timeouts may need to be increased, otherwise some items and actions running remote scripts on agents may work with unencrypted connections but fail with timeout with encrypted.
Encryption is not supported by network discovery. Zabbix agent checks performed by network discovery will be unencrypted and if Zabbix agent is configured to reject unencrypted connections such checks will not succeed.
2、編譯支持加密功能
要想支持加密功能,我們必須在編譯安裝的時候把加密庫編譯進Zabbix里面。
編譯的時候加上 --with-openssl
./configure \ --prefix=/usr/local/zabbix \ --sysconfdir=/etc/zabbix \ --enable-server \ --enable-agent \ --with-mysql \ --with-net-snmp \ --with-libcurl \ --with-openssl
二、使用預共享密鑰(PSK)
1、生成psk
# openssl rand -hex 32 af8ced32dfe8714e548694e2d29e1a14ba6fa13f216cb35c19d0feb1084b0429
2、配置agent
創(chuàng)建一個文件/etc/zabbix/zabbix_agentd.conf.d/zabbix_agentd.psk,存入剛剛生成的psk。
編輯/etc/zabbix/zabbix_agentd.conf,添加如下內(nèi)容。
TLSConnect=psk TLSAccept=psk TLSPSKFile=/etc/zabbix/zabbix_agentd.conf.d/zabbix_agentd.psk TLSPSKIdentity=PSK 001
然后重啟agent,在server上面測試看看加密連接。
zabbix_get -s 127.0.0.1 -k "system.cpu.load[all,avg1]" --tls-connect=psk --tls-psk-identity="PSK 001" --tls-psk-file=/etc/zabbix/zabbix_agentd.conf.d/zabbix_agentd.psk
測試下來沒有什么問題,那我們就配置WEB頁面。
等待一段時間,就生效了哦。
三、使用證書通信加密
待完成……
參考文檔:https://www.zabbix.com/documentation/3.2/manual/encryption/using_pre_shared_keys
另外有需要云服務器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。
文章題目:Zabbix如何實現(xiàn)Server和Agent的通信加密-創(chuàng)新互聯(lián)
文章鏈接:http://aaarwkj.com/article38/cdpipp.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供虛擬主機、定制開發(fā)、做網(wǎng)站、自適應網(wǎng)站、企業(yè)網(wǎng)站制作、網(wǎng)站導航
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)