Programming · AI · Crypto · Kali Linux

Decode tech.
Build what's next.

Hands-on guides, tutorials and honest insights on programming, artificial intelligence, cryptocurrency and ethical hacking with Kali Linux.

Latest articles

Wednesday, 11 November 2026

How to Build a Safe Home Lab with Virtual Machines (Beginner Guide)

Build a safe ethical hacking home lab with virtual machines: Kali Linux setup, network modes, practice targets and snapshots.

If you want to learn Kali Linux and ethical hacking, you need somewhere safe to practice. The answer is a home lab: a small, isolated setup on your own computer where you can break things, make mistakes and try tools without harming anything real. The easiest way to build one is with virtual machines (VMs).

Only test systems you own or have clear written permission to test. Your lab is the legal place to practice. Never point tools at other people's networks, websites or devices.

What is a virtual machine?

A virtual machine is a complete computer running as a program inside your real computer. You can run Kali Linux in a window on your normal system, and delete it when you are done. If something goes wrong, your real files and system stay untouched.

  • Host: your real computer and its operating system.
  • Guest: the virtual machine running inside it, such as Kali Linux.

What you need

  • RAM: 8 GB can work for one or two small VMs, and 16 GB is much more comfortable.
  • Disk space: at least 50 GB free. Kali alone usually needs 20 GB or more.
  • CPU: a modern processor with virtualization support (called Intel VT-x or AMD-V).
  • Virtualization turned on: on some computers it is switched off in the BIOS or UEFI settings, and you must enable it.

Step 1: Choose virtualization software

  • VirtualBox: free and popular with beginners, and it works on Windows, Linux and Intel Macs.
  • VMware Workstation or Fusion: a polished option that has offered a free version for personal use. Check the current license on the VMware website.
  • Hyper-V: built into some editions of Windows.
  • UTM: a common choice on Apple Silicon Macs.
  • KVM with virt-manager: a good choice if your host is already Linux.

Download the software only from the official website.

Step 2: Get Kali Linux safely

Kali provides ready-made virtual machine images for VirtualBox, VMware and others on its official website, kali.org. These save you time because the system is already installed.

  • Download only from the official Kali site.
  • Check the file's checksum (SHA256) against the value published on the site, to confirm the file is genuine and not corrupted.

On Linux, you can check a download like this:

sha256sum kali-linux-file-name.7z

Compare the output with the checksum on the download page. If the two do not match exactly, delete the file and download it again.

Step 3: Set sensible VM settings

  • Memory: 2 to 4 GB for Kali is a good start.
  • CPU: 2 cores is usually enough.
  • Disk: 30 GB or more.
  • Change the default password after the first login. Public Kali VM images come with well-known default credentials, so do not leave them as they are.
  • Update the system with sudo apt update followed by sudo apt full-upgrade.

Step 4: Understand network modes (the most important part)

The network setting decides who your VM can talk to. This is where beginners make the biggest mistakes.

ModeWhat it doesGood for
NATVM reaches the internet through your host. Outside devices cannot reach it.Updates and general use
NAT NetworkLike NAT, but several VMs can talk to each other and the internet.A lab with Kali and a target
Host-onlyVMs can talk to each other and the host, with no internet.Isolated practice with vulnerable machines
Internal networkVMs talk only to each other.A fully sealed lab
BridgedVM appears as a real device on your home network.Use with great care, usually avoid

A safe rule: put deliberately vulnerable machines on a Host-only or Internal network, never on bridged. Those machines are full of known security holes, and you do not want them visible to your home network or the internet.

Step 5: Add safe targets to practice on

You need something to practice against. These are built for learning:

  • Metasploitable 2: an intentionally vulnerable Linux machine for practicing scanning and testing. Keep it on a host-only network.
  • DVWA (Damn Vulnerable Web Application): a web app made to be attacked, for learning web security.
  • OWASP Juice Shop: a modern, deliberately insecure web app with guided challenges.
  • VulnHub: a library of downloadable vulnerable machines.
  • TryHackMe and Hack The Box: online platforms with guided, legal practice environments, and free options for beginners.

Step 6: Use snapshots like an undo button

A snapshot saves the exact state of a VM at a moment in time. If you break something, you can roll back in seconds.

  1. Set up your fresh Kali VM and update it.
  2. Take a snapshot and name it clearly, for example "Clean install updated".
  3. Experiment freely. If it all goes wrong, restore the snapshot.

Step 7: Keep your lab safe

  • Keep the host updated as well, including your virtualization software.
  • Be careful with shared folders and clipboard sharing, especially when you work with unknown files or malware samples. If you do not need them, turn them off.
  • Never run suspicious files on your host. Use an isolated VM instead.
  • Shut down vulnerable VMs when you are not using them.
  • Don't store real passwords or personal files inside lab machines.

A simple first lab

  1. Install VirtualBox (or another option) from the official website.
  2. Import the official Kali VM image and update it.
  3. Add one practice target, such as Metasploitable 2, on a host-only or internal network.
  4. Take a snapshot of each machine.
  5. Confirm the two machines can reach each other, with a simple ping.
  6. Start learning: run a basic scan against your own target only.

Common beginner mistakes

  • Putting a vulnerable VM in bridged mode, exposing it to your whole network.
  • Forgetting to enable virtualization in the BIOS, then wondering why the VM will not start.
  • Giving the VM too much RAM, so your real computer slows to a crawl.
  • Skipping the checksum on downloaded images.
  • Never taking snapshots, and then having to rebuild everything after a mistake.
  • Scanning things you do not own. Stay inside your lab.

Final thoughts

A home lab gives you a safe, legal place to learn, and it costs nothing but some disk space. Start small with one Kali VM and one practice target, keep them isolated, take snapshots, and build up from there. Everything you learn in the lab carries over to real security work later.

Which virtualization software do you use or plan to use? Tell me in the comments, and follow the blog for more guides on Kali Linux, programming, AI and crypto.

No comments:

Post a Comment