Back to blog

Labs · 2026-01-10

Nmap Basics in a Safe Home Lab

Nmap is useful for learning, but it should be used only on systems I own or have clear permission to test.

Lab goal

The goal is to discover which hosts are active in my lab network and which ports are open on my own test machines.

I keep the scope small and written down before scanning. For example, I might scan only 192.168.56.0/24 if that is my isolated virtual lab network. Written scope is a good habit because scanning outside permission is not acceptable.

Commands I practice

nmap -sn 192.168.56.0/24 checks for live hosts. nmap -sV target-ip attempts to identify service versions. I record the command, target, date, and result.

A host discovery scan answers “what machines appear to be online?” A service scan answers “what ports and services are reachable?” These are different questions, so I do not run commands blindly. I choose the command based on the question.

How I read results

An open port tells me a service is reachable. I then ask whether I expected that service, whether it is needed, and whether it should be limited by a firewall.

Example notes format

  • Target: lab Ubuntu VM.
  • IP address: 192.168.56.20.
  • Open ports: 22/tcp SSH.
  • Expected: yes, SSH was installed for remote admin practice.
  • Action: restrict SSH to lab network only.

Common mistake

A beginner mistake is treating Nmap output as an attack by itself. The tool is not the point. The value is learning what is exposed, why it is exposed, and how to reduce unnecessary exposure.

Important boundary

I do not scan public systems without permission. The learning value comes from understanding my lab, not from creating risk for other people.