Skip to content

Installation and Usage of OpenVPN with Linux

Installation

Modern linux distribution support OpenVPN with our configuration profiles out-of-the-box. You should use the most recent client available in your distribution package manager.

Some distributions do not provide an anonymous group nogroup. You can add it using the following command as root:

groupadd nogroup

OpenVPN does not define a default directory where it looks for existing configuration profiles. We recommend to create a directory in your user home, e.g., .openvpn. Then you unpack the archive with the configuration files into this directory:

cd
mkdir .openvpn
cd .openvpn
tar xfz <downloaddir>/openvpn-config-v<version>-linux.tar.gz

Connect OpenVPN

You can either use graphical tools of your desktop environment, or connect from the command line. Using the command line, you can type the following into your terminal window:

openvpn --cd $HOME/.openvpn --config <profile name>.ovpn

You have to pick one of the connection profiles as <profile name>, depending on you affiliation and current location.

Who? Where? Profile
Employee Campusnetz (University campus) pers-pub
Student Campusnetz (University campus) stud-pub
Employee Internet (e.g. from home) pers-ext
Student Internet (e.g., from home) stud-ext

OpenVPN will prompt for username and password.

Connection using OpenVPN > 2.6.0

OpenVPN 2.6.0 introduced a new kernel module to improve performance. This module is enabled by default and can cause problems against our server. Until further notice, we recommend to disable this module until support can be provided. Use the following connection command instead, if you have connection problems:

openvpn --cd $HOME/.openvpn --disable-dco --config <profile name>.ovpn

The connection will be established after a while (may take up to 30 seconds). OpenVPN will log a message like Initialization sequence completed, as soon as the connection has been successful.

If you have problems with the authentication you will get the username and password prompt again. Please check the following common problems:

  • Did you enter your username and pasword correctly?
  • Is your password still valid and do you have enough emergency logins available?
  • Do you have another VPN connection with the same credentials active? Only one connection profile can be opened per user simultaneously. After an unexpected connection loss it can take a few minutes until the server accepts a new connection from the same user.
  • Did you pick the correct profile for your account and location?
  • Try again after a few minutes. There might have been a temporary issue on the server side that might have resolved itself in the meantime.

Disconnect OpenVPN

You can terminate the OpenVPN connection by pressing Ctrl-C in the terminal that opened the connection.

If you disconnect your network connection without disconnecting openvpn first, it will take a few minutes until the server will clean up the inactive connection and allow a reconnect. During this time you might be unable to connect using openvpn. We recommend to disconnect the openvpn connection before you terminate the network connection.