Ubuntu 18.04 only offers OpenVPN as an available VPN method in the GNOME graphical interface.
sudo apt-get update
sudo apt-get install network-manager-l2tp
sudo apt-get install network-manager-l2tp-gnome
This will add L2TP support to your Ubuntu network manager and GNOME. Now just follow the steps:
- Go to Settings -> Network -> VPN. Click the [+] button.
- Select the Layer 2 Tunneling Protocol (L2TP).
- Enter anything you like in the Name field: Router VPN
- It can be any name.
- Enter your VPN server address in the Gateway field: yourname.duckdns.org or IP.
- If you don’t have a static IP, it is recommended to use a dynamic DNS service such as DuckDNS [http://duckdns.org/], which is completely free.
- Enter your VPN username in the User name field: username
- Configure the same user on the server side.
- Right-click the [?] in the Password field and select “Store the password only for this user”.
- Enter your VPN password in the Password field: *******
- Configure the same password on the server side.
- Leave the NT Domain field blank.
- Click the IPsec Settings button.
- Check the Enable IPsec tunnel to L2TP host checkbox.
- Leave the Gateway ID field blank.
- Enter your VPN IPsec PSK in the Pre-shared key field: a2N4uPNl1s3zkiuCEkZrQKhphpoEGlsB
- This must match what is configured on the server. You can use a random key generator to create one [https://cloud.google.com/vpn/docs/how-to/generating-pre-shared-key].
- Expand the Advanced section.
- Enter the Phase1 Algorithms: aes128-sha1-modp2048!
- Enter the Phase2 Algorithms: aes128-sha1-modp2048!
- Click OK, then click Add to save the VPN connection.
- Turn the VPN switch ON.
There are other suggestions for Phase1 and Phase2 Algorithms (steps 14 and 15):
Phase1: aes128-sha1-modp2048,3des-sha1-modp1024
Phase2: aes128-sha1,3des-md5
OR
Phase1: aes128-sha1-modp1024,3des-sha1-modp1024!
Phase2: aes128-sha1,3des-md5
For more information about IPsec negotiations, see [https://www.watchguard.com/…/ipsec_vpn_negotiations_c.html].
Your VPN security depends on the strength of your User/Password, Pre-Shared Key, and Phase1/2 Algorithms. As always, find a balance between security and performance.
This tutorial also works with the Quick VPN feature on D-Link devices such as the DIR-882 AC2600 [https://ca.dlink.com/…/dir-882-ac2600].