Centos安装openconnect客户端

  • 安装openconnect
1
2
# yum install epel-release
# yum install openconnect
  • 使用密码连接
1
2
3
4
5
6
7
# echo yourpass | openconnect -b \
-u vpnuser \
--servercert=pin-sha256:xyz \
--timestamp \
--force-dpd=10 \
--no-dtls \
vpn.your.com
  • 使用证书连接

拷贝客户端证书client-zhangsan.p12到本地服务器

1
2
3
4
5
6
7
# openconnect -b \
-c client-zhangsan.p12 \
--servercert=pin-sha256:xyz \
--timestamp \
--force-dpd=10 \
--no-dtls \
vpn.your.com

--servercert=pin-sha256:xyz是服务端证书指纹,执行openconnect vpn.your.com会提示出来
--force-dpd=10缩短检测间隔,缓解掉线问题,可不加

评论