Connecting to the LU VPN
20200508 These instructions have been updated. LU changed the way to connect to the VPN. I am investigating whether encryption is enforced.
The Lund University VPN is a system to secure connect from outside the LU network to
services and machines inside the LU network. It should be used when travelling or when
connecting from non secure places.
Instructions on how to configure it for windows and macOS are available at the
official documentation website.
For other systems only generic instructions are given:
Unfortunately the English version is not kept up to date, hence I linked the Swedish one.
Please complain to the linked websites above if you're not happy (it is not maintained by me)
But below I will detail how to configure and install in commonly used GNU/Linux distributions.
LUVPN on Ubuntu 18.04
The VPN connection is based on a networkmanager plugin for gnome.
If you're not running network manager and/or gnome, there might be other solutions, please contact me.
Install the needed packages
sudo apt-get install network-manager-l2tp network-manager-l2tp-gnome
Open the settings dialog

Select Network (1) and click on the
+ symbol next to the VPN

Choose “Layer 2 Tunnelling Protocol (L2TP)”

Insert the following information for the Generic VPN config:
Save by pressing the Add button on top of the window.
Activate the VPN by pressing the switch. You will be asked for the LUCAT password.

If the connection worked, you should see a small lock connected to the network in the notification icons on the upper right, like the one in the picture below:

Disconnecting from the VPN
Once configured, one can easily connect and reconnect to the VPN using the upper right menu:
However, in some cases the browser and other applications will fail to detect the non-vpn network again, so one way to make it happen faster is to restart the network manager AFTER disconnecting from the VPN:
sudo systemctl restart network-manager
Enable VPN security (RECOMMENDED)
In the VPN configuration dialog, click on “IPsec settings”
Enter the information below:


BUG

: You can
skip this step if you're NOT running Ubuntu 18.04. In Ubuntu 18.04 the button “enforce UDP encapsulation” does not work, so it must be set manually in the config file. This workaround below will set ALL the IPsec connections to enable this feature, so use with care if you have IPsec for some other purpose.
Edit
/etc/ipsec.conf
so that the top part looks like this:
# ipsec.conf - strongSwan IPsec configuration file
# basic configuration
config setup
# strictcrlpolicy=yes
# uniqueids = no
forceencaps = yes
restart the l2tp and ipsec services with this command:
sudo systemctl restart xl2tpd strongswan
Known issues
Sometimes when restarting networking the icon on the upper right corner shows that you're disconnected, and the VPN will not connect any longer. It is a gnome3 bug that affects network manager. To solve, it is enough to restart gnome3 by doing the following:
Press Alt
and F2
In the dialog that appears, type r
and press enter
The icon should be restored.
LUVPN on OpenSuSE 15.1
These instructions are fork Kde5 (Plasma). If you have another window manager it might be different.
Install required packages
sudo zypper in NetworkManager-l2tp
Open connection manager. Click on the small computer in the lower right corner (1) and then click on the sliders icon (2)

Click on the
+ plus symbol in the connection manager to add a new connection.

Select the VPN type L2TP

Configure the VPN as shown in the figure, then click Save.

The VPN is now listed in the network manager. Click OK.

Connecting to the VPN
In order to
connect, click on the small computer icon in the lower right corner, identify the VPN network and click on “Connect”

You may be prompted for your LUCAT password. If all goes well, you should see this icon in the lower left corner:

The connection is now established, however it is not very secure. You may need to configure IPsec to encrypt it, see later in this document.
Disconnect from the VPN
To disconnect, open the network manager icon again and click “Disconnect”
Sometimes the applications do not react well after a vpn disconnect. Restarting NetworkManager doesn't help in openSuSE, it just messes up with its configuration. The best is to close and reopen the application or logout and relogin.
::WIP:: Enabling IPsec ::WIP::
Unfortunately at the moment I did not manage to make IPsec work with OpenSuSE. Something is broken in the networkmanager configuration that does not pass the options to the services. In principle it should be enough to configure the IPsec options in the VPN dialog as below:
But it does not work.