Maintenance

  • Home
  • Log in
  • « Adjust blog look/feel
  • Moving to new machine »

Using UVic VPN in Gnome

Posted by gregster on 19 Feb 2019 in Documentation, Announcements

The Cisco AnyConnect client is an encumbrance, especially when trying to use the VPN in a script. Fortunately, there's a workaround - openconnect. Here's how to use it:

  1. Install a package: sudo apt install network-manager-openconnect-gnome
  2. CLI:
    • Create a new interface that a regular user can use: sudo ip tuntap add vpn0 mode tun user greg
    • Connect: openconnect --authgroup=Default --quiet --interface=vpn0 --script='sudo -E /usr/share/vpnc-scripts/vpnc-script' https://vpn.uvic.ca --user=$NETLINKID
  3. GUI:
    • open Gnome Control Centre -> Network
    • Add a VPN by clicking the + and choosing 'Cisco AnyConnect Compatible VPN (openconnect)
    • Fill in the gateway. Configuration complete.

NOTE: read the docs for more info on why things are done this way

NOTE: if you need to debug a connection, add '--dump-http-traffic' to your command

NOTE: to remove a network device do 'ip link delete $DEVICE' - e.g. 'sudo ip link delete vpn0'

NOTE: this method has been tested successfully from off-campus.

Command explained
=================

  • authgroup: Default or VPN Multi Factor (you can use a YubiKey, but I don't think it has any effect in our case)
  • interface: the interface created above. Note that this allows network-facing code to run without root. The vpnc script needs root, but that isn't the same, see here
  • script: there is a script that gets run once the handshake is done. It's located at /usr/share/vpnc-scripts on Ubuntu.
This entry was posted by Greg and filed under Documentation, Announcements.

Maintenance

This blog is the location for all work involving software and hardware maintenance, updates, installs, etc., both routine and urgent.
  • Home
  • Recently
  • Archives
  • Categories

Search

Categories

  • All
  • Announcements
  • Hit by a bus
  • Labs
    • Activity log
    • Documentation
  • Notes
  • R & D
    • Activity log
    • Documentation
  • Servers
    • Activity log
    • Documentation
  • Tasks

All blogs

  • Academic
  • AdaptiveDB
  • Admin
  • Announcements
  • CanMys
  • Cascade
  • CGWP
  • ColDesp
  • Depts
  • DVPP
  • Endings
  • HCMC Blogs
  • Landscapes
  • LEMDO
  • Linguistics
  • Maint
  • LondonMap
  • Mariage
  • MoM
  • Moses
  • Pro-D
  • Projects
  • ScanCan
  • HumsSites
  • Wendat

This collection ©2023 by admin • Help • Run your own website!