複製鏈接
請複製以下鏈接發送給好友

Stunnel

鎖定
Stunnel是一個自由的跨平台軟件,用於提供全局的TLS/SSL服務。針對本身無法進行TLS或SSL通信的客户端及服務器,Stunnel可提供安全的加密連接。該軟件可在許多操作系統下運行,包括Unix-like系統,以及Windows。Stunnel依賴於某個獨立的庫,如OpenSSL或者SSLeay,以實現TLS或SSL協議
軟件名稱
Stunnel
性    質
跨平台軟件
是否收費
免費
用    途
提供全局的TLS/SSL服務
實行協議
TLS或SSL

目錄

Stunnel簡介

最佳助手
要實現的TLSSSL協議如下
Stunnel由Michal Trojnara 和 Brian Hatch負責維護,遵照GNU通用公共許可證進行發佈。
Stunnel -- Universal SSL Wrapper
Stunnel is a program that allows you to encrypt arbitrary TCP connections inside SSL (Secure Sockets Layer) available on both Unix and Windows. Stunnel can allow you to secure non-SSL aware daemons and protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the encryption, requiring no changes to the daemon's code.
The Stunnel source code is not a complete product -- you still require a functioning SSL library such as OpenSSL or SSLeay in order to compile stunnel. This means that stunnel can support whatever (and only) that which your SSL library can, without making any changes in the Stunnel code.
The Stunnel source code is available under the GNU General Public License, meaning it is free to use in both commercial and non commercial applications as you see fit, as long as you provide source code (and any modifications) with the software. Your compiled Stunnel binary is 'restricted' by whatever license your chosen SSL library is under, however both OpenSSL and SSLeay are open source and similarly liberal in their licensing.

Stunnel相關網站

Stunnel是一款免費的工具,可以在這裏下載。下面我們介紹一下具體的使用。
下載Stunnel Client端程序,並解壓到本機的C:\Program Files目錄下。
下載Stunnel Server端程序,並解壓後放在外網的服務器上。
分別配置stunnel.conf文件。
更改本機應用程序的網絡連接配置。
分別運行stunnel.-4.04.exe執行文件。
説明:
我們使用Stunnel,需要在外網有一台有管理權限的服務器,來運行Stunnel的Server程序。配置好Stunnel.conf後,可將執行文件在啓動菜單中建立快捷方式,這樣讓每次開機時,能自動運行。Stunnel技術是將傳輸的信息加密後,通過Server端的服務器進行解密才到達的目的主機,所以在選擇Server端服務器的時候,對服務器的帶寬速度有一定的要求。
Stunnel的配置:
Client和Server端都包含stunnel.conf配置文件,格式如下表所示:
Client端stunnel.conf文件內容 Server端stunnel.conf文件內容
# Use it for client mode
client = yes
#Client-level configuration
[ 應用服務名稱 ]
accept =本地IP : 目標端口
connect =Server端IP : 指定的端口 # Use it for server mode
client = no
#Server-level configuration
[ 應用服務名稱 ]
accept = 指定的端口
connect =目標服務器IP : 目標端口
常見應用實例:
Stunnel.conf文件配置比較簡單,下面我們介紹一些常見應用配置,其中Client端是放在本機,IP是127.0.0.1,Server端是放在外網的服務器上,IP是202.151.90.28。
1.加密郵件傳輸:
加密郵件,需要將發送和接收的過程都要進行保護,那麼我們就要對POP3SMTP傳送方式進行加密。如果我們有一個信箱,服務器的IP是202.108.44.153,配置文件stunnel.conf如下:
Client端SMTP和POP3文件內容 Server端SMTP和POP3文件內容
smtp.accept = 127.0.0.1:25
connect = 202.151.90.28:125
pop3.
accept = 127.0.0.1:110
connect = 202.151.90.28:1110 smtp.
accept = 125
connect = 202.108.44.170:25
pop3.accept = 1110
connect = 202.108.44.153:110
如果有多個郵件傳輸需要加密,則增加相應的POP3SMTP設置即可。設置好了配置文件,我們還需要將郵件客户端(常見的為Foxmail或Outlook)與其對應,設置如下:
發送的郵件地址改為:127.0.0.1 端口改為:125
接收的郵件地址改為:127.0.0.1 端口改為:1110
2.加密FTP傳輸:
FTP是比較早的文件傳輸協議,內容都是以明文方式傳輸,我們利用Stunnel後,也可以讓FTP的傳輸非常安全,現在我們只需要在前面的stunnel.conf內容裏面增加以下配置信息:
Client端FTP的配置 Server端FTP的配置
ftp.accept = 127.0.0.1:21
connect = 202.151.90.28:121 ftp.accept = 121
connect = 218.7.9.73:21
FTP軟件(如CuteFTP)也要做相應更改:
登錄的遠程地址改為:127.0.0.1 端口改為121
3.加密HTTP網站訪問傳輸:
我們不能對所有的網站訪問都進行加密,因為太多,但對於很重要的網站,我們也可以用Stunnel來保護訪問的內容不受到監聽。例如我們要訪問www.,網站IP地址是202.108.36.172,HTTP的配置如下:
Client端HTTP的配置 Server端HTTP的配置
www.accept = 127.0.0.1:80
connect = 202.151.90.28:8080 www.accept = 8080
connect = 202.108.36.172:80
通過結合使用科來網絡分析系統與Stunnel,既可以做到對網絡的安全檢測,並找出網絡內的潛在安全隱患,又能從防護的角度出發,保護公司內部網絡的重要信息。此方案成本低,不改變當前網絡內的結構,容易實施,是一個簡單有效的安全管理方案。