如何修复 PPTP VPN 客户端连接(VirtualBox 上的 Ubuntu)

如何修复 PPTP VPN 客户端连接(VirtualBox 上的 Ubuntu)

我刚刚在 VirtualBox 上安装了 Ubuntu 14.04,正在尝试设置 VPN 客户端。我已使用与 Mac 相同的设置对其进行了配置,并且可以毫无问题地从那里进行连接。

当我单击 VPN 连接时,短暂延迟后会出现以下消息弹出:

VPN 连接失败。

我到处寻找解决方案,但毫无收获。我对这些问题完全没有经验。我提供了日志,希望它能有所帮助。

短暂性脑缺血。

Feb 17 20:31:05 ubuntu NetworkManager[856]: <info> Starting VPN service 'pptp'...
Feb 17 20:31:05 ubuntu NetworkManager[856]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 3629
Feb 17 20:31:05 ubuntu NetworkManager[856]: <info> VPN service 'pptp' appeared; activating connections
Feb 17 20:31:05 ubuntu NetworkManager[856]: <info> VPN plugin state changed: init (1)
Feb 17 20:31:05 ubuntu NetworkManager[856]: <info> VPN plugin state changed: starting (3)
Feb 17 20:31:05 ubuntu NetworkManager[856]: <info> VPN connection 'Bioxydyn' (Connect) reply received.
Feb 17 20:31:05 ubuntu pppd[3633]: Plugin /usr/lib/pppd/2.4.5/nm-pptp-pppd-plugin.so loaded.
Feb 17 20:31:05 ubuntu pppd[3633]: pppd 2.4.5 started by root, uid 0
Feb 17 20:31:05 ubuntu pppd[3633]: Using interface ppp0
Feb 17 20:31:05 ubuntu pppd[3633]: Connect: ppp0 <--> /dev/pts/0
Feb 17 20:31:05 ubuntu pptp[3636]: nm-pptp-service-3629 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Feb 17 20:31:05 ubuntu NetworkManager[856]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Feb 17 20:31:05 ubuntu NetworkManager[856]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Feb 17 20:31:05 ubuntu NetworkManager[856]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Feb 17 20:31:05 ubuntu pptp[3653]: nm-pptp-service-3629 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Feb 17 20:31:05 ubuntu pptp[3653]: nm-pptp-service-3629 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Feb 17 20:31:05 ubuntu pptp[3653]: nm-pptp-service-3629 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Feb 17 20:31:06 ubuntu pptp[3653]: nm-pptp-service-3629 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Feb 17 20:31:06 ubuntu pptp[3653]: nm-pptp-service-3629 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Feb 17 20:31:06 ubuntu pptp[3653]: nm-pptp-service-3629 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 10009).
Feb 17 20:31:36 ubuntu pppd[3633]: LCP: timeout sending Config-Requests
Feb 17 20:31:36 ubuntu pppd[3633]: Connection terminated.
Feb 17 20:31:36 ubuntu NetworkManager[856]: <warn> VPN plugin failed: 1
Feb 17 20:31:36 ubuntu avahi-daemon[661]: Withdrawing workstation service for ppp0.
Feb 17 20:31:36 ubuntu NetworkManager[856]:    SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Feb 17 20:31:36 ubuntu pppd[3633]: Modem hangup
Feb 17 20:31:36 ubuntu pptp[3636]: nm-pptp-service-3629 warn[decaps_hdlc:pptp_gre.c:204]: short read (-1): Input/output error
Feb 17 20:31:36 ubuntu pptp[3636]: nm-pptp-service-3629 warn[decaps_hdlc:pptp_gre.c:216]: pppd may have shutdown, see pppd log
Feb 17 20:31:36 ubuntu pppd[3633]: Exit.
Feb 17 20:31:36 ubuntu pptp[3653]: nm-pptp-service-3629 log[callmgr_main:pptp_callmgr.c:234]: Closing connection (unhandled)
Feb 17 20:31:36 ubuntu NetworkManager[856]: <warn> VPN plugin failed: 1
Feb 17 20:31:36 ubuntu NetworkManager[856]: <info> VPN plugin state changed: stopped (6)
Feb 17 20:31:36 ubuntu NetworkManager[856]: <info> VPN plugin state change reason: 0
Feb 17 20:31:36 ubuntu NetworkManager[856]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.
Feb 17 20:31:36 ubuntu pptp[3653]: nm-pptp-service-3629 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Feb 17 20:31:36 ubuntu pptp[3653]: nm-pptp-service-3629 log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
Feb 17 20:31:36 ubuntu NetworkManager[856]: <warn> error disconnecting VPN: Could not process the request because no VPN connection was active.
Feb 17 20:31:41 ubuntu NetworkManager[856]: <info> VPN service 'pptp' disappeared

答案1

我遇到了同样的问题并用这个解决了:

  1. 以 root 身份登录或者执行 su 或sudo su
  2. touch /etc/modules-load.d/netfilter.conf
  3. 编辑/etc/modules-load.d/netfilter.conf

netfilter.conf:

nf_nat_pptp
nf_conntrack_pptp
nf_conntrack_proto_gre
  1. 保存文件并重新启动。

答案2

我再次提出这个问题是因为这是我本周早些时候搜索的一部分,但发布的解决方案并没有帮助。

Fox Mulder 对问题原因的判断是正确的 - gre/pptp 数据包没有被正确路由,但在这种情况下,问题实际上是 VirtualBox 虚拟网络接口。

使用 NAT 网络接口,您无法正确路由 pptp 或 gre。

编辑您的 VBox 配置以使用桥接连接,一切都应该正常工作(假设您的主机操作系统和链上所有其他网络设备都正确传递 gre 和 pptp 流量)。

相关内容