If you are a student at the University of Bergen (UiB), you might have discovered that UiB now uses Cisco AnyConnect instead of their own, self-hosted alternative like before. Personally, I find the Cisco AnyConnect app to be very privacy invading, demaing all these different privileges… so I started looking for alternatives. Luckily, I found an open-source alternative, OpenConnect.
Step 1: Installation
Firstly, you need to install OpenConnect.
sudo apt update sudo apt install openconnect
brew install openconnect
Step 2: Getting your VPN certificate
- Login on vpn3.uib.no, with your UiB credentials (abc001)
- Right-click anywhere and click
Show page info
- There should be a “tab” named
Security, click that
- In Firefox, under Miscellaneous, you should be able to find a section that says “Download”, choose
PEM (cert)and save it to your downloads folder (
Step 3: Setting up the certificate
Now that you have managed to retrieve your VPN certificate, you need to setup the certificate so that you will be able to use it.
I created a folder in my home directory (
.cert, so that it is hidden whenever I navigate my files via the File Explorer/Browser.
You can also do that, just do the following:
cd ~/ mkdir .cert mv Downloads/vpn3-uib-no.pem .cert/
Now the certificate is ready to be used when we connect with OpenConnect
Step 4: Creating an
To save yourself from writing a long command everytime you need to use the VPN, we can create an alias.
.bashrcif you are using BASH
- Paste this at the end of the file, and change the username:
alias vpn="sudo openconnect --user=abc001 --cafile=~/.cert/vpn3-uib-no.pem vpn3.uib.no"
- To save and exit out of
nano, press CTRL+X and then Y (for yes) and then Enter to write the changes.
You should now be able to run the command
vpn to connect to UiB VPN.
Step 5: How to use
- Input your computer-password
- Input your UiB password
- (Optional) Input your Microsoft 2FA code
Suggestions and/or questions
If you have any questions, please feel free to contact me!