V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Livid
268.02D
571.83D
V2EX  ›  互联网

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

  •  
  •   Livid ·
    PRO
    · May 3, 2010 · 9805 views
    This topic created in 5844 days ago, the information mentioned may be changed or developed.
    7 replies    1970-01-01 08:00:00 +08:00
    Los
        1
    Los  
       May 3, 2010
    在centos5上,有更简单的一键安装包:

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

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

    VPN用户管理:

    直接编辑/etc/ppp/chap-secrets文件,按照相同格式添加用户名和密码即可。
    GordianZ
        2
    GordianZ  
       May 3, 2010
    回国真麻烦,都没有上网的念头了
    T_T
    Htom
        3
    Htom  
       May 3, 2010
    翻墙是个技术活
    Aether
        4
    Aether  
       Jan 27, 2011
    ◎上海
    电信 联通网关都过滤PPTPD了。
    Darren
        5
    Darren  
       Jan 27, 2011
    @Aether 有线通也屏蔽PPTP了。
    Aether
        6
    Aether  
       Jan 28, 2011
    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  
       Jan 29, 2011
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2421 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 01:13 · PVG 09:13 · LAX 18:13 · JFK 21:13
    ♥ Do have faith in what you're doing.