服务端是 MS-CHAP-V2, pppd 拨号无法验证。 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
DoubleX
V2EX    问与答

服务端是 MS-CHAP-V2, pppd 拨号无法验证。

  •  
  •   DoubleX 2020-11-05 10:40:29 +08:00 1500 次点击
    这是一个创建于 1851 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在 linux 下手动配置 l2tp/ipsec 客户端时,在 pppd 拨号的时候,因为服务器使用的是 mschap-v2,无法完成验证。 请问有什么解决方法吗?

    PS:不能使用 netmanager-l2tp 配置,要求手动配置。。。。

    附 pppd log: Nov 5 10:03:58 iZbp130bctfwzletru94waZ xl2tpd[2633]: start_pppd: I'm running:

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ xl2tpd[2633]: "/usr/sbin/pppd"

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ pppd[2644]: Plugin pppol2tp.so loaded.

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ pppd[2644]: pppd 2.4.7 started by root, uid 0

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ pppd[2644]: using channel 8

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ pppd[2644]: Using interface ppp0

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ pppd[2644]: Connect: ppp0 <-->

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ pppd[2644]: Overriding mtu 1500 to 1410

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ pppd[2644]: PPPoL2TP options: debugmask 0

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ pppd[2644]: Overriding mru 1500 to mtu value 1410

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ pppd[2644]: sent [LCP ConfReq id=0x1 <mru 1410> <asyncmap 0x0> <magic 0x36613b7a>]

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ pppd[2644]: rcvd [LCP ConfReq id=0x1 <mru 1400> <asyncmap 0x0> <auth chap MS-v2> <magic 0x991e173d>]

    Nov 5 10:03:58 iZbp130bctfwzletru94waZ pppd[2644]: sent [LCP ConfAck id=0x1 <mru 1400> <asyncmap 0x0> <auth chap MS-v2> <magic 0x991e173d>]

    Nov 5 10:04:01 iZbp130bctfwzletru94waZ pppd[2644]: sent [LCP ConfReq id=0x1 <mru 1410> <asyncmap 0x0> <magic 0x36613b7a>]

    Nov 5 10:04:01 iZbp130bctfwzletru94waZ pppd[2644]: rcvd [LCP ConfAck id=0x1 <mru 1410> <asyncmap 0x0> <magic 0x36613b7a>]

    Nov 5 10:04:01 iZbp130bctfwzletru94waZ pppd[2644]: PPPoL2TP options: debugmask 0

    Nov 5 10:04:01 iZbp130bctfwzletru94waZ pppd[2644]: sent [LCP EchoReq id=0x0 magic=0x36613b7a]

    Nov 5 10:04:01 iZbp130bctfwzletru94waZ pppd[2644]: rcvd [CHAP Challenge id=0xd5 <f200c9035920382e26656e852cd22f00>, name = "l2tpd"]

    Nov 5 10:04:01 iZbp130bctfwzletru94waZ pppd[2644]: added response cache entry 0

    Nov 5 10:04:01 iZbp130bctfwzletru94waZ pppd[2644]: sent [CHAP Response id=0xd5 <6a8c0cba228c6b514625a15be42305ee0000000000000000cd3e3770a0bbf946e503278ec156d0ee48b0bb73f88a856b00>, name = "test"]

    Nov 5 10:04:02 iZbp130bctfwzletru94waZ pppd[2644]: rcvd [LCP EchoRep id=0x0 magic=0x991e173d]

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: rcvd [CHAP Failure id=0xd5 ""]

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: MS-CHAP authentication failed:

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: CHAP authentication failed

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: Overriding mtu 1500 to 1410

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: PPPoL2TP options: debugmask 0

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: Overriding mru 1500 to mtu value 1410

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: sent [LCP TermReq id=0x2 "Failed to authenticate ourselves to peer"]

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: rcvd [LCP TermReq id=0x2 "Authentication failed"]

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: sent [LCP TermAck id=0x2]

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: rcvd [LCP TermAck id=0x2]

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: Connection terminated.

    Nov 5 10:04:03 iZbp130bctfwzletru94waZ pppd[2644]: Exit.

    2 条回复    2020-11-07 12:50:01 +08:00
    DoubleX
        1
    DoubleX  
    OP
       2020-11-06 11:37:46 +08:00
    已找到原因。
    用户密码里包含特殊字符‘#’,

    根据 https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients-zh.md#%E4%BD%BF%E7%94%A8%E5%91%BD%E4%BB%A4%E8%A1%8C%E9%85%8D%E7%BD%AE-linux-vpn-%E5%AE%A2%E6%88%B7%E7%AB%AF

    配置完客户端后会出现 authentication failed 的场景,推测是密码里的特殊字符没有发送,造成密码不匹配,从而验证失败。

    解决方法:
    修改 /etc/ppp/options.l2tpd.client 文件
    在 name,password 值上加上双引号“”。
    julyclyde
        2
    julyclyde  
       2020-11-07 12:50:01 +08:00
    恭喜你自己解决了

    #符号大概是注释的意思吧
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     810 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 28ms UTC 20:11 PVG 04:11 LAX 12:11 JFK 15:11
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86