Skip to content
Lab 1 of 4

Addresses & Sockets: Map Kestrel's Machine

Your first morning at Kestrel: before you touch anything, map the machine. Its address and network, every listening port and the account behind it, which ports the network can reach — and the one port nobody admits to opening.
  • Beginner
  • 40 min
  • Networking
  • Sockets
  • Linux
  • Kestrel

Overview

You have just joined Kestrel, the 20-minute grocery company (/opt/kestrel/BIBLE.md). Simran Gill, your buddy on the backend team, gives you the first task every good engineer does on a machine they did not build: draw me the map. What address is this box on, what is listening, who owns each listener, and who can reach it?

The stack should be three listeners deep: nginx on port 80 facing the network, the orders API on 127.0.0.1:8000, PostgreSQL on 127.0.0.1:5432. Arjun Mehta, the CTO, mentions in passing that he "started a quick web server last night to send a contractor a file — but I stopped it. I think." By the end of this lab you will know whether he did, and you will have closed it without taking Kestrel down.

What you will learn

  • Read an IPv4 address and its prefix with ip addr, and know what the prefix means
  • List listening TCP sockets with ss, and name their owners even when -p shows nothing
  • Tell a loopback-only listener from one the whole network can reach
  • Find an unexplained listener and stop exactly that process — by PID, not by name

Before you start

  • Comfortable in a Linux shell with sudo
  • No networking background needed — the lab builds it up

Tasks

  1. 01Your address, and the network it implies
  2. 02What is listening, and who owns it
  3. 03Who can reach which port
  4. 04Close the port nobody owns up to

Next in this course