我似乎无法保持 VPN 连接处于活动状态。我在 Toshiba Protege R30-A-17E 上使用 Ubuntu 14.04 64 位。
无论我是否使用 VPN,VPN 连接都会在一段随机时间后断开。我尝试了在这里或一些论坛上找到的一些方法,但连接始终断开。我尝试禁用任何类型的压缩,激活“发送 ppp 回显数据包”选项。我甚至尝试使用 USB 苹果网络以太网适配器,但仍然没有成功。
这是我的 syslog 的内容(通过 -E“Network|pptp|pppd”进行 grep)。
Sep 23 10:56:35 IVO NetworkManager[765]: <info> Starting VPN service 'pptp'...
Sep 23 10:56:35 IVO NetworkManager[765]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 20965
Sep 23 10:56:35 IVO NetworkManager[765]: <info> VPN service 'pptp' appeared; activating connections
Sep 23 10:56:35 IVO NetworkManager[765]: <info> VPN plugin state changed: starting (3)
Sep 23 10:56:35 IVO NetworkManager[765]: <info> VPN connection 'WiseMetering' (Connect) reply received.
Sep 23 10:56:35 IVO pppd[20969]: Plugin /usr/lib/pppd/2.4.5/nm-pptp-pppd-plugin.so loaded.
Sep 23 10:56:35 IVO pppd[20969]: pppd 2.4.5 started by root, uid 0
Sep 23 10:56:35 IVO pppd[20969]: Using interface ppp0
Sep 23 10:56:35 IVO pppd[20969]: Connect: ppp0 <--> /dev/pts/54
Sep 23 10:56:35 IVO NetworkManager[765]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Sep 23 10:56:35 IVO NetworkManager[765]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Sep 23 10:56:35 IVO NetworkManager[765]: <warn> /sys/devices/virtual/net/ppp0: couldn't determine device driver; ignoring...
Sep 23 10:56:35 IVO pptp[20972]: nm-pptp-service-20965 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Sep 23 10:56:35 IVO pptp[20984]: nm-pptp-service-20965 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Sep 23 10:56:35 IVO pptp[20984]: nm-pptp-service-20965 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Sep 23 10:56:35 IVO pptp[20984]: nm-pptp-service-20965 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Sep 23 10:56:36 IVO pptp[20984]: nm-pptp-service-20965 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Sep 23 10:56:36 IVO pptp[20984]: nm-pptp-service-20965 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Sep 23 10:56:36 IVO pptp[20984]: nm-pptp-service-20965 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 11648).
Sep 23 10:56:39 IVO pppd[20969]: CHAP authentication succeeded
Sep 23 10:56:39 IVO pppd[20969]: MPPE 128-bit stateless compression enabled
Sep 23 10:56:41 IVO NetworkManager[765]: <info> (eth0): IP6 addrconf timed out or failed.
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Activation (eth0) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Activation (eth0) Stage 4 of 5 (IPv6 Configure Timeout) started...
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Activation (eth0) Stage 4 of 5 (IPv6 Configure Timeout) complete.
Sep 23 10:56:41 IVO pppd[20969]: local IP address 192.168.200.67
Sep 23 10:56:41 IVO pppd[20969]: remote IP address 192.168.200.1
Sep 23 10:56:41 IVO pppd[20969]: primary DNS address 192.168.200.1
Sep 23 10:56:41 IVO pppd[20969]: secondary DNS address 192.168.200.1
Sep 23 10:56:41 IVO NetworkManager[765]: <info> VPN connection 'WiseMetering' (IP4 Config Get) reply received from old-style plugin.
Sep 23 10:56:41 IVO NetworkManager[765]: <info> VPN Gateway: 194.38.128.63
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Tunnel Device: ppp0
Sep 23 10:56:41 IVO NetworkManager[765]: <info> IPv4 configuration:
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Internal Address: 192.168.200.67
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Internal Prefix: 32
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Internal Point-to-Point Address: 192.168.200.1
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Maximum Segment Size (MSS): 0
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Static Route: 192.168.200.0/24 Next Hop: 192.168.200.0
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Static Route: 192.168.1.0/24 Next Hop: 192.168.1.0
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Forbid Default Route: yes
Sep 23 10:56:41 IVO NetworkManager[765]: <info> Internal DNS: 192.168.200.1
Sep 23 10:56:41 IVO NetworkManager[765]: <info> DNS Domain: '(none)'
Sep 23 10:56:41 IVO NetworkManager[765]: <info> No IPv6 configuration
Sep 23 10:56:42 IVO NetworkManager[765]: <info> VPN connection 'WiseMetering' (IP Config Get) complete.
Sep 23 10:56:42 IVO NetworkManager[765]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.
Sep 23 10:56:42 IVO NetworkManager[765]: <info> Writing DNS information to /sbin/resolvconf
Sep 23 10:56:42 IVO NetworkManager[765]: <info> VPN plugin state changed: started (4)
Sep 23 10:57:36 IVO pptp[20984]: nm-pptp-service-20965 log[logecho:pptp_ctrl.c:677]: Echo Reply received.
Sep 23 11:06:37 IVO pptp[20984]: message repeated 9 times: [ nm-pptp-service-20965 log[logecho:pptp_ctrl.c:677]: Echo Reply received.]
Sep 23 11:06:37 IVO pptp[20984]: nm-pptp-service-20965 log[logecho:pptp_ctrl.c:679]: no more Echo Reply/Request packets will be reported.
Sep 23 11:17:37 IVO pptp[20984]: nm-pptp-service-20965 log[pptp_handle_timer:pptp_ctrl.c:1050]: closing control connection due to missing echo reply
Sep 23 11:17:37 IVO pptp[20984]: nm-pptp-service-20965 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Sep 23 11:17:37 IVO pptp[20984]: nm-pptp-service-20965 log[pptp_conn_close:pptp_ctrl.c:430]: Closing PPTP connection
Sep 23 11:17:37 IVO pptp[20984]: nm-pptp-service-20965 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 3 'Stop-Control-Connection-Request'
Sep 23 11:17:37 IVO pptp[20984]: nm-pptp-service-20965 log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
Sep 23 11:17:37 IVO pppd[20969]: Modem hangup
Sep 23 11:17:37 IVO pppd[20969]: Connect time 21.0 minutes.
Sep 23 11:17:37 IVO pppd[20969]: Sent 10793 bytes, received 9913 bytes.
Sep 23 11:17:37 IVO pppd[20969]: MPPE disabled
Sep 23 11:17:37 IVO pppd[20969]: Connection terminated.
Sep 23 11:17:37 IVO NetworkManager[765]: <info> VPN plugin state changed: stopping (5)
Sep 23 11:17:37 IVO NetworkManager[765]: <info> VPN plugin state changed: stopped (6)
Sep 23 11:17:37 IVO NetworkManager[765]: <info> VPN plugin state change reason: 0
Sep 23 11:17:37 IVO pppd[20969]: Exit.
Sep 23 11:17:38 IVO NetworkManager[765]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.
Sep 23 11:17:38 IVO NetworkManager[765]: <info> Writing DNS information to /sbin/resolvconf
Sep 23 11:17:38 IVO NetworkManager[765]: <warn> error disconnecting VPN: Could not process the request because no VPN connection was active.
Sep 23 11:17:38 IVO NetworkManager[765]: <warn> (45) failed to find interface name for index
Sep 23 11:17:38 IVO NetworkManager[765]: nm_system_iface_flush_routes: assertion 'iface != NULL' failed
Sep 23 11:17:38 IVO NetworkManager[765]: <warn> (45) failed to find interface name for index
Sep 23 11:17:38 IVO NetworkManager[765]: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Sep 23 11:17:43 IVO NetworkManager[765]: <info> VPN service 'pptp' disappeared
有人知道这里发生了什么吗?
编辑
我有 2 台不同的笔记本电脑,都运行 Ubuntu 14.04 64 位(实际上其中一台运行的是 Xubuntu,但基本上是一样的)。
这两台笔记本电脑都表现出完全相同的行为,在向系统日志记录类似“由于缺少回显答复而关闭控制连接”的内容后,VPN 会随机断开连接。
我还有一台小型上网本,上面安装了 #!11(顺便说一下,它仍然运行内核 3.2)。使用完全相同的配置,这里的 VPN 已经有 10 多个小时没有断开连接了,它断开与 VPN 连接的唯一原因是我告诉它这样做。
那么..这可能是 Ubuntu 14.04 的问题吗?或者是内核问题?或者是 lib 版本问题?
答案1
可能是 VPN 服务器不支持某些压缩功能。如果服务器基于 Windows,请尝试禁用 PPP Echo 数据包发送,同时禁用 BSD 压缩、Deflate 压缩和 TCP 标头压缩也可能会解决问题。如果问题仍然存在,则 DNS 错误可能是罪魁祸首。