Openconnect 无法在 Arch Linux 中连接

Tom*_*Cho 5 arch-linux vpn openconnect

openconnect在我的 Arch Linux(准确地说是 Antergos)中遇到了一些问题,我不知道是什么原因造成的。(虽然我已经习惯了 linux 等等,但我对 VPN 和openconnect. 还是很陌生。)

我正在尝试通过 2 种方法连接到我大学的 VPN。我首先按照说明进行操作,其中只是说要创建 Cisco AnyConnect Compatible VPN 并输入名称和网关。

当我这样做并尝试通过网络管理器小程序进行连接时,它不起作用。当我翻转 VPN 开关时,它会立即翻转回来,仅此而已。没有错误信息或任何东西。

我正在尝试的第二种方法是通过命令行。所以我试试这个

$ sudo openconnect -u myusername my.gateway.edu
Run Code Online (Sandbox Code Playgroud)

my.gateway.edu从现在开始,我将使用用户名和模糊相关 IP替换实际网关)

这是我从该输入中获得的日志:

POST https://my.gateway.edu/
Connected to 164.**.**.**:443
SSL negotiation with my.gateway.edu
Server certificate verify failed: signer not found

Certificate from VPN server "my.gateway.edu" failed verification.
Reason: signer not found
To trust this server in future, perhaps add this to your command line:
    --servercert sha256:bb2476a96b88357fe74f28a347ba549a2af4bea8668e30a77e1a8295f466bfdc
Enter 'yes' to accept, 'no' to abort; anything else to view: yes
Connected to HTTPS on my.gateway.edu
Got HTTP response: HTTP/1.1 401 Unauthorized
Error generating GSSAPI response:
gss_init_sec_context(): Unspecified GSS failure.  Minor code may provide more information
gss_init_sec_context(): SPNEGO cannot find mechanisms to negotiate
Server 'my.gateway.edu' requested Basic authentication which is disabled by default
GET https://my.gateway.edu/
Connected to 164.**.**.**:443
SSL negotiation with my.gateway.edu
Server certificate verify failed: signer not found
Connected to HTTPS on my.gateway.edu
Got HTTP response: HTTP/1.1 401 Unauthorized
No more authentication methods to try
GET https://my.gateway.edu/
Please enter your username.
POST https://my.gateway.edu/auth
Please enter your password.
Password:
POST https://my.gateway.edu/auth
Got CONNECT response: HTTP/1.1 200 CONNECTED
CSTP connected. DPD 90, Keepalive 32400
Connected as 169.**.***.**, using SSL
DTLS handshake failed: Resource temporarily unavailable, try again.
Failed to open tun device: No such device
Set up tun device failed
Unknown error; exiting.
Run Code Online (Sandbox Code Playgroud)

我问过大学的 IT 支持,但他们也不知道发生了什么(我认为他们对 Arch Linux 不是很熟悉)。我尝试了其他一些事情,例如使用标志,--script /etc/vpnc/vpnc-script但结果是一样的。

编辑

我最近通过 IT 人员访问这个网站,他们说我必须在连接之前创建一个隧道设备。即使这样做了,结果sudo openconnect -u myusername my.gateway.edu --interface tun1还是一样。

Meh*_*ian 6

我刚刚遇到这个问题。另一个解决方案对我不起作用,但经过一番谷歌搜索后,我发现这个线程解释/假设问题是由pacman -Syu导致内核更新引起的,结果是存在一些不匹配的事情只需重新启动计算机即可解决。老话说得好“把它关掉然后再打开”!


Tom*_*Cho 0

在我使用此链接创建隧道设备后,CLI 方法起作用了,尽管 GUI 方法仍然失败。我也是networkmanager-vpnc通过pacman安装的,但我认为这与任何事情都没有关系。

我还通过 IT 人员发现添加该--http-auth=Basic标志可以消除一些错误。值得注意的是,即使在这一切之后,我仍然得到一个DTLS handshake failed,即使我可以连接到我需要的服务器。