TCNJ Linux VPN Setup Tutorial
If at any point in this tutorial a command fails, install the recommended package using
sudo apt-get install <package name>, where
<package name> should be replaced by an actual package name.
Run the following command to install the libraries required to run the VPN:
$ sudo apt-get install build-essential gettext autoconf automake libproxy-dev libxml2-dev libtool vpnc-scripts pkg-config \ libgnutls-dev # libgnutls28-dev on recent Debian/Ubuntu-based distros
Navigate to the directory where you keep installed programs.
Run the following commands to install the OpenConnect VPN client extended to support Palo Alto Networks’ GlobalProtect VPN. Prefix each command with
sudoif modifying the current directory requires root privileges:
$ git clone https://github.com/dlenski/openconnect.git $ cd openconnect $ git checkout globalprotect $ ./autogen.sh $ ./configure $ make $ sudo make install && sudo ldconfig
Create a file named
tcnj-vpn(no file extension) and write the following code to it using your favorite text editor:
where/you/installed/openconnect/openconnect --protocol=gp vpn-gw-ft.tcnj.edu --quiet --user=usernamesudo /absolute/path/to/
/absolute/path/to/where/you/installed/openconnectshould be replaced by the absolute path to the directory where you installed OpenConnect (check using
usernameshould be replaced by your TCNJ username.
Note that the additional
openconnectat the end of the path is intentional. It is the name of the executable in the
Run the following command to ensure the file is executable:
$ chmod u+x tcnj-vpn
Move the file named
tcnj-vpnto the directory
/usr/bin. You may be unable to do this using the standard drag-and-drop GUI due to root privileges requirements. In that case run the following command:
$ sudo mv tcnj-vpn /usr/bin
You have successfully configured your TCNJ Linux VPN!
To connect to the VPN simply run the following command from any directory and enter your password when prompted:
You may ignore any output unrelated to incorrect credentials.
Note that you will be unable to work from the terminal window where you ran the command so simply open another terminal window if you wish to continue working. Alternatively you could run the command in the background.
To disconnect simply open the terminal window where you ran the
tcnj-vpn command and press CTRL+C.