Networking
DNS, HTTP, TLS, and the diagnostic tools you reach for when something on the wire is broken.
beginner26 labs
Recommended first
You can still start this course now. Earlier courses give you the mental model the labs here assume.
By the end you'll be able to
- Trace a request from your laptop to the server and back
- Diagnose DNS, TLS, and HTTP failures one layer at a time
- Read a curl -v dump and know what each line means
- Stand up a reverse proxy without copy-pasting nginx configs
Labs
- 01StartIPv4 and IPv6 addresses on this hostEvery machine on a network is identified by one or more IP addresses. Read the addresses on this sandbox, see the IPv4 and IPv6 forms, and notice the loopback address every host has.10 min
- 02StartPorts, sockets, and well-known servicesAn IP address identifies a host. A port identifies which program on that host. A socket is the IP plus port pair. See the well-known port list and confirm common services.12 min
- 03Startping and traceroute for reachabilityping asks one question, is the host alive. traceroute answers a second, which routers does my packet pass through. Use both to debug a slow or broken connection.10 min
- 04StartDNS record types A, AAAA, MX, CNAME, TXTDNS turns names into addresses and more. Look up the five record types you will hit most often as an engineer using one tool, dig.15 min
- 05Startdig +trace, +short, and other useful flagsdig has dozens of flags. Three of them carry most of the diagnostic work. Use +short for one-line answers, +trace to follow a query from the root, and +nocmd to keep output tidy.15 min
- 06Starthost and nslookup as alternatives to digdig is the engineer favourite, but host and nslookup are present on almost every system and produce more compact output. Use each tool to look up the same name and compare.10 min
- 07StartLocal name resolution with /etc/hosts and /etc/resolv.confBefore DNS gets called, Linux checks /etc/hosts. The list of DNS servers to use lives in /etc/resolv.conf. Read both and add a local override.12 min
- 08StartThe shape of an HTTP request and responseHTTP is a text protocol over TCP. A request has a method, a path, headers, and a body. A response has a status line, headers, and a body. See both with curl -v.12 min
- 09StartHTTP status codes that matter day to dayStatus codes are grouped by hundred. 2xx success, 3xx redirect, 4xx client error, 5xx server error. Trigger 200, 301, 404, and 500 from a public test service.12 min
- 10StartHTTP methods and idempotencyGET, POST, PUT, PATCH, DELETE. Each has a meaning, a safety profile, and an idempotency profile. Send each one with curl against httpbin and see the request echoed back.15 min
- 11StartHTTP headers and cookiesHeaders carry metadata for the request and response. Cookies are state in a Set-Cookie response header that the client returns on later requests. Set and read both with curl.15 min
- 12Startcurl flags for everyday debuggingcurl is the multi-tool of HTTP debugging. Use -v for verbose, -I for headers, -o for output to a file, -w for timing fields, and -L to follow redirects.15 min
- 13StartWhy TLS, and what HTTPS actually buys youTLS protects HTTP from three problems. Read the body of a plain HTTP request and an HTTPS request, see that one is in the clear and the other is not, and confirm the cert chain with curl.12 min
- 14StartCertificate chains and how clients verify themA server cert is trusted because a CA signed it. The CA is trusted because a root signed the CA. Walk the chain with openssl s_client and find the root.15 min
- 15StartProbing TCP services with ncnc is the lowest-level TCP client. Connect to a port, send raw bytes, read raw bytes. Use it to test whether a port is open, and to speak HTTP by typing the request line yourself.12 min
- 16StartDebugging TLS with openssl s_clientopenssl s_client is the TLS equivalent of nc. Open a TLS connection by hand, see the cert, the protocol version, the cipher, and then speak HTTPS yourself.15 min
- 17StartListening sockets with ssss is the tool for asking the kernel what TCP and UDP sockets are open. List listeners, filter by port, and read the receive queue depth.12 min
- 18StartFinding which process owns a port with lsoflsof lists open files, and sockets are files. Use lsof -i to map a port number back to the process that opened it, the classic answer to who is on port 8080.10 min
- 19Startnginx as a reverse proxy in front of a backendA reverse proxy accepts requests on one port and forwards them to a backend on another. Configure nginx to proxy port 8080 to a small backend on port 9000 and verify with curl.18 min
- 20StartHealth checks for load balancers and orchestratorsA health check is an endpoint that says yes or no. Build a tiny one that returns 200 when a marker file exists and 503 when it does not. Probe with curl to mimic what a load balancer does.15 min
- 21StartThe OSI model, find the layer the fault lives onA service ships with a contract, GET /health on 127.0.0.1:8080 answers 200 with body ok. It is broken twice, at two different layers, and the lower fault hides the upper one. Use the OSI model the way operators actually use it, to route each symptom to a layer, pick the tool that probes that layer, and fix what you find.20 min
- 22StartLayer 4 versus layer 7, the port is open but the site is downA reverse proxy answers on its port, so layer 4 says everything is fine. Users still see an error page, because layer 7 knows the backend behind the proxy is dead. Probe the same address at both layers, explain why they disagree, and bring the stack back.18 min
- 23StartPackets and protocols, the port is right but the language is wrongA port carries bytes, and a protocol is the agreement about what those bytes mean. A monitoring client keeps failing against a service that is demonstrably up. Talk to the port raw, read the bytes that actually flow, and discover the two sides are speaking different protocols.18 min
- 24StartWhat is a network, the service is running but the address is wrongA machine is not one address. It is interfaces, each carrying addresses, and a socket binds to one address on one port. A service is provably running and still unreachable at the address its clients dial, because it bound somewhere else. Map the machine's addresses, find where the socket actually lives, and put it where the contract says.15 min
- 25StartBe the certificate authority, then see why Let's Encrypt existsTrust on the web is a chain, a CA signs a server's certificate and clients verify against the CA they already trust. Build the whole chain yourself, a CA, a signed server certificate, a TLS service. Watch verification fail for the exact reason it should, then fix it by distributing trust the honest way. What you do by hand here is what Let's Encrypt automates for the public web.20 min
- 26StartCapstone, front a backend with a reverse proxyAn open-ended problem with no prescribed config. Run a backend service on one port and a reverse proxy on another, so the public endpoint serves the backend's content. Any working two-tier setup passes, the checks probe the result.20 min