Skip to main content

Connect to the VPN using openconnect on Mac OS X

You will need to run as 'root' to connect.

System Requirements

  • A modern version of OS X: openconnect is should work on most recent OS X versions. It has been tested and seems to function correctly as far back as 10.9.
  • Mac OS X TUN/TAP driver, which allows for creation of the virtual network interface.

Installing openconnect

Install using homebrew or macports

The built openconnect package is available using macports or homebrew. You can install using one of these two programs, then install the TUN/TAP driver. You will need administrative privileges on the machine you are installing this on.

  1. Install homebrew or Macports.
  2. Open Terminal and update the package cache using the command
    sudo brew update
  3.  Install the openconnect package using the command:
    sudo brew install openconnect
    1. If using macports, you can use the command:
      sudo port install openconnect
  4. Install the Mac OS X TUN/TAP driver
  5. Optional: If you would like to run openconnect without admin privileges, you can add a line to your sudoers file to allow this. The line could look something like this:
    %admin  ALL=(ALL) NOPASSWD: /usr/local/bin/openconnect

Building from source

  1. Ensure you have the dependencies needed for the package.
  2. Install the vpnc script to /etc/vpnc/vpnc-script
  3. Check the source code out from the openconnect Git repository or download a tarball from the openconnect website.
  4. Untar the code to a directory and build and install it with:
  5. ./configure
  6. make
  7. make install
  8. Optional: if you would like to run openconnect without admin privileges, you can add a line to your sudoers file to allow this. The line could look something like this:
    %admin  ALL=(ALL) NOPASSWD: /usr/local/bin/openconnect

Running openconnect

  1. From the Terminal, run
    openconnect -u  webvpn2.purdue.edu
  2. You will be prompted for your Kerberos password, and then the VPN client will connect.
  3. Once connected, you will have an IP address that begins with 18.100. You can verify this using ifconfig, and checking the address for tun0.

To disconnect, simply press Ctrl-C in the terminal window to end the program.

Resources

Purdue University College of Science, 150 N. University St, West Lafayette, IN 47907 • Phone: (765) 494-1729, Fax: (765) 494-1736

Student Advising Office: (765) 494-1771, Fax: (765) 496-3015 • Science IT, (765) 494-4488

© 2023 Purdue University | An equal access/equal opportunity university | Copyright Complaints

Trouble with this page? Disability-related accessibility issue? Please contact the College of Science Webmaster.