连接VPN
只要你已经安装好OpenConnect,并且已经确认有vpnc-script
脚本(用于配置路由和DNS),接下来使用OpenConnect就非常简单。使用root用户执行以下命令:
openconnect https://vpn.mycompany.com/
如果你有一个基于密码登录的VPN这样就OK了。如果你是用证书,你需要使用-c
选项告诉OpenConnect证书的位置。
你可以给出证书文件名,PKCS#12 or PEM 文件均可,或者如果OpenConnect根据适合的GnuTLS版本构建,则可以以PKCS#11 URL的形式提供证书:
openconnect -c certificate.pem https://vpn.mycompany.com/
openconnect -c pkcs11:id=X_%b04%c3%85%d4u%e7%0b%10v%08%c9%0dA%8f%3bl%df https://vpn.mycompany.com/
你可能需要使用一个类似Jailbreak 的工具从Windows证书商店导出证书。
开始时,你可以忽略在technical 页面上看到的任何关于使DTLS工作需要给 OpenSSL 或 GnuTLS 的修复工作——没有它你也可以继续,尽管你DTLS将使你的连接更快如果你期望你和VPN服务器之间丢包。但是你可以晚点再关注它。
To start with, you can ignore anything you see in the technical page about needing to patch OpenSSL or GnuTLS so that DTLS works — you can survive without it, although DTLS will make your connections much faster if you're experiencing packet loss between you and the VPN server. But you can worry about that later.