Goal
Understand the minimum networking needed to debug real production issues: DNS, ports, HTTP, and TLS.
The 4-step model
When a request fails, check:
- DNS: can we resolve the name?
- Network: can we reach the IP/port?
- HTTP: does the app respond correctly?
- TLS: is the certificate/handshake OK?
DNS basics
dig devopslabx.com
nslookup devopslabx.com
If DNS fails, nothing else matters.
Ports and listening services
ss -lntp
nc -zv 127.0.0.1 3000
HTTP with curl (most useful tool)
curl -v http://localhost:3000
curl -I https://devopslabx.com
Common status codes:
- 200 OK
- 301/302 redirect
- 401/403 auth
- 404 not found
- 500 server error
TLS quick checks
curl -Iv https://devopslabx.com
openssl s_client -connect devopslabx.com:443 -servername devopslabx.com
Common failure patterns
- DNS resolves to wrong IP (old record)
- port blocked by firewall/security group
- app listening on localhost only (not 0.0.0.0)
- reverse proxy misconfigured (nginx)
- TLS cert expired / wrong hostname
Exercises
- Find which process is listening on port 3000.
- Curl a local endpoint with
-v. - Resolve a domain and compare A/AAAA records.
Next Step
Use shell tools to parse logs and extract errors fast.