Mac 上的 L2TP/IPSec 连接失败

Mac 上的 L2TP/IPSec 连接失败

我正在按照以下说明连接到 VPN 服务器 https://github.com/hwdsl2/setup-ipsec-vpn

我设置了以下客户端https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md#os-x

在同一个局域网下,我的一个客户端(OSX 10.14.5,防火墙关闭)连接成功

# Contents of `cat /var/log/ppp.log`
Tue Jun 11 14:46:46 2019 : publish_entry SCDSet() failed: Success!
Tue Jun 11 14:46:46 2019 : publish_entry SCDSet() failed: Success!
Tue Jun 11 14:46:46 2019 : l2tp_get_router_address
Tue Jun 11 14:46:46 2019 : l2tp_get_router_address 192.168.3.1 from dict 1
Tue Jun 11 14:46:46 2019 : L2TP connecting to server ‘xxx.xxx.xxx.xxx’ (xxx.xxx.xxx.xxx)...
Tue Jun 11 14:46:46 2019 : IPSec connection started
Tue Jun 11 14:46:46 2019 : IPSec phase 1 client started
Tue Jun 11 14:46:47 2019 : IPSec phase 1 server replied
Tue Jun 11 14:46:47 2019 : IPSec phase 2 started
Tue Jun 11 14:46:48 2019 : IPSec phase 2 established
Tue Jun 11 14:46:48 2019 : IPSec connection established
Tue Jun 11 14:46:48 2019 : L2TP sent SCCRQ
Tue Jun 11 14:46:48 2019 : L2TP received SCCRP
Tue Jun 11 14:46:48 2019 : L2TP sent SCCCN
Tue Jun 11 14:46:48 2019 : L2TP sent ICRQ
Tue Jun 11 14:46:48 2019 : L2TP received ICRP
Tue Jun 11 14:46:48 2019 : L2TP sent ICCN
Tue Jun 11 14:46:48 2019 : L2TP connection established.
Tue Jun 11 14:46:48 2019 : L2TP set port-mapping for en0, interface: 8, protocol: 0, privatePort: 0

但另一个客户端(也是 OSX 10.14.5,防火墙关闭)连接失败

# Contents of `cat /var/log/ppp.log`
Tue Jun 11 14:44:04 2019 : publish_entry SCDSet() failed: Success!
Tue Jun 11 14:44:04 2019 : publish_entry SCDSet() failed: Success!
Tue Jun 11 14:44:04 2019 : l2tp_get_router_address
Tue Jun 11 14:44:04 2019 : l2tp_get_router_address 192.168.3.1 from dict 1
Tue Jun 11 14:44:04 2019 : L2TP connecting to server 'xxx.xxx.xxx.xxx' (xxx.xxx.xxx.xxx)...
Tue Jun 11 14:44:04 2019 : L2TP sent SCCRQ
Tue Jun 11 14:44:24 2019 : L2TP cannot connect to the server

有人可以给我提示吗?

答案1

导航到/etc/ppp
如果有任何文件,例如options,请检查它。
可能有:

/etc/ppp % cat options
plugin L2TP.ppp
l2tpnoipsec

所以你应该删除该options文件然后你就会得到积极的结果。

相关内容