我有一个相当新安装的 Ubuntu 18.04,并且正在尝试使用 vpnc 连接到远程网络。
通过有线连接,一切正常。
在 wifi 上,它似乎已连接(连接时不显示任何错误)。但是我与外界的连接停止工作(例如,无法 ping 到 8.8.8.8)。
这是我正在运行的命令:
sudo vpnc /etc/vpnc/myConfigFile.conf
以下是配置文件的内容:
DPD idle timeout (our side) 0
IPSec gateway my.vpn.gateway.gov
IPSec ID ipsec
IKE Authmode psk
IPSec secret ipsec
Local Port 10008
NAT Traversal Mode natt
No Detach
Xauth username <myUsername>
Xauth password <myPassword>
/var/log/sysLog 中的内容如下:
May 3 12:53:04 panther systemd-udevd[8206]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable. #this is when I started the VPN
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.1192] manager: (tun0): new Tun device (/org/freedesktop/NetworkManager/Devices/11)
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.1480] devices added (path: /sys/devices/virtual/net/tun0, iface: tun0)
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.1481] device added (path: /sys/devices/virtual/net/tun0, iface: tun0): no ifupdown configuration found.
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.2872] device (tun0): state change: unmanaged -> unavailable (reason 'connection-assumed', sys-iface-state: 'external')
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.3018] keyfile: add connection in-memory (d147f959-6e50-4940-8236-9a4100107d93,"tun0")
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.3086] device (tun0): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.3135] device (tun0): Activation: starting connection 'tun0' (d147f959-6e50-4940-8236-9a4100107d93)
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.3404] device (tun0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.3448] device (tun0): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.3462] device (tun0): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.3467] device (tun0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.3482] device (tun0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.3491] device (tun0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
May 3 12:53:04 panther NetworkManager[900]: <info> [1525369984.3581] device (tun0): Activation: successful, device activated.
May 3 12:53:04 panther dbus-daemon[835]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.14' (uid=0 pid=900 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
May 3 12:53:04 panther systemd[1]: Starting Network Manager Script Dispatcher Service...
May 3 12:53:04 panther dbus-daemon[835]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
May 3 12:53:04 panther systemd[1]: Started Network Manager Script Dispatcher Service.
May 3 12:53:04 panther nm-dispatcher: req:1 'up' [tun0]: new request (2 scripts)
May 3 12:53:04 panther nm-dispatcher: req:1 'up' [tun0]: start running ordered scripts...
May 3 12:53:34 panther org.gnome.Shell.desktop[1621]: [2066:2087:0503/125334.475252:ERROR:connection_factory_impl.cc(416)] Failed to connect to MCS endpoint with error -21
May 3 12:53:34 panther NetworkManager[900]: <info> [1525370014.5319] devices removed (path: /sys/devices/virtual/net/tun0, iface: tun0)
May 3 12:53:34 panther NetworkManager[900]: <info> [1525370014.5433] device (tun0): state change: activated -> unmanaged (reason 'unmanaged', sys-iface-state: 'removed')
May 3 12:53:34 panther nm-dispatcher: req:2 'down' [tun0]: new request (2 scripts)
May 3 12:53:34 panther nm-dispatcher: req:2 'down' [tun0]: start running ordered scripts...
May 3 12:53:34 panther gnome-shell[1012]: Removing a network device that was not added #this is when I ctrl+c out of the VPN
May 3 12:53:34 panther gnome-shell[1621]: Removing a network device that was not added
May 3 12:53:34 panther gnome-shell[1621]: JS ERROR: TypeError: connectionSettings is null#012_updateConnection@resource:///org/gnome/shell/ui/status/network.js:1924:9#012wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
我不太清楚如何解释 sysLog 条目,甚至不知道这是否是寻找线索的正确地方。我甚至不确定这是我的 18.04 设置的问题、vpnc 问题、网络问题还是其他什么。我发现类似问题的答案似乎都集中在防火墙设置上,但我没有安装防火墙。希望得到一些指导。
答案1
解决方案在这里:无需组密码即可从 Ubuntu 18.04 连接到 Cisco VPN
它围绕 network-manager-openconnect-gnome 工作