Labs are great for testing, development and demo. In this tutorial I am going to show you how I setup my lab in 2025.

  1. Basic Setup and Configure the Ubuntu Hosted Server (SSH should have been enabled)

Key steps

  1. Update the Ubuntu Server with the latest update.
  2. Change the password.
  3. Change the hostname.
  4. Add a new sudo enabled user.
  5. Enable (Install) a Linux Firewall. For my lab I am using nftables.
  6. Configure the Firewall to restrict access.
  7. Install a Desktop Environment For my lab I am using a lightweight xfce.
  8. Install Remote Destkop Management. For my lab I am using xrdp.
  9. Install and enable virtualization (KVM).
  10. Setup the virtual environment network.

Optional steps

  1. Bash and Bash Prompt
  2. Logging and Log rotation
  1. Make sure the Ubuntu Server is update to the latest version.
  1. Change the password. Always a good practice to change the default password if that is assign to you.

Most of the hosted linux server uses ssh for management. So it is a good practice to try and protect the ssh access. Install a Linux Firewall. In this tutorial we will use nftables, even thou by default ufw is install in the Ubuntu Server.

  1. Change the hostname. Always good to have a proper naming if you are managing multiple servers.
  1. Add a new sudo enabled user.

To configure the sudoers file check out this article.

  1. Enable (Install) a Linux Firewall. For my lab I am using nftables. This is the basic rule for nftables. You can build on this ruleset for more advance rules.
  1. Configure the Firewall to restrict access. The default nftables config file is located here /etc/nftables.conf
  1. Install a Desktop Environment For my lab I am using a lightweight xfce.
  1. Install Remote Destkop Management. For my lab I am using xrdp.
  1. Install and enable virtualization (KVM). Install all the KVM software, utilities and Virtual Manager
  1. Setup the virtual environment network to allow bridge mode. By default the virtual network enabled in KVM is in “nat” mode. If you are using Ubuntu version 22.04. You should be able to use netplan for the network configuration

Edit your Netplan config (/etc/netplan/01-netcfg.yaml):

Validate the configuration

Defining the bridge in KVM virtual network