Incident guide · Network & DNS
Linux network and DNS troubleshooting cheat sheet
Trace interface, route, neighbor, resolver, DNSSEC, packet, path, TLS, and HTTP evidence from the host outward.50explained commands2practical sections100%concrete examples
25
Host network state
Confirm link state, addresses, routing, neighbors, and resolver configuration.
Show compact interface state and MTUip -br linkRead-only
Show Linux network interfaces and addressesip -brief addressRead-only
Resolve the kernel route to an addressip route get <address>Read-only
Show failed and incomplete neighbor entriesip neigh show nud failed,incompleteRead-only
Show per-link resolver configurationresolvectl statusRead-only
List listening TCP ports and their processeslsof -iTCP -sTCP:LISTEN -n -PRead-only
List listening Linux sockets with process detailsss -lntupRead-only
Fetch only the HTTP response headerscurl -I <url>Read-only
Resolve a hostname to its IP addressdig +short <domain>Read-only
Print your current public IP addresscurl -s https://api.ipify.orgRead-only
Send four ICMP probes to a hostping -c 4 <host>Read-only
Trace the network path to a hosttraceroute <host>Read-only
Measure HTTP response timingcurl -o /dev/null -s -w 'dns=%{time_namelookup}s connect=%{time_connect}s total=%{time_total}s\n' <url>Read-only
Check whether a TCP port accepts connectionsnc -vz <host> <port>Read-only
Look up DNS records for a hosthost <domain>Read-only
Show the default network routeip route show defaultRead-only
Count established TCP connectionsss -H state established | wc -lRead-only
Check a list of URLs concurrently and print status codesxargs -P <workers> -n 1 curl -sS -o /dev/null -w '%{http_code}\t%{url_effective}\n' < <file>Read-only
Break an HTTP request into DNS, TCP, TLS, TTFB, and total timecurl -sS -o /dev/null -w 'status=%{http_code} dns=%{time_namelookup}s tcp=%{time_connect}s tls=%{time_appconnect}s ttfb=%{time_starttransfer}s total=%{time_total}s remote=%{remote_ip}\n' <url>Read-only
Trace every HTTP status and Location header in a redirect chaincurl -sS -I -L <url> | awk 'BEGIN{IGNORECASE=1} /^HTTP\// || /^location:/ {gsub("\r",""); print}'Read-only
Query the useful DNS record set for a domainfor type in A AAAA MX NS TXT CAA; do echo "--- $type ---"; dig +short <domain> $type; doneRead-only
Trace DNS delegation from the root to the authoritative answerdig +trace +nodnssec <domain>Read-only
Compare an A record across three public DNS resolversfor resolver in 1.1.1.1 8.8.8.8 9.9.9.9; do printf '%-9s ' "$resolver"; dig +short @${resolver} <domain> A | paste -sd, -; doneRead-only
Request DNSSEC validation and expose the authenticated-data flagdig +dnssec <domain> A | awk '/flags:/{print} /ANSWER SECTION:/{show=1;next} show && NF==0{exit} show{print}'Read-only
Enumerate accepted TLS ciphers and their gradesnmap --script ssl-enum-ciphers -p <port> <host>caution
25
DNS, path, TLS, and HTTP
Follow the request path and capture bounded network evidence.