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@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd:80nginx:3000node (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@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
Phone lines (network) Address 10.0.0.5
Listening ports
:22sshd:80nginx:3000node (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.
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
python3 -m http.server --bind 127.0.0.1 8000ss -tln
0 of 3 steps done · Your ticks are saved.
Bahasa Melayu
Aplikasi pesanan jawab anda di server. Melalui nombor jalan, ia menolak. Pelanggan tak boleh memesan. Kenapa?
ss -tln beritahu anda. Tekan baris yang hanya jawab interkom.
0.0.0.0 dalam ss bermaksud setiap talian: interkom dan jalan. 127.0.0.1 bermaksud interkom sahaja. Siapa boleh hubungi setiap satu?
Buktikan. Hubungi port 3000 melalui nombor jalan, seperti pelanggan.
Satu pangkalan data hanya diguna oleh aplikasi di server yang sama. Di mana ia patut mendengar?
Cara baiki aplikasi pesanan ada dalam tetapannya sendiri, bukan dalam Linux. Idea bagus atau tidak?
Kini anda boleh bezakan aplikasi interkom sahaja dengan yang jawab setiap talian.
You finished this before. Practice is always welcome!
Official docs: ss(8) · ip(7): addresses
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?