V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Livid
V2EX  ›  互联网

如何在 Debian / Ubuntu 服务器上架设 L2TP / IPSec VPN

  •  
  •   Livid · 2010-05-03 20:59:59 +08:00 · 8824 次点击
    这是一个创建于 5107 天前的主题,其中的信息可能已经有所发展或是发生改变。
    7 条回复    1970-01-01 08:00:00 +08:00
    Los
        1
    Los  
       2010-05-03 21:10:22 +08:00
    在centos5上,有更简单的一键安装包:

    wget http://www.diahosting.com/dload/pptpd.sh
    sh pptpd.sh

    安装完成后会提示vpn用户名和密码。

    VPN用户管理:

    直接编辑/etc/ppp/chap-secrets文件,按照相同格式添加用户名和密码即可。
    GordianZ
        2
    GordianZ  
    MOD
       2010-05-03 21:25:25 +08:00
    回国真麻烦,都没有上网的念头了
    T_T
    Htom
        3
    Htom  
       2010-05-03 22:11:20 +08:00
    翻墙是个技术活
    Aether
        4
    Aether  
       2011-01-27 16:00:30 +08:00
    ◎上海
    电信 联通网关都过滤PPTPD了。
    Darren
        5
    Darren  
       2011-01-27 16:46:09 +08:00
    @Aether 有线通也屏蔽PPTP了。
    Aether
        6
    Aether  
       2011-01-28 23:44:11 +08:00
    CentOS / Fedora / Ubuntu / Debian L2TP IPSec VPN 一键安装脚本
    http://www.heiqu.com/show-57615-1.html

      CentOS / Fedora:

      wget http://mirror.zeddicus.com/auto-l2tp/1.2/centos/l2tp.shchmod +x l2tp.sh./l2tp.sh

      Ubuntu / Debian:

      wget http://mirror.zeddicus.com/auto-l2tp/1.2/ubuntu/l2tp.sh

      chmod +x l2tp.sh

      ./l2tp.sh

      此时需要输入IP段与PSK,值得注意的是,如果希望L2TP的IP段是 10.0.0.0 的话,则在脚本的IP-RANGE中输入 “10.0.0″。PSK 是 l2tp client 共同使用的密匙,同样是必填的。

      输入了IP段和PSK之后,程序会显示你的VPS当前的IP(IPV4)、L2TP的本地IP、分配给客户端的IP段以及你所设置的PSK,请确认无误后,按任意键,程序便会开始自动配置。

      安装完毕后会运行 ipsec verify,前面是OK,最后一个为DISABLED,证明配置成功!用于测试的用户名与密码分别是:test / test123,记录于 /etc/ppp/chap-secrets 文件当中。


    经过测试有效。
    roamlog
        7
    roamlog  
       2011-01-29 10:07:36 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2970 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 13:15 · PVG 21:15 · LAX 06:15 · JFK 09:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.