stunnel加密隧道

1.介绍

  Stunnel是一款全局加密传输软件(http://www.stunnel.org/),工作在Unix和Windows平台上,作为代理,可以将应用程序发送的明文TCP流量加密,而无需重新配置应用程序本身。明文数据的例子包括POP3、IMAP、SMTP以及HTTP应用程序生成的任何内容。一旦将stunnel配置为加密数据隧道,通过该端口发送的任何内容都将使用SSL加密。两端都需要安装Stunnel,以便在传递到适当的应用程序之前将流量返回到明文。

2.安装

stunnel-5.56.tar.gz

### Unix HOWTO
* Only dynamic linking of the FIPS-enabled OpenSSL is currently supported,
  i.e. FIPS-enabled OpenSSL has to be configured with "shared" parameter.
* FIPS mode is autodetected if possible.  It can be forced with:
    ./configure --enable-fips
  or disable with:
    ./configure --disable-fips

make
sudo make install
#或者指定目录(需要指定绝对路径)
make install /tmp/install

采用./configure --enable-fips

2.配置客户端stunnel.conf

#1.增加stunnel.conf配置文件
cd /usr/local/etc/stunnel
cp stunnel.conf-sample stunnel.conf

#2.修改配置

#增加ca-certs.pem
#从安装包解压出来的stunnel-5.56/tools/ca-certs.pem 复制到/usr/local/etc/stunnel
cp stunnel-5.56/tools/ca-certs.pem /usr/local/etc/stunnel

并修改stunnel.conf 配置,注意文件权限均为chmod 600 。CAfile的配置可以采用/usr/local/etc/stunnel/ca-certs.pem

3.启动客户端stunnel

#默认配置参数直接启动stunnel
sudo stunnel

如果只是ctp端口转发,可以使用:rinetd


 

参考:

Stunnel官方手册(中文翻译)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值