A service can wait for connections at a particular address and port. A listener is a socket ready to receive incoming connections. Its address is one clue about who may be able to reach it.
Linux Hardening · Lesson 4
Listening Services
Learn to read a Linux listening address and decide where to test its reachability.
Listing TCP Listeners
Run this read-only command on a Linux practice host. The options ask ss to show listening TCP sockets with numeric addresses and ports.
$ ss -lnt
Read the local address column. The example below uses 127.0.0.1:8091 for a web preview. The port is 8091. The address is loopback, which refers to the host itself.
A browser on the same host needs the preview in this example. Which address should it try?

Interpreting All Interfaces
An IPv4 local address of 0.0.0.0:8091 means that the service listens on all IPv4 interfaces on the host. That can include an interface reached from another computer. The listener listing describes what the process accepts locally. Firewall rules and routes can limit what another computer can reach.
A service changes from 127.0.0.1 to 0.0.0.0 on the same port. What changed?
Checking the Intended Path
An internal staff service might be intended for one network. Verify it from that network and check an approved test location outside it if you need evidence the restriction works. Confirm both the listener and the path. A local listing alone cannot tell you what a distant client experienced.
You see a listener on all local interfaces. Which check shows whether a staff workstation can reach it?
To check which services listen on a Linux host, start with Audit Listening Services in Linux Security for DevSecOps.
Lesson complete
You finished Listening Services
You can now read a listening address before deciding where to test access.
List local TCP listeners safely.
Distinguish loopback from all IPv4 interfaces.
Verify the connection from the relevant client location.
Keep your learning progress
Create a free account to save this lesson and continue learning on any device.
Create a free account