Tutorial on Setting Up a VPN Connection on Ubuntu 26.04

by

in

IT Consultancy

IT Consultancy Get expert guidance to leverage technology for your business growth. We help you identify the right IT solutions, optimize infrastructure, and ensure your digital environment is secure,…

Digital Marketing

Digital Marketing Grow your brand and reach the right audience with data-driven marketing strategies. We help you create campaigns that convert, manage social channels effectively, and optimize your d…

Privacy Policy

Privacy Policy At CometSoul, accessible from https://cometsoul.com, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collec…

Terms and Conditions

Welcome to CometSoul! These terms and conditions outline the rules and regulations for the use of CometSoul’s Website, located at https://cometsoul.com. By accessing this website we assume you a…

Disclaimer

If you require any more information or have any questions about our site’s disclaimer, please feel free to contact us. Disclaimers for CometSoul All the information on this website – https…

Tutorial

Wifi Managed Service

Managed Wi-Fi Service

Managed Wi-Fi Service Build a fast, stable, and secure Wi-Fi for your business at Zero depreciation cost. Enterprise-Grade Guest Wi-Fi With $0 Upfront Hardware Costs. We provide, install, and support …

System Integrator

Smart Business System Integrator

Smart Business System Integrator Simplify your daily operations with smart systems that automate bookings, schedules, and routine tasks so you can focus on growing your business. We set up and integra…

Computer Managed Service

IT Procurement & Hardware Managed Service

IT Procurement & Hardware Managed Service Keep your technology running smoothly from the hardware you use every day to the systems that power your business. We provide end-to-end IT management so …

VPNs are used to create a more secure connection between a client computer and a target network over the internet. This guide will explain how to connect Ubuntu to an L2TP/IPsec VPN server so that Linux devices can securely access the network from different locations.

L2TP/IPsec was chosen because it’s a widely used protocol and compatible with various operating systems, including Linux, Windows, macOS, Android, and iOS. On Ubuntu, L2TP/IPsec connections can be configured using Network Manager with the appropriate supporting packages. IPsec encrypts data traffic between the client and server, making the connection more secure.

Through this tutorial, you will learn the process of installing the necessary components, creating a VPN profile, filling in server information, until Ubuntu successfully connects to the VPN server using L2TP/IPsec.

  1. Make sure you have the information needed to connect to the VPN. In this tutorial, we’ll use
    the VPN server: vpn.testserver.net
    Username: user01
    Password: comet123
    IPSec preshared key: comet12345678
    Server in the remote area: 10.1.1.11
  2. By default Ubuntu 26.04 does not have a utility to connect via L2TP VPN, open a terminal with the shortcut CTRL + ALT + T and install the required packages through the terminal with the following command (make sure you have sudoers access)

    sudo apt install network-manager-l2tp network-manager-l2tp-gnome -y


  3. Once the L2TP package installation is complete, access your network settings by clicking on the active connection, then the Wired Settings menu (adjust if your connection is wireless). This will eventually take you to Network Settings.



    Click the Add VPN menu and select L2TP.


  4. Complete the configuration fields, starting with Profile Name, Gateway (VPN server address), User Auth settings, which in this case are the username and password.


    Continue by clicking the IPsec settings menu and Enable IPsec tunnel to L2TP host. Fill in the pre-shared key according to the information you already have.
    Finish by clicking Apply and Add.

  5. In the VPN profile that has been created, click the toggle button to activate the VPN connection.
    If the connection is successful, a VPN icon will appear in the top right corner next to the network indicator.

  6. Test the VPN connection by pinging the remote server 10.1.1.11