One weekend Project

A networking and security study lab on one laptop

You do not need a rack to practice firewalls, segmentation and incident detection. A laptop or desktop with 16 GB of memory can host a complete, isolated network of virtual machines where you can attack, defend, break and rebuild without any risk to your household or your employer.

  • IntermediateDifficulty
  • 1 weekendTo build, then ongoing
  • 16 GBMemory, 4 cores, SSD
  • $0On hardware you own

What you will build

A self-contained virtual network on one computer: a virtual firewall routing between two lab segments, an attacker machine, a deliberately vulnerable target, a desktop endpoint and an optional monitoring sensor. None of it can reach your home network. You will use it to practice segmentation, firewall rules, scanning, detection and recovery.

What you need

  • A computer with at least 4 cores, 16 GB of memory and an SSD with 200 to 300 GB free. 32 GB lets you run more machines at once.
  • CPU virtualization enabled in the firmware.
  • One desktop hypervisor. Install only one; two different desktop hypervisors on the same machine often conflict.
  • Installer images downloaded only from each project's official site.

Network modes, and the one rule

ModeWhat it connects toUse in this lab
NATThe internet through the host. Outbound connections can still reach devices on your home network.The firewall's outside interface only. Block private ranges outbound, and disconnect it when you are not downloading updates.
BridgedDirectly onto your home networkNever for lab machines
Host-onlyThe host computer and other VMs on the same networkOptional management access from the host
InternalOnly other VMs on the same named networkThe lab segments

Warning

Never bridge a deliberately vulnerable machine, or the attacker machine, onto your home network. A vulnerable target is vulnerable to everything on that network, and your home devices are not your targets.

The lab layout

MachineNetworkMemoryDisk
Virtual firewallOutside: NAT. Inside: lab LAN 172.30.10.0/24 and lab DMZ 172.30.20.0/241 GB8 GB
Attacker, a security testing distributionLab LAN4 GB40 to 60 GB
Deliberately vulnerable targetLab DMZ1 to 2 GB20 GB
Desktop endpoint, an evaluation imageLab LAN4 GB80 GB
Monitoring sensor, optionalA mirrored segment or log collection4 to 8 GB100 GB or more

The lab ranges are deliberately different from the home network's 10.42.0.0/16, so you can tell at a glance where an address belongs. On a 16 GB machine, run three or four lab VMs at a time rather than all five.

Building it

  1. Create the internal networks in the desktop hypervisor: one named lab-lan and one named lab-dmz.
  2. Install the virtual firewall with three network cards: NAT outside, lab-lan and lab-dmz. Give it 172.30.10.1 and 172.30.20.1, and run DHCP and DNS on both inside interfaces.
  3. Install the other machines on their networks and confirm each receives an address from the right range.
  4. Write firewall rules: lab LAN may reach the DMZ on chosen ports; the DMZ may not start connections into the LAN; nothing may reach the home network. See Firewalls and Routing.
  5. Snapshot everything in its clean state, with descriptive names. Every exercise starts from these snapshots.

Test the isolation first

Before any exercise, prove the lab cannot touch your real network:

  1. From the attacker VM, try to ping your home gateway and a home device. Both must fail.
  2. Scan your home range from the attacker VM. Nothing should answer.
  3. Check the firewall's outside interface is not bridged and that its rules block private ranges outbound.
  4. Repeat these tests whenever you change the lab's networking.

Exercises

  • Segmentation. Add a third segment, give it a purpose and write least-privilege rules for it. Test from inside each segment, as in VLANs and Segmentation.
  • Reconnaissance. Scan the DMZ from the LAN and map what is exposed. Then reduce what answers by changing rules and services.
  • Detection. Run the monitoring sensor in alert-only mode, scan again, and find your own scan in its alerts. Tune the noise.
  • Logging. Send the firewall's and the target's logs to a collector and trace one connection end to end.
  • DNS filtering. Add a sinkhole to the firewall and watch what the endpoint tries to reach.
  • Break and fix. Deliberately break a rule or a service, diagnose it from logs, then restore the snapshot and do it again faster.
  • Rebuild from notes. Delete the firewall VM and rebuild it from your documentation alone.

Rules of the lab

  • Attack only machines you own and control, inside the lab. Scanning or testing anything else, including your own household devices, your employer's systems or anything on the internet, is off limits without explicit written permission.
  • Keep vulnerable images powered off when you are not using them.
  • Back up the lab's configuration and your notes; the VMs themselves are disposable.

Document it

For every exercise, record the goal, a diagram, what you changed, what failed and how you fixed it. Those notes are the most valuable thing the lab produces. They become your study material, your rebuild instructions and evidence of skill for a job interview. See The Homelab as a Career Lab.

Verify

  • Every isolation test fails to reach your home network, from every lab machine.
  • Each machine has an address in the expected lab range and reaches only what your rules allow.
  • Restoring the clean snapshots returns the whole lab to its starting state in minutes.
  • Your notes are good enough to rebuild the firewall VM without looking anything up.

Where to go next

When the virtual lab feels comfortable, add physical equipment: a managed switch and a small firewall box teach cabling, console access and hardware behavior that virtual machines cannot. Our Switching and Routing Practice Lab project covers that step.