You first need to install vpnc:
sudo apt-get install vpnc
Following that you can directly invoke vpnc (it requires sudo):
sudo vpnc… and answer the prompts as shown below (mutatis mutandis):
$ sudo vpnc Enter IPSec gateway address: <enter the server address> Enter IPSec ID for 18.104.22.168: <this is the group name (ask you network admins)> Enter IPSec secret for email@example.com: <the password for the group (again ask the network admins)> Enter username for 22.214.171.124: < your username > Enter password for firstname.lastname@example.org: < your password>
In my case the network admins provided the values they had to provide in a CfA email on 2016-12-16.
You can then disconnect with:
To avoid having to manually enter all this information I did the following:
sudo -i cp /etc/vpnc/default.conf /etc/vpnc/myvpn.conf \emacs -nw /etc/vpnc/myvpn.confAnd basically set the above values in the myvpn.conf file (remember to uncomment the lines).
Once you have the myvpn.conf file properly setup you can then simply do:
sudo vpnc myvpn.conf(without having to be in the /etc/vpnc/ directory)
To bring down the VPN do
sudo vpnc-disconnect like before.
For added security (if you are that type of person) you may leave the password line commented as well, this way you'll be prompted for the password each time.