Installing Openconnect for Palo Alto GlobalProtect VPN

First, install git and the dependencies on your Ubuntu machine using

sudo apt install git build-essential gettext autoconf automake libproxy-dev libxml2-dev libtool vpnc-scripts pkg-config libgnutls28-dev

Then clone the openconnect git repo using:

git clone git://

To build the openconnect binary enter the following:

cd openconnect
make -j4
sudo make install && sudo ldconfig

To connect to a GlobalProtect VPN gateway use the following:

sudo openconnect --protocol=gp <gateway-IP-or-hostname>

Accept any certificates and enter your username and password. Approve MFA request if needed.