OphirCloud Academy

Names before packets

Networks and DNS

A service is a listener on a port; a name is a pointer to an address. Almost every 'the host is down' is really 'the name resolved wrong', 'the port is not listening', or 'a firewall dropped it' — three different checks.

Youcurl / pingResolver/etc/resolv.confAddress10.0.0.12Listener:80 bound→→→Test one layer at a time: name → address → port → application.Each layer fails differently; guessing which one wastes the hour.
A successful ping proves neither the name nor the port — it is ICMP, and your app is TCP.

Names resolve before anything else happens

Your machine tries the local hosts file first, then whatever the resolver configuration points at. That is why the same name can work on your laptop and fail in a container: the two did not ask the same resolver.

`dig` answers the question in full, including which server answered; `nslookup` is shorter and friendlier. Either way, a name that resolves to an address you did not expect is not a DNS failure — it is DNS working correctly on stale data.

Listening, routing, filtering

A process must be listening before anything can connect. `netstat -tuln` shows the bound addresses, and `0.0.0.0:80` and `127.0.0.1:80` are different promises: the second is reachable only from the machine itself.

Once it is listening, traffic still has to survive routing and the firewall. The discipline is to test the layers in order — ping for reachability, DNS for the name, the port for the listener, and only then the application.

Commands in this lesson

Every one of these runs in the sandbox — no real account, no real bill.

CommandWhy
dig web.ophir.local > /tmp/dns-web.txtFull answer: the records, and which resolver served them.
cat /etc/resolv.conf > /tmp/resolv.txtThe resolver the machine is actually using.
netstat -tuln > /tmp/listeners.txtWhat is listening, on which address and port.
curl -I http://web.ophir.local > /tmp/http-headers.txtProves DNS and the listener together, and gives the status line.
traceroute 192.168.0.99 > /tmp/step2-trace.txtWhere the path stops, when it is neither DNS nor the daemon.

Now do it

Reading the model makes the first attempt faster. Only the lab makes you able to do it.

  • DNS Resolution

    Beginner · 15 min · members

    Open the lab
  • Reachability & IP Addressing

    Beginner · 15 min · members

    Open the lab
  • Firewalls & Listening Services

    Intermediate · 18 min · members

    Open the lab

Networks and DNS · OphirCloud Academy · all lessons