Set-up and Use of Virtual Private Network under Linux

Cisco Anyconnect VPN

It is recommended to use the Cisco Anyconnect VPN client.
Optionally an Open Source solution can be used.

Open Source solution on Ubuntu

This method only works when using the Microsoft Authenticator-app with push-messages.

Installing network-manager-openconnect

sudo apt install openconnect network-manager-openconnect network-manager-openconnect-gnome python3-pip python3-pyqt5 python3-pyqt5.qtwebengine
pip install --user openconnect-sso
export PATH=$PATH:/home/$USER/.local/bin
echo "export PATH=\$PATH:/home/$USER/.local/bin" >> .bash_profile


Open network settings and click on the plus symbol at the bottom left hand side.
Choose VPN and then select Cisco AnyConnect Compatible VPN (openconnect).
Give the connection a name and fill in as gateway.


In the network manager, click on the VPN connection and then on the settings icon on the bottom right hand side.
Click IPV4 and fill in the following for Routes:
Enable "Use this connection only for resources on its network".

Restart the network services:
sudo service networking restart
sudo service network-manager restart

Other MFA-options

OpenConnect SSO wrapper

The VPN connection can then be made using the command line:

openconnect-sso --server