UiBhelp's public knowledge cards

KI 0775 Connect to VPN from private Linux PC

(updated )
How to download, install and connect VPN with Cisco AnyConnect from your private Linux PC. 
Before you can use VPN with Cisco AnyConnect, multi-factor authentication must be activated for your user account.

First time use
  1. Make sure the PC on which you are installing Cisco AnyConnect is actually connected to the Internet.
     
  2. Open a web browser, e.g. Mozilla Firefox or Google Chrome, and go to https://vpn3.uib.no.

     
  3. Log in with your UiB username (NB! on the form abc123, not firstname.lastname and without adding @uib.no) and your password.

    With multi-factor authentication (MFA) on your account, you must approve the login on the mobile. If you have chosen to use an authentication app on your mobile (recommended!), You will receive a notification on your mobile that you must approve before it connects.
     
  4. Click Download for Linux. If you are asked to open or save, select save.

     
  5. Open a terminal, go to the folder where you downloaded the file. Type
    sudo bash anyconnect-linux64-4.0.01095-core-vpn-webdeploy-k9.sh
    (The version number may have changed since this guide was created. Check the file name you downloaded from vpn3.uib.no.)
  6. Open the Cisco AnyConnect program by moving to applications then enter cisco anyconnect, then click on the icon.

     
  7. The first time you log in, you will not see any profiles. These are downloaded the first time you log in by typing vpn3.uib.no in the connect to field, then clicking connect, after entering the username and password, the profile is downloaded.

     
  8. With multi-factor authentication (MFA) on your account, you must approve the login on the mobile.

     
  9. Click disconnect, then close the program by clicking the X in the upper right corner. You have now completed the installation of Cisco Anyconnect.
Using Cisco AnyConnect after installation
  1. Open Cisco AnyConnect and make sure you have the alternatives UiB VPN and UiB SAFE by clicking the arrow down icon.

     
  2. Select the connection you want.
    The UiB VPN profile is for a normal VPN connection to the UiB network (when you need a UiB ip address to access a common file area on UiB, library services, or other services reserved for UiB's ip addresses).
    To reach SAFE secure desktops, you must use the UiB SAFE profile. This only gives access to SAFE secure desks at UiB, this service does not give you a UiB ip address.
     
  3. After selecting the profile you want to use, click connect.
     
  4. You will now be logged in. If you are already logged in to your Microsoft 365 (Work or School) account on this machine, it should happen automatically and almost invisibly.
    If you are not logged in, a window will appear asking you to log in as usual and confirm with multi-factor authentication.
--
Troubleshooting
Installation fails with error message: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory
This problem is known to happen on computers with Ubuntu 26.04. Run the following commands to solve the problem:
  • cd /usr/lib/x86_64-linux-gnu
  • sudo ln -s libxml2.so.16 libxml2.so.2
--

Error message when you try to connect: Connect capability is unavailable because the VPN service is unavailable.
This means that the VPN service isn't running on the the computer. The VPN client need this service. You mat start the VPN service with the following command:
  • sudo /opt/cisco/secureclient/bin/vpnagentd
It is usually better to let the VPN service be always running on the computer. On Ubuntu computers, you may do this with the following commands:
  • sudo systemctl enable vpnagentd.service
  • sudo systemctl start vpnagentd.service