Resources and networking
Interfaces, addresses, and ports
Inspect how the machine is connected and identify which process is listening before changing a firewall or service configuration.
8 minute lesson
A network problem can live at several boundaries: interface, address, route, listening socket, host firewall, cloud firewall, or application protocol.
Inspect them in that order instead of changing everything at once.
Interfaces and addresses
ip address
Look for the expected interface, an UP state, and the address assigned to it. 127.0.0.1 and ::1 are loopback addresses. A service bound only to loopback cannot accept connections sent to the machine’s external address.
Routes
ip route
ip route get 1.1.1.1
The route table shows which gateway and interface Linux will use. ip route get asks the kernel which route it would select for one destination without sending a packet.
Listening sockets
sudo ss -lntup
The flags show listening TCP and UDP sockets, numeric addresses, and owning processes when permissions allow.
Compare these listeners:
127.0.0.1:3000
0.0.0.0:3000
[::]:3000
The first listens only on IPv4 loopback. 0.0.0.0 means all IPv4 interfaces. [::] is the IPv6 unspecified address; exact dual-stack behavior depends on the system and application.
Listening does not mean reachable
A socket can listen while traffic is blocked by UFW, a provider firewall, a router, or a security group. Test locally first:
curl http://127.0.0.1:3000/
Then test the external path from another machine. Do not open a firewall port until you have confirmed which service owns it and whether it should be public.
Record evidence at each layer. If the local request works but the remote TCP connection times out, changing application code is unlikely to help.
Try this: choose one local service. Find its listening address and process, test it through loopback, and explain whether another machine should be able to reach it.
Lesson completed