我正在努力使用 Juniper ncsvc CLI VPN 客户端,它曾经对我有用,但最近坏了,我怀疑这是由于 HTTPS SSL 证书问题造成的:
cat ~/.juniper_networks/network_connect/ncsvc.log
20150930152023.821647 ncsvc[p32325.t32325] ncsvc.info New ncsvc log level set to 5 (nccommon.cpp:75)
20150930152023.821693 ncsvc[p32325.t32325] sysdeps.info restoring DNS settings... (sysdeps.cpp:975)
20150930152023.821703 ncsvc[p32325.t32325] sysdeps.error rename /etc/jnpr-nc-resolv.conf => /etc/resolv.conf failed wirh error 2 (sysdeps.cpp:978)
20150930152023.821710 ncsvc[p32325.t32325] sysdeps.error rename /etc/jnpr-nc-hosts.bak => /etc/hosts failed wirh error 2 (sysdeps.cpp:982)
20150930152023.824362 ncsvc[p32325.t32325] ncsvc.info Connecting to vpn.company.com:443 (ncsvc.cpp:500)
20150930152023.844579 ncsvc[p32325.t32325] dsclient.para DSClient::authenticate(): user:..., password:..., cert:0, realm:... (dsclient.cpp:284)
20150930152023.848116 ncsvc[p32325.t32325] DSInet.info IVE host vpn.company.com resolved to 212.203.116.107, port 443 (dsinet.cpp:311)
20150930152023.848241 ncsvc[p32325.t32325] http_connection.para Starting a timed connect with SSL session 0x933cc90, proxy (null):0, and timeout 30 (http_connection.cpp:236)
20150930152023.848251 ncsvc[p32325.t32325] http_connection.para Entering state_start_connection (http_connection.cpp:351)
20150930152023.848258 ncsvc[p32325.t32325] http_connection.para Remote Address: ip=212.203.116.107, port=443, familiy=2 (http_connection.cpp:799)
20150930152023.848271 ncsvc[p32325.t32325] http_connection.para Remote Server=vpn.company.com (http_connection.cpp:801)
20150930152023.848277 ncsvc[p32325.t32325] http_connection.para Local Address: ip=0.0.0.0, port=0, familiy=2 (http_connection.cpp:806)
20150930152023.848282 ncsvc[p32325.t32325] http_connection.para Proxy Address: ip=(null), port=0, familiy=0 (http_connection.cpp:811)
20150930152023.864122 ncsvc[p32325.t32325] http_connection.para Entering state_continue_connection (http_connection.cpp:368)
20150930152023.864188 ncsvc[p32325.t32325] http_connection.para Entering state_ssl_connect (http_connection.cpp:538)
20150930152023.880107 ncsvc[p32325.t32325] dsssl.error SSL_connect failed. Error 5 (DSSSLSock.cpp:1619)
20150930152023.880153 ncsvc[p32325.t32325] http_connection.para Returning DSHTTP_ERROR from state_ssl_connect (http_connection.cpp:553)
20150930152023.880160 ncsvc[p32325.t32325] http_connection.para do_connect error: state 5, err 5 (http_connection.cpp:341)
20150930152023.880215 ncsvc[p32325.t32325] DSInet.error failed to connect to (vpn.company.com) error 5 (dsinet.cpp:383)
20150930152023.880229 ncsvc[p32325.t32325] dsclient.error unable to open URL: (https://vpn.company.com/launcher) with error -7 (dsclient.cpp:299)
20150930152023.880238 ncsvc[p32325.t32325] ncapp.error Failed to authenticate with IVE. Error 2 (ncsvc.cpp:231)
20150930152023.880261 ncsvc[p32325.t32325] dsncuiapi.para DsNcUiApi::~DsNcUiApi (dsncuiapi.cpp:83)
即将https://cryptoreport.thawte.com/checker/并输入 vpn.company.com => “证书安装不正确。您有 1 个错误,缺少中间证书:Thawte SSL CA | 下载证书”。Firefox 41(但不是 Chromium 45)同样抱怨https://vpn.company.com
因此我猜测应该能够以某种方式在客户端手动安装这个缺失的中间证书(不是服务器,我无法控制;正在等待内部 IT 的响应...)。cryptoreport.thawte.com 方便地提供了下载,因此我了解到:
cd Downloads
mv Thawte\ SSL\ CA.txt Thawte_SSL_CA.crt
file Thawte_SSL_CA.crt
openssl x509 -in Thawte_SSL_CA.crt -text
sudo cp Thawte_SSL_CA.crt /usr/share/ca-certificates/
sudo chmod w+r /usr/share/ca-certificates/Thawte_SSL_CA.crt
sudo dpkg-reconfigure ca-certificates
sudo update-ca-certificates
然而,Firefox 仍然不开心,但我从中吸取了教训https://askubuntu.com/questions/244582/add-certificate-authorities-system-wide-on-firefox这是正常的,因为“Firefox 没有一个‘中心’位置来查找证书。它只是查看当前配置文件。这就是为什么修改 /usr/share/ca-certificates 或其他类似目录无法在 Firefox 中使用的原因。” - 很好。所以我手动将 Thawte_SSL_CA.crt 添加到 Firefox。仍然不高兴,说:安全连接失败。连接到 vpn.company.com 时发生错误。Peer 的证书颁发者已被用户标记为不信任。(错误代码:sec_error_untrusted_issuer)。您尝试查看的页面无法显示,因为无法验证收到的数据的真实性。请联系网站所有者以告知他们此问题。
甚至 Juniper ncsvc CLI VPN 客户端也存在同样的问题。我没有在该特定工具中看到忽略 SSL 验证的选项。
客户端没有办法解决缺少中间 SSL 证书的问题吗?我只想(在这里学到一些东西,然后)让该死的 VPN 正常工作!;-) 唯一的解决方案是让 Web 服务器操作员正确配置此服务器端吗?
答案1
请按照以下说明操作:
单击“开始”,然后选择“运行”并输入 mmc。
单击“文件”并选择“添加/删除管理单元”。
选择“添加”,在独立管理单元列表中选择“证书”,然后单击“添加”。
选择计算机帐户并单击下一步。
选择本地计算机并单击完成。
最好查看以下链接来安装缺少的中间 SSL 证书: