Advanced · 30 minutes · Guided lesson

Connectivity before DNS

Investigate addresses, routes and listeners in a deliberate order.

By the end of this lesson

  • Separate interface, route, transport and application evidence
  • Recognise a loopback-only listener
  • Avoid treating a single failed ping as a complete diagnosis

Your environment: Live checks need iproute2. The supplied evidence lab can be completed with basic shell tools. Setup help

Work through layers

Start by stating the exact symptom: which client cannot reach which service, on which port, and since when? Then inspect local addresses and routes. A machine can have a valid address but no usable route to the target. A successful ping demonstrates an ICMP exchange, not that a TCP application is healthy.

A listening socket is another layer. A service bound to 127.0.0.1 is reachable through the local loopback interface, not directly from another machine. A socket on 0.0.0.0 listens on all IPv4 interfaces, but that alone does not prove firewalls, routing or the application will allow a remote request.

Choose a test that narrows the question

Use ip -br address for addresses, ip route for routes and ss -ltn for listening TCP sockets. Process details may require extra permission. Test only your own systems or systems you have permission to inspect. Do not broaden a single-server incident into an unauthorised network scan.

Record the timestamp and actual result of each observation. Connection refused often means a reject or no accepting listener at that destination; a timeout has several possible causes. DNS, packet filtering and application failures need different next tests. Avoid declaring a root cause solely from an error label.

See it in context

Worked example

These commands inspect the local machine.

ip -br address
ip route
ss -ltn

Look for the relevant interface, route and port. Your addresses and listeners will differ from the fictional lab evidence.

Your turn

Practical lab

A web app works on its server but not from another VM. Interpret this fictional evidence.

Run commands in your own lab. This website displays instructions; the practice terminal below helps you rehearse the syntax.

1. Prepare your workspace

mkdir -p "$HOME/training4linux/connectivity"
cd "$HOME/training4linux/connectivity"
printf "%s\n" "app-vm address: 192.0.2.10/24" "listener: 127.0.0.1:8080" "local curl: HTTP 200" "remote curl: connection refused" > evidence.txt

2. Complete the task

  1. Identify the strongest clue limiting direct remote access.
  2. Write a next check against the application’s configured bind address.
  3. Describe how you would retest locally and remotely after an authorised change, without making that change now.

3. Check your result

  • Your note identifies the loopback-only listener as a demonstrated limitation.
  • You do not claim that opening a firewall alone fixes the bind address.
  • Your plan includes both a listener check and a client-side request.
Need a hint?

127.0.0.1 means this machine. It is not the VM’s network-interface address.

Reveal a worked solution

Compare this with your approach after trying the task. More than one valid solution may exist.

cat evidence.txt
printf "%s\n" "Evidence: the service listens only on loopback." "Next: confirm the intended bind address in the application configuration." "Retest after approved change: inspect ss and make local and remote requests." > diagnosis.txt

After the lab: The IP address is reserved for documentation. Do not probe it; the supplied evidence is an offline scenario.

Common mistakes to avoid

  • Do not disable a firewall as your first troubleshooting step.

Check your understanding

Knowledge check

Answer all 3 questions correctly to pass. Retry as often as you need; your best score is kept.

1. What does a 127.0.0.1 listener allow directly?
2. Does successful ping prove HTTPS is working?
3. Which command lists listening TCP sockets?

Your lesson progress

Not started · Best score: 0% · Attempts: 0

Practical completion is self-reported. Progress is linked to a private cookie in this browser and stored on the site. Clearing that cookie loses access to it. Manage or erase progress.

Keep the reference close

Further reading