This guide assumes that you have already set up a Ubiquiti Unifi VPN following the guide: https://help.ubnt.com/hc/en-us/articles/115005445768-UniFi-L2TP-Remote-Access-VPN-with-USG-as-RADIUS-Server
To configure a Linux machine to be able to connect remotely I followed these steps. This guide was written for Debian 8.
-
In Debian install the "xl2tpd" and "strongswan" packages.
-
Edit /etc/ipsec.conf to add the connection:
conn YOURVPNCONNECTIONNAME