如何在 Kubuntu 18.04 LTS 中连接到 PPTP VPN?

如何在 Kubuntu 18.04 LTS 中连接到 PPTP VPN?

我正在尝试设置 VPN 客户端,通过不安全的 PPTP 协议连接到 VPN 服务器。我只获得了一个网关、一个用户和一个密码。

我按照经典教程操作,通过网络管理器创建 VPN 连接,一切正常,但一如既往,我的情况是无法建立连接。这是我在 PPTP 高级选项中设置的:

  • 我只允许 MSCHAP 和 MSCHAPv2 身份验证方法(禁用 PAP、CHAP 和 EAP)。
  • 我使用任何 MPPE 加密(状态禁用)。
  • 我允许 Deflate 和 TCP 头压缩(BSD 已禁用)。

这是syslog我尝试连接时显示的内容:

NetworkManager[665]: <info>  [1552640744.7422] audit: op="connection-activate" uuid="b128925d-79d3-422c-ae8d-92b6dba4c237" name="My VPN" pid=1715 uid=1000 result="success"
NetworkManager[665]: <info>  [1552640744.7460] vpn-connection[0x5573efe6a110,b128925d-79d3-422c-ae8d-92b6dba4c237,"My VPN",0]: Started the VPN service, PID 22957
NetworkManager[665]: <info>  [1552640744.7540] vpn-connection[0x5573efe6a110,b128925d-79d3-422c-ae8d-92b6dba4c237,"My VPN",0]: Saw the service appear; activating connection
NetworkManager[665]: <info>  [1552640744.8158] vpn-connection[0x5573efe6a110,b128925d-79d3-422c-ae8d-92b6dba4c237,"My VPN",0]: VPN plugin: state changed: starting (3)
pppd[22961]: Plugin /usr/lib/pppd/2.4.7/nm-pptp-pppd-plugin.so loaded.
NetworkManager[665]: Plugin /usr/lib/pppd/2.4.7/nm-pptp-pppd-plugin.so loaded.
pppd[22961]: pppd 2.4.7 started by root, uid 0
pppd[22961]: Using interface ppp0
NetworkManager[665]: Using interface ppp0
NetworkManager[665]: Connect: ppp0 <--> /dev/pts/5
pppd[22961]: Connect: ppp0 <--> /dev/pts/5
systemd-udevd[22965]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
NetworkManager[665]: <info>  [1552640744.8246] manager: (ppp0): new Ppp device (/org/freedesktop/NetworkManager/Devices/10)
pptp[22966]: nm-pptp-service-22957 log[main:pptp.c:353]: The synchronous pptp option is NOT activated
NetworkManager[665]: <info>  [1552640744.8329] devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
NetworkManager[665]: <info>  [1552640744.8330] device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
pppd[22961]: LCP: timeout sending Config-Requests
NetworkManager[665]: LCP: timeout sending Config-Requests
NetworkManager[665]: Connection terminated.
pppd[22961]: Connection terminated.
charon: 12[KNL] interface ppp0 deleted
NetworkManager[665]: <info>  [1552640775.8517] vpn-connection[0x5573efe6a110,b128925d-79d3-422c-ae8d-92b6dba4c237,"My VPN",0]: VPN service disappeared
NetworkManager[665]: <info>  [1552640775.8532] devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
pppd[22961]: Terminating on signal 15
NetworkManager[665]: Terminating on signal 15
NetworkManager[665]: Child process /usr/sbin/pptp XX.XXX.XXX.XXX --nolaunchpppd --loglevel 0 --logstring nm-pptp-service-22957 (pid 22964) terminated with signal 15
NetworkManager[665]: Modem hangup
pppd[22961]: Child process /usr/sbin/pptp XX.XXX.XXX.XXX --nolaunchpppd --loglevel 0 --logstring nm-pptp-service-22957 (pid 22964) terminated with signal 15
pppd[22961]: Modem hangup
pppd[22961]: Exit.

我进行了大量 Google 搜索并尝试了几乎所有我读过的方法来解决此问题,尤其是有关以下错误的帖子:

  • link_config:自动协商未设置或启用,速度和双工不可写
  • 同步 pptp 选项未激活
  • 未找到 ifupdown 配置

但我还没有找到解决办法。有人能给我一些提示吗?任何评论都对我有很大帮助,因为在连接到 VPN 服务器时发现错误不是我的强项。谢谢。

答案1

嗯,就我的情况而言,结果是 ufw 阻止了一切。

此链接中有简单的想法。在 ufw 中你可以这样做

“sudo ufw allow proto gre from” 允许来自

在内核为 3.18 的 Ubuntu 14.04 上启用 ufw 后无法连接到 PPTP VPN

不确定你的错误是否出现在我的情况中,但值得一试

相关内容