Diagnose the Network
ss, curl, nc, nslookup — diagnose service connectivity in production.
A intermediate Linux challenge worth 10 points. Solve it hands-on in a real Linux environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: Users report the API returns "connection refused" intermittently. You need to diagnose without restarting anything.
Your tasks:
- List all TCP ports currently LISTENING → save to /tmp/listening_ports.txt (use
ss -tlnp) - Make an HTTP GET to http://localhost:3000/health → save response body to /tmp/health_check.txt
- Resolve the hostname "localhost" with nslookup or dig → save output to /tmp/dns_check.txt
Commands to learn: ss -tlnp, netstat, curl -s, nc, nslookup, dig
Run check when done.