在linux中使用GlobalProtect

image

在linux中使用GlobalProtect

背景

GlobalProtect是一个VPN工具

在linux下面可以使用openconnect代替

Ubuntu18.04中通过apt安装的openconnect版本不是最新的,要8.0以上版本才支持GlobalProtect,所以需要编译源码

编译及安装

获取源码

git clone https://github.com/openconnect/openconnect.git

生成configure文件

cd openconnect && ./autogen.sh

config

./configure --with-vpnc-script=/etc/vpnc/vpnc-script

--with-vpnc-script指定了配置文件的搜索路径

configure: error: Package requirements (libxml-2.0) were not met:No package 'libxml-2.0' found

sudo apt install libxml2-dev

make

编写配置脚本

mdkir -p /etc/vpnc/

vi vpnc-script,内容见链接

https://gitlab.com/openconnect/vpnc-scripts/raw/master/vpnc-script

运行

./openconnect --protocol=gp <VPN服务器地址>

输入用户名和密码

打开需要访问的网站,测试是否成功

posted @ 2021-08-12 19:18  bert_qin  阅读(1456)  评论(0编辑  收藏  举报