第 42 章 Stunnel - universal SSL tunnel

Homepage: http://www.stunnel.org/

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.

  1. install

    $ sudo apt-get install stunnel4
    			
  2. enable stunnel

    			
    $ vim /etc/default/stunnel4
    # /etc/default/stunnel
    # Julien LEMOINE <speedblue@debian.org>
    # September 2003
    
    # Change to one to enable stunnel
    ENABLED=0
    FILES="/etc/stunnel/*.conf"
    OPTIONS=""
    
    # Change to one to enable ppp restart scripts
    PPP_RESTART=0
    			
    			

    edit /etc/default/stunnel4 file and change ENABLED=0 to ENABLED=1 to enable Stunnel

  3. config

    $ sudo vim /etc/stunnel/stunnel.conf
    [pop3s]
    accept  = 995
    connect = 110
    
    [imaps]
    accept  = 993
    connect = 143
    
    [ssmtp]
    accept  = 465
    connect = 25
    
    [https]
    accept  = 443
    connect = 80		
    			
  4. start

    $ sudo /etc/init.d/stunnel4 start			
    		




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值