The most detailed free FDE + DevOps library: 140+ lessons, 70+ labs and 80 long-form articles, in English and Turkish. Start learning →

DevOps Foundations · Module 2: Networking, DNS, HTTP and TLS · Lab

Separate a Wrong DNS Record from a Wrong App Port

40 min hands-on · Core

Local Linux shell; a hosts-file pin plus any local listener (python http.server or equivalent). All names are local fixtures.

Two ways to do this lab: in your browser on Killercoda (free, no install), or on your own machine as a local guide. Killercoda runs one free scenario at a time: if you see a waiting queue, close other Killercoda tabs and wait a minute.

Objectives

  • Reproduce a failure with two simultaneous faults: a wrong name and a wrong port
  • Prove which layer is guilty with getent versus dig before touching either
  • Fix the name layer first, then test the port exactly once
  1. Step 1

    Plant both faults

    Start a listener on port 18080. Add a hosts pin mapping svc-lab.test to 127.0.0.2 (wrong address), and aim your test client at port 19090 (wrong port). Write both faults down before testing.

  2. Step 2

    Split name from port

    Run getent hosts svc-lab.test and dig +short svc-lab.test (or the resolver-free equivalent) and state which answers differ. Then test the port against the correct address directly with curl or nc. Name the guilty layer with quoted output.

  3. Step 3

    Repair in layer order

    Remove the hosts pin, confirm both resolution tools agree on 127.0.0.1, then correct the port and show one successful request. Record the check order: resolver split first, port test second.

How to confirm it worked

  • Both faults documented before any test runs
  • The resolver split is quoted (both tools) and names the guilty layer
  • The port is tested only after the name layer agrees
  • Final success is one clean request, recorded with the check order