V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
通过以下 Referral 链接购买 DigitalOcean 主机,你将可以帮助 V2EX 持续发展
DigitalOcean - SSD Cloud Servers
austinchou0126
V2EX  ›  VPS

有人用OpenSwan配置过IPSec的VPN吗?

  •  
  •   austinchou0126 · 2013-12-27 11:21:05 +08:00 · 1893 次点击
    这是一个创建于 3774 天前的主题,其中的信息可能已经有所发展或是发生改变。
    按照https://raymii.org/s/tutorials/IPSEC_L2TP_vpn_with_Ubuntu_12.04.html上面的教程在DO的VPS上配置完成,然后无法连接(服务器无响应),提示

    packet from xx.xx.xx.xx:61330: initial Main Mode message received on xx.xx.xx.xx:500 but no connection has been authorized with policy=PSK

    然后根据官方WiKi上改动了一些,现在是Disconnected by the communication device.查看log发现变成了这样:

    Dec 27 03:11:20 username pluto[2985]: "L2TP-PSK-noNAT"[1] xx.xx.xx.xx #2: STATE_QUICK_R2: IPsec SA established transport mode {ESP=>0x0fa3c77a <0xb00f70e3 xfrm=AES_256-HMAC_SHA1 NATOA=none NATD=xx.xx.xx.xx:33170 DPD=none}
    Dec 27 03:11:41 username pluto[2985]: "L2TP-PSK-NAT"[2] xx.xx.xx.xx #1: received Delete SA(0x0fa3c77a) payload: deleting IPSEC State #2
    Dec 27 03:11:41 username pluto[2985]: "L2TP-PSK-NAT"[2] xx.xx.xx.xx #1: deleting connection "L2TP-PSK-noNAT" instance with peer xx.xx.xx.xx {isakmp=#0/ipsec=#0}

    求指点,感谢
    22 条回复    1970-01-01 08:00:00 +08:00
    fdb713
        1
    fdb713  
       2013-12-27 11:52:42 +08:00   ❤️ 1
    openswan都没啥人维护了。
    用racoon吧。
    yywudi
        2
    yywudi  
       2013-12-27 12:07:55 +08:00   ❤️ 1
    我基本上是按照这个教程来的
    http://wiki.frantech.ca/doku.php/ipsec
    dant
        3
    dant  
       2013-12-27 12:21:20 +08:00 via iPhone   ❤️ 1
    我用openswan和strongswan从没成功过。
    目前再用racoon
    shierji
        4
    shierji  
       2013-12-27 12:32:31 +08:00   ❤️ 1
    我试过很多次strongswan。屡败屡战屡战屡败- -
    austinchou0126
        5
    austinchou0126  
    OP
       2013-12-27 13:04:24 +08:00
    @fdb713 DO可以装Racoon么?顺带问一下OpenWRT上面用什么VPN Server好?我看官方推荐的是StrongSwan
    austinchou0126
        6
    austinchou0126  
    OP
       2013-12-27 13:04:46 +08:00
    @yywudi 受教了
    austinchou0126
        7
    austinchou0126  
    OP
       2013-12-27 13:05:01 +08:00
    @shierji 哈哈,我也是配了两次,全跪
    austinchou0126
        8
    austinchou0126  
    OP
       2013-12-27 13:33:01 +08:00
    @yywudi 成功了,我很好奇为什么之前不行,难道是配置文件的事?
    xiaoxuxu
        9
    xiaoxuxu  
       2013-12-27 13:51:28 +08:00
    之前centos配VPN各种奇葩问题。现在把手机root了,shadowsocks搞起了。。。
    yywudi
        10
    yywudi  
       2013-12-27 13:57:29 +08:00
    @austinchou0126 可能是配置文件哪里没填对? 我现在的几台VPS的L2TP都保存了配置,重新装就 apt-get install openswan xl2tpd 然后把相应的配置文件复制修改IP啥的就行
    likuku
        11
    likuku  
       2013-12-27 14:11:11 +08:00
    openswan/ipsec 不复杂啊,两端配置文件一模一样就是了.
    shao
        13
    shao  
       2013-12-27 16:20:39 +08:00
    lbright
        14
    lbright  
       2013-12-27 21:40:20 +08:00
    话说l2tp不是基本废了的么?
    Keyes
        15
    Keyes  
       2013-12-27 22:21:37 +08:00
    Debian 7+strongSwan+freeRADIUS with MySQL+DO SFO1 1G
    妥妥的运行中
    早期在用openSwan,不过后来还是觉得问题比较多,就转到strongSwan了
    iOS/Android/Mac用IKEv1 with PSK
    公司Win7用IKEv2 with Cert,非常好用
    shierji
        16
    shierji  
       2013-12-27 22:29:54 +08:00
    @Keyes 求丢一个教程过来……
    austinchou0126
        17
    austinchou0126  
    OP
       2013-12-27 23:09:06 +08:00 via iPhone
    @shierji 2L亲测可用
    austinchou0126
        18
    austinchou0126  
    OP
       2013-12-27 23:09:36 +08:00 via iPhone
    @lbright IPSec不敢废吧,巨多企业跨过组网的
    shierji
        19
    shierji  
       2013-12-27 23:10:45 +08:00
    @austinchou0126 l2tp没意义吧。。还是纯的ipsec VPN更有意思一些。。。
    Keyes
        20
    Keyes  
       2013-12-27 23:43:20 +08:00
    strongSwan文档是非常完善的
    http://wiki.strongswan.org/projects/strongswan/wiki/Win7MultipleConfig
    类似这种,wiki上有绝大部分情况下的配置

    至于freeRADIUS注意一下库中的NAS配置和strongSwan-RADIUS中的NAS配置即可
    Keyes
        21
    Keyes  
       2013-12-27 23:49:36 +08:00
    哦对还有freeRADIUS的微软Dictionary,我记得某个发行版默认带的是有问题的
    shierji
        22
    shierji  
       2013-12-28 12:50:26 +08:00
    @Keyes 一直在看wiki一直屡败屡战。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2964 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 13:09 · PVG 21:09 · LAX 06:09 · JFK 09:09
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.