How to Build Your First Linux Lab for Admin, Security and Networking

A first Linux lab needs a computer with at least 16 GB of RAM and an SSD, a free hypervisor such as VirtualBox, KVM or Proxmox, and three or four virtual machines: a Rocky Linux or Ubuntu server, a second server for networking practice, a client, and optionally Kali Linux for security exercises.

Jul 12, 2025 - 11:17
Updated: 
103.3k

Linux Administration in IT Infrastructure · Lab / project

Virtualization & Private Cloud, Networking

How to Build Your First Linux Lab for Admin, Security and Networking

Quick answer: A first Linux lab needs a computer with at least 16 GB of RAM and an SSD, a free hypervisor such as VirtualBox, KVM or Proxmox, and three or four virtual machines: a Rocky Linux or Ubuntu server, a second server for networking practice, a client, and optionally Kali Linux for security exercises. Put them on an isolated host-only or internal network, take snapshots before experiments, and practise real tasks: users and permissions, services, firewalls, DNS and DHCP, log analysis and hardening. Tools like Vagrant let you rebuild the whole lab in minutes.

Key takeaways

  • 16 GB RAM and an SSD are enough for a useful starter lab.
  • Use isolated virtual networks so experiments cannot affect real networks.
  • Snapshots let you break things and recover quickly.
  • Include both Red Hat-family and Debian-family distributions.
  • Automate lab builds with Vagrant or scripts once you know the manual steps.

Table of Contents

What Hardware Do You Need?

ComponentMinimumComfortable
RAM8 GB (two small VMs)16 to 32 GB
CPU4 cores with virtualisation enabled in BIOS6 to 8 cores
StorageSSD with 100 GB free500 GB SSD

An old desktop running Proxmox makes an excellent always-on lab server.

Which Hypervisor Should You Use?

HypervisorBest for
VirtualBoxBeginners on Windows or macOS laptops
KVM with libvirtLinux hosts; same technology used in production
Proxmox VEDedicated lab server with a web interface

How Should You Set Up Lab Networking?

  • NAT: VMs reach the internet for updates but are hidden from your home network.
  • Host-only: VMs talk to each other and your host, not the internet.
  • Internal network: VMs talk only to each other; best for security exercises.
  • Avoid bridged mode for vulnerable or attack VMs, since it puts them on your real network.

What Is a Good Starter Layout?

VMOSRAMRole
srv1Rocky Linux2 GBWeb, DNS, DHCP practice
srv2Ubuntu Server2 GBDatabase, logging, Ansible control node
clientUbuntu Desktop or Windows4 GBUser workstation
kali (optional)Kali Linux4 GBSecurity testing inside the lab only

How Do You Make the Lab Repeatable?

# Vagrantfile: two servers on a private network
Vagrant.configure("2") do |config|
  config.vm.define "srv1" do |s|
    s.vm.box = "generic/rocky9"
    s.vm.network "private_network", ip: "192.168.56.10"
  end
  config.vm.define "srv2" do |s|
    s.vm.box = "ubuntu/jammy64"
    s.vm.network "private_network", ip: "192.168.56.11"
  end
end
# vagrant up   |  vagrant snapshot save clean  |  vagrant destroy -f

See the Vagrant documentation for providers and provisioning.

What Should You Practise?

TrackExercises
SysadminUsers, permissions, LVM, systemd services, cron, package updates
NetworkingStatic IPs, DNS with BIND, DHCP, routing between subnets, firewalld or ufw
SecuritySSH hardening, auditd, log review, vulnerability scanning, SELinux troubleshooting
AutomationBash scripts, Ansible playbooks across all VMs

How Do You Keep the Lab Safe?

  • Keep vulnerable and attack VMs on internal networks only.
  • Never scan or attack systems outside your lab; unauthorised access is an offence under India's IT Act 2000, Sections 43 and 66.
  • Do not reuse real passwords in the lab.
  • Snapshot before risky changes.

Related: Linux projects for students and learning Kali Linux. WebAsha offers Linux administration training.

References

Frequently Asked Questions

8 GB runs two small VMs, but 16 GB or more lets you run three or four VMs comfortably at once.

VirtualBox is easiest on Windows and macOS, while KVM or Proxmox suit Linux hosts and dedicated lab servers.

Use Rocky Linux for the Red Hat family and Ubuntu Server for the Debian family, since employers use both.

Use host-only or internal networks for practice, and NAT only when VMs need internet access for updates.

They let you return a VM to a known good state after a failed experiment instead of reinstalling it.

Vagrant builds and rebuilds virtual machines from a configuration file, making your lab repeatable in minutes.

Yes, against your own lab machines on isolated networks, but never against systems you do not own or have permission to test.

Start with users, permissions, services, package management and networking, then move to automation and security.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.