Setting up Ubuntu built-in VPN client
Installing required packages
- Run the following commands to update software packages and install the L2TP plugin for NetworkManager:
sudo apt update
sudo apt install -y network-manager-l2tp network-manager-l2tp-gnome -yCopied to clipboard
Setting up a new VPN connection
- Click the network connection icon in the top right corner of your desktop.
- Click Settings button in the shortcuts menu:
- In the settings, choose the Network tab on the left, and click + button opposite of the VPN label to add a new VPN connection:
- Choose L2TP tunneling protocol:
- Enter the IP address of your VPN gateway into the Gateway field, enter username and password. IP address, username and password for a user are parts of user credentials.
- Click the "user" symbol in the password input box and select Store the password only for this user.
- Click IPsec Settings... button to show IPsec settings.
-
- Check the Enable IPsec tunnel to L2TP host box. Put the Shared secret you have got in the user credentials dialogue earlier to the Pre-shared key input box.
- Click Advanced.
-
Set Phase1 Algorithms to
aes128-sha1-modp2048.Set Phase2 Algorithms to
aes128-sha1. - Click OK
- Open the IPv4 tab and scroll down to Routes. Add a route as shown below:
- Save settings by clicking Add button.
- Make sure your newly created VPN connection is on: