Observe the dependencies of a machine you thought you knew

short · 40 min · Objective 2.1

Task

Documentation describes a system as designed; migration fails on the system as it grew. Observe the actual connections in and out of a machine you run, and compare what you find against what you expected.

Steps

  1. Before looking, write your EXPECTED inbound and outbound connections into lab/expected.txt, from memory.
  2. Capture actual listening sockets and established connections repeatedly over at least an hour: ss -tulpen and ss -tan state established on a short timer, appending to lab/observed.txt.
  3. Extract the distinct remote endpoints and local listening ports, and resolve which process owns each.
  4. Diff the observed set against your expected set and record the surprises in lab/surprises.md -- both the things you expected and did not see, and the things you did not expect.
  5. For each surprise, write what would break if this machine moved to a different network with a different address, and whether the dependency is inbound (someone else's change) or outbound (yours).

Verify

grep -c '^' lab/expected.txt
awk '{print}' lab/observed.txt | wc -l
grep -Eci 'inbound' lab/surprises.md
grep -Eci 'outbound' lab/surprises.md

Both directions must appear in the surprises file. Inbound dependencies are the dangerous ones because fixing them requires somebody else to make a change.

This is an independent study companion for CompTIA Cloud+ CV0-004 and is not produced by or endorsed by CompTIA.