📌 置頂: 請把任何比你弱勢的用路人當作你的至親對待。跟前車保持安全車距 (2秒以上)。

Using OpenConnect for UNC-CH VPN on Linux

In

Tags:



by

I don’t have good luck with UNC-Chapel Hill’s VPN installation guide for Linux systems (KB0010220, login required). After several tests with Cisco AnyConnect provided in the KB post, they all end up with the following message:

$ sudo /opt/cisco/anyconnect/bin/vpn connect vpn.unc.edu

>> error: The service provider in your current location is restricting access to the Internet. You need to log on with the service provider before you can establish a VPN session. You can try this by visiting any website with your browser.

Fortunately, we can use OpenConnect to replace AnyConnect on this. First, since the VPN is self-signed, we will need to trust it anyway, by obtaining the server certificate with the highlight line (--servercert ....):

Then, we can connect to the VPN with the following command:

With group UNCCampus and your Onyen account name, password, and 2FA option (prefer push). You may need sudo for openconnect command if you received permission denied after all.


Update @ 06/09/2023

Months after this post, the original method shows the following error message:

At the first glance I thought it is caused by signer not found, and after searching online there were no solution for this from client side. Months later I realized the root cause is the CSD script where it shows -:1.1: Document is empty, this lead to this issue and this workaround.

By the workaround, using the following temporary OpenSSL config should fix this problem:

Then, invoke openconnect as the following to connect to the VPN:

Update @ 04/11/2024

The above method failed.

Change to use openconnect-sso to connect:


Comments

One response to “Using OpenConnect for UNC-CH VPN on Linux”

  1. Jesse Wei avatar
    Jesse Wei

    Cool post Louie!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.