Using OpenConnect for UNC-CH VPN on Linux

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

>> 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.


BTH: 35QooNA82isrmQLmpEnqXpJoxeZmaPubPf



Leave a reply:

Your email address will not be published.

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料