Back

Setting up Ubuntu built-in VPN client

Installing required packages

  1. 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 -y

Setting up a new VPN connection

  1. Click the network connection icon in the top right corner of your desktop.
  2. Click Settings button in the shortcuts menu:
Setting up Ubuntu built-in VPN client
  1. In the settings, choose the Network tab on the left, and click + button opposite of the VPN label to add a new VPN connection:
Setting up Ubuntu built-in VPN client
  1. Choose L2TP tunneling protocol:
Setting up Ubuntu built-in VPN client
  1. 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.
Setting up Ubuntu built-in VPN client
  1. Click the "user" symbol in the password input box and select Store the password only for this user.
  1. Click IPsec Settings... button to show IPsec settings.
Setting up Ubuntu built-in VPN client
    • 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
  1. Open the IPv4 tab and scroll down to Routes. Add a route as shown below:
Setting up Ubuntu built-in VPN client
  1. Save settings by clicking Add button.
  2. Make sure your newly created VPN connection is on:
Setting up Ubuntu built-in VPN client

Suggested Articles

  • VPN to GPN

    Setting up Windows built-in VPN client

  • VPN to GPN

    Setting up macOS built-in VPN client