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. Mabye try to use git-bash or something, I really don’t know.Linux
sudo apt update && sudo apt install openconnect
macOS
brew install openconnect
Windows
¯\_(ツ)_/¯
# Step 2: Creating an alias
(shortcut)
To save yourself from writing a long command everytime you need to use the VPN, we can create an alias.
This will depend of which shell you are using, I am using ZSH, but the steps are similar for BASH as well.
nano ~/.zshrc
.bashrc
if you are using BASH
- Paste this at the end of the file, and change the username:
alias vpn="sudo openconnect --user=abc001 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. - Run
source .zshrc
You should now be able to run the command vpn
to connect to UiB VPN.
# Step 3: How to use
- Run
vpn
- Input your computer-password
- Input your UiB password
- (Optional) Input your Microsoft 2FA code
- Sucess!
# Disconnecting
Press CTRL+C
# Suggestions and/or questions
If you have any questions, please feel free to contact me!