我需要在 Linux 上连接到 Cisco VPN,起初我使用 KDE NetworkManager 等离子小部件 thingy 来完成此操作。这很好,如果我从网络管理器小部件中选择它,我就可以连接到 VPN。
但是,如果我尝试使用命令行,则无法正常工作(IP 和 URL 已更改以保护无辜者):
➜ ~ sudo openconnect --proxy http://proxy.mycompany.com:8080 vpn.mycompany.com:443
POST https://vpn.mycompany.com/
Attempting to connect to proxy 172.17.122.135:8080
Requesting HTTP proxy connection to vpn.mycompany.com:443
Unexpected continuation line after CONNECT response: 'Via: 1.1 SPROXY2'
Unexpected continuation line after CONNECT response: 'X-WebMarshal-RequestID: 445D5E14-309A-4AA2-B7AF-07CAAD5BB21D'
SSL negotiation with vpn.mycompany.com
Server certificate verify failed: signer not found
Certificate from VPN server "vpn.mycompany.com" failed verification.
Reason: signer not found
Enter 'yes' to accept, 'no' to abort; anything else to view: yes
Connected to HTTPS on vpn.mycompany.com
Got HTTP response: HTTP/1.0 302 Object Moved
GET https://vpn.mycompany.com/
Attempting to connect to proxy 172.17.122.135:8080
Requesting HTTP proxy connection to vpn.mycompany.com:443
Unexpected continuation line after CONNECT response: 'Via: 1.1 SPROXY2'
Unexpected continuation line after CONNECT response: 'X-WebMarshal-RequestID: 39FA73DC-1FDD-4C4C-A1A6-5993477DD8E3'
SSL negotiation with vpn.mycompany.com
Server certificate verify failed: signer not found
Connected to HTTPS on vpn.mycompany.com
Got HTTP response: HTTP/1.0 302 Object Moved
GET https://vpn.mycompany.com/+webvpn+/index.html
Requesting HTTP proxy connection to vpn.mycompany.com:443
Unexpected continuation line after CONNECT response: 'Via: 1.1 SPROXY2'
Unexpected continuation line after CONNECT response: 'X-WebMarshal-RequestID: 0141A4E6-1EA7-4FAE-AFA0-E56B2BC07BD1'
SSL negotiation with vpn.mycompany.com
Server certificate verify failed: signer not found
Connected to HTTPS on vpn.mycompany.com
Please enter your username and password.
GROUP: [1..VPN|2..AD]:2
Auth choice "2" not valid
Failed to obtain WebVPN cookie
➜ ~
我收到提示证书验证失败,然后提示我选择组,但随后一切都失败了,“Auth 选择“2”无效”。
我为 openconnect 命令尝试了不同的选项。例如 -g 指定组 -u 指定用户名和 --no-cert-check 跳过失败的证书检查,但没有任何作用。
如您所见,我正在使用代理。这可能与此有关,但我不确定它是如何(也许?)影响这一点的。
我不明白 openconnect 如何通过 NetworkManager KDE 小部件工作,但在命令行上失败。我在这里错过了什么吗?
你一定是在跟我开玩笑!!!
所以问题是当我看到以下选项时:
我选择了“2”并按下回车键!只是为了好玩,我什至尝试输入“AD”而不是使用“2”,但仍然没有运气。
刚才我尝试输入“2..AD”......并且成功了!
令人难以置信的愚蠢“用户体验”!