Jul 15

stunnel的架设与使用

xieyy , 09:39 , Linux系统与应用 , 评论(0) , 引用(0) , 阅读(5802) , Via 本站原创 | |
今天发现有反馈一个系统运维平台无法正常登陆了。经查看,是因为迁移过服务器的原因。再查发现意是其WEB程序有使用两个非正常端口进行连接。同时连接对像亦是127.0.0.1

再细查发现,旧服务器上的开放这两个对应端口的服务是stunnel

打开搜索引擎,了解stunnel相关信息。(这里我想到了黑客帝国里的功夫训练模块)现在的东西,我们搜索一下就能找到相关的东西与模块进行学习。
了解一下大概的常识:
1.stunnel官方介绍:
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.

stunnel只是一个加密程序,可在tcp链接上使用SSL,同时因其不用更改系统内核,只在tcp connections设置即可,是以对安全性有要求的连接,只要加个stunnel即可。什么都可以不用再做了,非常方便。

了解了相关的信息,我们就可以很容易的推断出我们现在运行的那个WEB程序使用127.0.0.1端口的原因了。原理更是清楚了。做起来就简单了。

下载。安装,使用配置档stunnel.conf 将证书放置在合适的位置。启动!测试~OK~

其实我更愿意将stunnel看成的端口转换工具。再加SSL功能。相信以后会经常用到他的。旧版本的是使用命令行的方式实现。现在新版的是使用配置档文件。在这两者间的对应关系,配置档格式还耗费了我不少时间


stunnel [filename] | -help | -version | -sockets | -install | -uninstall
    filename    - use specified config file instead of stunnel.conf
    -help       - get config file help
    -version    - display version and defaults
    -sockets    - display default socket options
    -install    - install NT service
    -uninstall  - uninstall NT service

相关的stunnel文档资料有:http://www.stunnel.org/
developerWorks 中国 使用stunnel加密:http://www.ibm.com/developerworks/cn/security/s-stun/index.html



发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]