我正在尝试在 AWS VPC 中设置 l2tp,但遇到了问题。
我使用的是 MAC 操作系统,但一直收到错误消息“无法建立与 PPP 服务器的连接。请尝试重新连接。如果问题仍然存在,请验证您的设置并联系您的管理员。” 来自 Mac 的其他 l2tp 连接可以正常工作,所以我认为这是与 AWS 网络有关的服务器端配置问题。
服务器确实有一个 EIP,并且安全组对流量开放。我也设置了UDP封装,但没有乐趣。
编辑:
我已经确认它也不能在 Windows 机器上运行。错误是:“L2TP 连接尝试失败,因为安全层在与远程计算机的初始协商期间遇到了处理错误”
这是我 Mac 上的日志:
Tue Mar 2 21:06:53 2021 : publish_entry SCDSet() failed: Success!
Tue Mar 2 21:06:53 2021 : publish_entry SCDSet() failed: Success!
Tue Mar 2 21:06:53 2021 : l2tp_get_router_address
Tue Mar 2 21:06:53 2021 : l2tp_get_router_address 172.20.10.1 from dict 1
Tue Mar 2 21:06:53 2021 : L2TP connecting to server 'XXXXXXXXXXXX' (XX.XX.XX.XXX)...
Tue Mar 2 21:06:53 2021 : IPSec connection started
Tue Mar 2 21:06:53 2021 : IPSec phase 1 client started
Tue Mar 2 21:06:53 2021 : IPSec phase 1 server replied
Tue Mar 2 21:06:54 2021 : IPSec phase 2 started
Tue Mar 2 21:06:54 2021 : IPSec phase 2 established
Tue Mar 2 21:06:54 2021 : IPSec connection established
Tue Mar 2 21:06:54 2021 : L2TP sent SCCRQ
Tue Mar 2 21:06:54 2021 : L2TP received SCCRP
Tue Mar 2 21:06:54 2021 : L2TP sent SCCCN
Tue Mar 2 21:06:54 2021 : L2TP sent ICRQ
Tue Mar 2 21:06:54 2021 : L2TP received ICRP
Tue Mar 2 21:06:54 2021 : L2TP sent ICCN
Tue Mar 2 21:06:54 2021 : L2TP connection established.
Tue Mar 2 21:06:54 2021 : L2TP set port-mapping for en0, interface: 6, protocol: 0, privatePort: 0
Tue Mar 2 21:06:54 2021 : using link 0
Tue Mar 2 21:06:54 2021 : Using interface ppp0
Tue Mar 2 21:06:54 2021 : Connect: ppp0 <--> socket[34:18]
Tue Mar 2 21:06:54 2021 : sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x312e33e6> <pcomp> <accomp>]
Tue Mar 2 21:06:57 2021 : sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x312e33e6> <pcomp> <accomp>]
Tue Mar 2 21:06:57 2021 : rcvd [LCP ConfReq id=0x0 <mru 1400> <auth eap> <magic 0x7ad21b17> <pcomp> <accomp> <callback CBCP> <mrru 1614> <endpoint 13 17 01 4f 48 20 23 13 c3 46 18 8f aa 74 9e ef 65 fe 3a 00 00 00 00>]
Tue Mar 2 21:06:57 2021 : lcp_reqci: rcvd unknown option 13
Tue Mar 2 21:06:57 2021 : lcp_reqci: returning CONFREJ.
Tue Mar 2 21:06:57 2021 : sent [LCP ConfRej id=0x0 <callback CBCP> <mrru 1614>]
Tue Mar 2 21:06:57 2021 : rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x312e33e6> <pcomp> <accomp>]
Tue Mar 2 21:06:57 2021 : rcvd [LCP ConfReq id=0x1 <mru 1400> <auth eap> <magic 0x7ad21b17> <pcomp> <accomp> <endpoint 13 17 01 4f 48 20 23 13 c3 46 18 8f aa 74 9e ef 65 fe 3a 00 00 00 00>]
Tue Mar 2 21:06:57 2021 : lcp_reqci: returning CONFNAK.
Tue Mar 2 21:06:57 2021 : sent [LCP ConfNak id=0x1 <auth chap MS-v2>]
Tue Mar 2 21:06:57 2021 : rcvd [LCP ConfReq id=0x2 <mru 1400> <auth chap MS-v2> <magic 0x7ad21b17> <pcomp> <accomp> <endpoint 13 17 01 4f 48 20 23 13 c3 46 18 8f aa 74 9e ef 65 fe 3a 00 00 00 00>]
Tue Mar 2 21:06:57 2021 : lcp_reqci: returning CONFACK.
Tue Mar 2 21:06:57 2021 : sent [LCP ConfAck id=0x2 <mru 1400> <auth chap MS-v2> <magic 0x7ad21b17> <pcomp> <accomp> <endpoint 13 17 01 4f 48 20 23 13 c3 46 18 8f aa 74 9e ef 65 fe 3a 00 00 00 00>]
Tue Mar 2 21:06:57 2021 : sent [LCP EchoReq id=0x0 magic=0x312e33e6]
Tue Mar 2 21:06:58 2021 : rcvd [CHAP Challenge id=0x0 <74364045b7347b39c5b1dfc36728e117>, name = "XXX"]
Tue Mar 2 21:06:58 2021 : sent [CHAP Response id=0x0 <734347e818645e3291e5aadb64eba088000000000000000068b867912db9f4098b52051c0e350df91af72a1774b6708700>, name = "XXXXX"]
Tue Mar 2 21:06:58 2021 : rcvd [LCP EchoRep id=0x0 magic=0x7ad21b17]
Tue Mar 2 21:06:58 2021 : rcvd [CHAP Success id=0x0 "S=FB69C2CC6DD794FF835AF55ED91E9DBAB6278C81"]
Tue Mar 2 21:06:58 2021 : sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
Tue Mar 2 21:06:58 2021 : sent [IPV6CP ConfReq id=0x1 <addr fe80::167d:daff:fece:57fd>]
Tue Mar 2 21:06:58 2021 : sent [ACSCP ConfReq id=0x1 <route vers 16777216> <domain vers 16777216>]
Tue Mar 2 21:06:58 2021 : rcvd [CCP ConfReq id=0x4 <mppe +H -M -S -L -D +C>]
Tue Mar 2 21:06:58 2021 : Unsupported protocol 'Compression Control Protocol' (0x80fd) received
Tue Mar 2 21:06:58 2021 : sent [LCP ProtRej id=0x2 80 fd 01 04 00 0a 12 06 01 00 00 01]
Tue Mar 2 21:06:58 2021 : rcvd [LCP ProtRej id=0x5 80 21 01 01 00 16 03 06 00 00 00 00 81 06 00 00 00 00 83 06 00 00 00 00]
Tue Mar 2 21:06:58 2021 : rcvd [LCP ProtRej id=0x6 80 57 01 01 00 0e 01 0a 16 7d da ff fe ce 57 fd]
Tue Mar 2 21:06:58 2021 : rcvd [LCP ProtRej id=0x7 82 35 01 01 00 10 01 06 00 00 00 01 02 06 00 00 00 01]
Tue Mar 2 21:06:58 2021 : sent [LCP TermReq id=0x3 "No network protocols running"]
Tue Mar 2 21:06:58 2021 : Connection terminated.
Tue Mar 2 21:06:58 2021 : L2TP disconnecting...
Tue Mar 2 21:06:58 2021 : L2TP sent CDN
Tue Mar 2 21:06:58 2021 : L2TP sent StopCCN
Tue Mar 2 21:06:58 2021 : L2TP clearing port-mapping for en0
Tue Mar 2 21:06:58 2021 : L2TP disconnected
这是来自 Windows 服务器的日志:
"XXX","RAS",03/02/2021,21:07:24,4,"XXXXXX",,"XX.XX.XX.XX","XX.XX.XX.XX",,,"XXX","XXXXX",1,,"XX.XX.XX.XX","XXX",1614737244,,5,,1,2,,,0,"311 1 fe80::edb8:9338:cb73:6adf 03/03/2021 01:54:30 4",,,,,1,,,,"5",2,,,,,"7",1,,3,1,"174.247.13.222","XX.XX.XX.XX",,,,,,,"MSRASV5.20",311,,"0x00504545524C455353",4,,"Microsoft Routing and Remote Access Service Policy",1,,,,
"XXX","RAS",03/02/2021,21:07:26,4,"XXXXX",,"XX.XX.XX.XX","XX.XX.XX.XX",,,"XXX","XX.XX.XX.XX",1,,"XX.XX.XX.XX","XX.XX.XX.XX",1614737244,,5,,1,2,,,0,"311 1 fe80::edb8:9338:cb73:6adf 03/03/2021 01:54:30 4",,,,,2,,292,407,"5",2,0,11,13,1,"7",1,,3,1,"174.247.13.222","XX.XX.XX.XX",,,,,,,"MSRASV5.20",311,,"0x00504545524C455353",4,,"Microsoft Routing and Remote Access Service Policy",1,,,,
我完全被这件事难住了。