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.
Topic: Linux Administration in IT Infrastructure · Lab / project
Also covers: Virtualization & Private Cloud, 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?
- Which Hypervisor Should You Use?
- How Should You Set Up Lab Networking?
- What Is a Good Starter Layout?
- How Do You Make the Lab Repeatable?
- What Should You Practise?
- How Do You Keep the Lab Safe?
- References
What Hardware Do You Need?
| Component | Minimum | Comfortable |
|---|---|---|
| RAM | 8 GB (two small VMs) | 16 to 32 GB |
| CPU | 4 cores with virtualisation enabled in BIOS | 6 to 8 cores |
| Storage | SSD with 100 GB free | 500 GB SSD |
An old desktop running Proxmox makes an excellent always-on lab server.
Which Hypervisor Should You Use?
| Hypervisor | Best for |
|---|---|
| VirtualBox | Beginners on Windows or macOS laptops |
| KVM with libvirt | Linux hosts; same technology used in production |
| Proxmox VE | Dedicated 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?
| VM | OS | RAM | Role |
|---|---|---|---|
| srv1 | Rocky Linux | 2 GB | Web, DNS, DHCP practice |
| srv2 | Ubuntu Server | 2 GB | Database, logging, Ansible control node |
| client | Ubuntu Desktop or Windows | 4 GB | User workstation |
| kali (optional) | Kali Linux | 4 GB | Security 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?
| Track | Exercises |
|---|---|
| Sysadmin | Users, permissions, LVM, systemd services, cron, package updates |
| Networking | Static IPs, DNS with BIND, DHCP, routing between subnets, firewalld or ufw |
| Security | SSH hardening, auditd, log review, vulnerability scanning, SELinux troubleshooting |
| Automation | Bash 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
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0