无法再连接到 VPN

无法再连接到 VPN

过去几年来我一直使用有效的 VPN 连接,但昨天却神秘地停止了工作。

nmcli con up id <myconnection>
Error: Connection activation failed: Unknown reason

还有另一个问题讨论这个特定的错误消息这里。大多数建议的解决方案都归结为密码错误。但是,就我而言,密码存储在一个我没有更改的文件中,而且密码几个月内不会过期。自 10 天前上次连接以来,我也没有更新过我的系统 (Ubuntu 18.04 LTS),因此不应该发生重大变化networkmanager

根据状态页面显示,VPN 已启动并正在运行,我可以正常 ping 服务器。

tail -f /var/log/syslog -n 30

在系统日志中显示以下条目:

Mar 23 14:35:47 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510147.8744] audit: op="connection-activate" uuid="1bfc80fc-f18e-4f33-9e2f-41a90d650d88" name="<myconnection>" pid=14976 uid=1000 result="success"
Mar 23 14:35:47 paul-XPS-15-9560 gnome-shell[1181]: JS ERROR: TypeError: item is undefined#012setActiveConnections/<@resource:///org/gnome/shell/ui/status/network.js:1520:17#012setActiveConnections@resource:///org/gnome/shell/ui/status/network.js:1517:9#012wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22#012_syncVpnConnections@resource:///org/gnome/shell/ui/status/network.js:1855:9#012wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
Mar 23 14:35:47 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510147.8844] vpn-connection[0x5654f4a8c5d0,1bfc80fc-f18e-4f33-9e2f-41a90d650d88,"<myconnection>",0]: Started the VPN service, PID 14982
Mar 23 14:35:47 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510147.9027] vpn-connection[0x5654f4a8c5d0,1bfc80fc-f18e-4f33-9e2f-41a90d650d88,"<myconnection>",0]: Saw the service appear; activating connection
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510148.0024] vpn-connection[0x5654f4a8c5d0,1bfc80fc-f18e-4f33-9e2f-41a90d650d88,"<myconnection>",0]: VPN plugin: state changed: starting (3)
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510148.0024] vpn-connection[0x5654f4a8c5d0,1bfc80fc-f18e-4f33-9e2f-41a90d650d88,"<myconnection>",0]: VPN connection: (ConnectInteractive) reply received
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510148.0571] manager: (tun0): new Tun device (/org/freedesktop/NetworkManager/Devices/5)
Mar 23 14:35:48 paul-XPS-15-9560 systemd-udevd[14994]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510148.0830] devices added (path: /sys/devices/virtual/net/tun0, iface: tun0)
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510148.0830] device added (path: /sys/devices/virtual/net/tun0, iface: tun0): no ifupdown configuration found.
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: /usr/sbin/vpnc: server requested domain, but none set (use "Domain ..." in config or --domain
Mar 23 14:35:48 paul-XPS-15-9560 gnome-shell[2866]: Removing a network device that was not added
Mar 23 14:35:48 paul-XPS-15-9560 gnome-shell[1181]: Removing a network device that was not added
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510148.2385] devices removed (path: /sys/devices/virtual/net/tun0, iface: tun0)
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: <warn>  [1616510148.2551] vpn-connection[0x5654f4a8c5d0,1bfc80fc-f18e-4f33-9e2f-41a90d650d88,"<myconnection>",0]: VPN plugin: failed: connect-failed (1)
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: <warn>  [1616510148.2552] vpn-connection[0x5654f4a8c5d0,1bfc80fc-f18e-4f33-9e2f-41a90d650d88,"<myconnection>",0]: VPN plugin: failed: connect-failed (1)
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510148.2552] vpn-connection[0x5654f4a8c5d0,1bfc80fc-f18e-4f33-9e2f-41a90d650d88,"<myconnection>",0]: VPN plugin: state changed: stopping (5)
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510148.2554] vpn-connection[0x5654f4a8c5d0,1bfc80fc-f18e-4f33-9e2f-41a90d650d88,"<myconnection>",0]: VPN plugin: state changed: stopped (6)
Mar 23 14:35:48 paul-XPS-15-9560 NetworkManager[1018]: <info>  [1616510148.2574] vpn-connection[0x5654f4a8c5d0,1bfc80fc-f18e-4f33-9e2f-41a90d650d88,"<myconnection>",0]: VPN service disappeared

在我这个外行人看来,最确凿的证据似乎是这句话:

/usr/sbin/vpnc: server requested domain, but none set (use "Domain ..." in config or --domain

但是,我不明白这指的是什么,因为在设置>网络>VPN>我的连接>身份下没有相应的条目,所有其他访问信息(网关/用户名/用户密码/组名/组密码)都存储在其中。

任何能够帮助我解决或进一步分类此问题的建议都将不胜感激。

答案1

如果其他人遇到此问题:

该问题似乎是服务器端的协议发生了改变。

我的 VPN 不使用“Domain”参数。如果未设置“Domain”关键字,某些用户端 VPN 客户端会发送 --domain ""(空字符串)。其他 VPN 客户端则根本不指定 Domain 参数。networkmanager属于后一类。

由于我能够在过去几天之前访问 VPN,因此不指定“Domain”参数可能是访问 VPN 的有效方法。正如日志所示,情况不再如此。如果我强制将 Domain 参数设置为空字符串,则可以使用 vpnc 进行连接:

sudo vpnc-connect <myconnection> --domain ""

不幸的是,似乎没有办法强制networkmanager发送空字符串:启动板上的问题链接

相关内容