World map

 

BM: Baca dalam Bahasa Melayu

World L3: Phone Lines

localhost or 0.0.0.0?

You will learn: why an app can work for you but not for anyone else.

Checked with Linux (Debian 13) on 1 Nov 2026

The problem

You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx running.

You are hereyou@kedai:~$

Folder ~

Empty folder

+ 3 hidden (ls -a)

Services

  • cronrunningstarts at boot
  • sshrunningstarts at boot
  • nginxrunningstarts at boot

Phone lines (network) Address 10.0.0.5

Listening ports

  • :22 sshd
  • :80 nginx
  • :3000 node (this server only)

The order app answers you on the server. By the street number, it refuses. Customers can’t order. Why?

Watch

ss -tln tells you. Tap the line that only answers the intercom.

Tap the line that listens on 127.0.0.1.

0 of 1 found

Try it

0.0.0.0 in ss means every line: the intercom and the street. 127.0.0.1 means the intercom only. Who can call each one?

Drag a card into a box. Or tap the card, then tap the box.

      Try it

      Prove it. Call port 3000 by the street number, like a customer would.

      You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx running.

      You are hereyou@kedai:~$

      Folder ~

      Empty folder

      + 3 hidden (ls -a)

      Services

      • cronrunningstarts at boot
      • sshrunningstarts at boot
      • nginxrunningstarts at boot

      Phone lines (network) Address 10.0.0.5

      Listening ports

      • :22 sshd
      • :80 nginx
      • :3000 node (this server only)

      Predict

      A database is used only by apps on this same server. Where should it listen?

      Pick one answer.

      Check

      The fix for the order app is in its own settings, not in Linux. Good idea or not?

      Swipe right for good, left for needs work. Or use the buttons.

      1 / 3

      Set the app to listen on 0.0.0.0, then check with ss -tln.

      Set the app to listen on 0.0.0.0, then check with ss -tln.

      You did it!

      You can now tell an intercom-only app from one that answers every line.

      Go deeper (optional)

      Docker has the same idea: -p 127.0.0.1:8080:80 keeps a container’s hatch for this machine only. Many apps read a setting like HOST=0.0.0.0 or --bind. A firewall may still stop callers (lesson 8).

      Real mission

      1. python3 -m http.server --bind 127.0.0.1 8000
      2. ss -tln

      0 of 3 steps done · Your ticks are saved.