https://www.vultr.com

The Everywhere Cloud

Deploy an instance.
Accelerate your application.


Accessing the GlobalProtect VPN via Terminal


The following procedure demonstrates how to connect to the GlobalProtect VPN via command-line terminals.

==========

1. Install openconnect (at least version 8) and dnsmasq.

1.1. Debian-based Linux

user@host: $ sudo apt-get update
user@host: $ sudo apt-get install openconnect dnsmasq

2. Make a simple shell script to automate the login.

#!/bin/sh
#BEGIN CODE with the shebang above.

user=`whoami`; if [ $user != "root" ]; then echo "sudo required"; exit; fi

echo -n "VPN_PASSWORD" | sudo openconnect --protocol=gp --user=VPN_USERNAME --passwd-on-stdin https://VPN_DOMAIN_NAME

#END CODE

3. Save the shell script and execute.

3.1. Using the shell command.

user@host: $ sh myshellscript.sh

3.2. By itself after changing the mode to executable.

user@host: $ chmod +x myshellscript.sh
user@host: $ ./myshellscript.sh

==========

Comments

Popular posts from this blog

Enabling HTTPS in Home Assistant

Configuring the FreeBSD Firewall with IPFW

Running Home Assistant on FreeBSD Servers