208 208.fi

Multi-Factor Authentication at the Edge of the Network

How we have Hardened our VPN Gateway


The outermost layer of our security architecture is a VPN gateway that remote users and work sites must be connected to in order to authenticate with services that are published in our internal DNS, such as email and our enterprise resource planning system.

Because the outer layer must remain accessible to partners and customers roaming anywhere in the Internet, we must pay special attention to how to keep it secure.

Certificates first

We have hardened our VPN gateway by restricting the choice of supported communication protocols and encryption protocols. Thanks to our private certificate and key infrastructure, gateways and terminal devices can securely authenticate each other.

As part of setting up a secure TLS connection, the parties must present their certificates. A random opportunistic hacker cannot possibly present a valid certificate that is signed by our private certificate authority. After successful certificate validation, all communication between the parties will be encrypted with a unique session key.

The certificates that protect the connections between our servers will be renewed every few days. Requiring end users to upgrade their certificates that often would be quite a nuisance. People can be on vacation and their devices offline or not covered by centralised asset management. We can request users to install a new certificate once or twice per year. But that is a long time, in case a certificate happens to leak to the wrong hands.

Not all eggs in one basket

The VPN technology of our choice supports multi-factor authentication: certificates and a one-time password. Adding a fixed password would not really improve security. If a thoughtless user saved it in the settings of the VPN application or wrote it down on a post-it note attached to the keyboard, anyone who got hold of the device would immediately gain an attack route.

A one-time password that must be provided after certificate validation will be generated in an independent authentication device, such as an authenticator that has been installed in a smartphone. The one-time password will be derived from a securely stored secret that never leaves the authenticator. The secret is shared with a server counterpart that validates the password. A time-based one-time password changes regularly, without requiring any connection with the server after the initial setup.

Some tuning

In the 1990s, some were optimistic about Linux on the desktop. Nowadays, it is rare that something that just works in other environments would require extra effort in Linux. On Microsoft Windows, the native VPN client supports a combination of a certificate and a password since ages. However, NetworkManager–which is prominent in graphical Linux environments–did not work out of the box. Our small fix will be part of the next release (strongSwan 6.1.1), making the world a little more secure. Truth be told, the certificate-and-password combination has long been readily usable on Linux, in an Android application.

Instead of requiring one-time password input by the user, it is possible to use a separate hardware token that participates in an authentication protocol with the counterpart. Such an option is not available for our VPN connections yet. Our GitLab supports FIDO2 tokens, for example.

CC BY 4.0