LAB-NET-04 - Ports and Connections
Ports and Connections
Inspect listening ports and active connections so you can tell whether a service is actually waiting for traffic.
- Use ss to inspect listening sockets.
- Explain the difference between a listening port and an established connection.
- Inspect first; do not kill or reconfigure services unless you know exactly what they are.
Part A: The Field Guide
A host can be reachable while the service you want is still unavailable.
That is why port and socket inspection is a separate step.
A listening service is waiting for connections. An established connection means traffic is already flowing between endpoints.
Useful Distinction
Network reachability and service availability are related but not identical. A machine can answer pings while the target service is not listening on the expected port.
Part B: The Drill Deck
Terminal required: inspect first and keep the exercise observational.
G Guided Step by step - type exactly this and compare the result >
Exercise G1: Inspect listening sockets
- Run
sudo ss -tulpn - Identify one listening service
- Note the port and the process information if available
Exercise G2: Look at active connections
- Run
sudo ss -tupan - Notice that the output can include both listening and active connections depending on flags
- Find one state value such as
LISTENorESTAB
Exercise G3: Focus on one port
- Run
sudo ss -tulpn | grep ':22 'if SSH is present, or use another familiar port on your system - Explain what this filtered view is helping you answer
S Solo Task described, hints available - figure it out >
Exercise S1: TCP versus UDP
Run a view that includes both TCP and UDP, then explain why checking only one protocol family can miss a service you care about.
Exercise S2: Listening versus connected
In your own words, explain:
- what LISTEN means
- what ESTAB means
- why those states answer different questions
M Mission Real scenario - no hints, combine multiple skills >
Mission M1: Add the service-layer step to your troubleshooting ladder
Write the place where ss belongs in a broader network debugging flow.
For example, after checking connectivity and naming, where do you ask whether the service is actually listening?
If that placement feels natural, the network model is becoming more operational and less memorized.