A bash script for MacOS that can be used to disable and re-enable Global Protect. (Based on a solution from https://kb.mc3.edu/article.php?id=11457)
Clone this repo. Note: probably global protect needs to be disabled from the UI before you can access GitHub, which in itself dempostrates why this kind of command line tool is useful!
git clone git@github.com:jmfife/globalprotectupdn.git
Make sure you have a place to keep scripts that is in PATH, e.g. in /Users/<user_id>/bin
. If you don't have it already, do the following (assuming here you are running zsh
).
mkdir ~/bin
echo "export PATH=\"\$HOME/bin:\$PATH\"" >> ~/.zshrc
exec zsh
Install gp there.
cp globalprotectupdn/gp ~/bin
chmod +x ~/bin/gp
Now you can remove the Git repo if you like.
rm -rf globalprotectupdn
gp [-h] [up|dn]
-h Display help message
up Activate Global Protect
dn De-Activate Global Protect
% gp
Global Protect Enabled
% gp dn
Disabling Global Protect
% gp
Global Protect Disabled
% gp up
Re-Enabling Global Protect
% gp
Global Protect Enabled