Back to commands

Cybersecurity Triage

Read-only

Inspect Established Network Connections

You need to list established TCP connections without changing network state.

Command

ss -tan state established

Before you run this

System impact: Read-only. Low when scoped to the shown target.

When not to use it: Do not treat it as a full security investigation; it is a point-in-time socket snapshot.

Expected output

A list of established TCP connections showing local and peer addresses and ports.

System impact

Read-only. Nothing changes. The command displays current established TCP sockets.

Recovery / rollback: no state is changed.

When to use it

Use when checking active client connections, suspicious network activity, or service traffic.

When not to use it

Do not treat it as a full security investigation; it is a point-in-time socket snapshot.

next steps

Related commands

Cybersecurity Triage Read-only

Find Listening Ports with ss

Before blaming the firewall, check whether anything is actually listening.

ss -ltnp
Cybersecurity Triage Sensitive output

Find Allowed Ports with No Listener

An open firewall rule can outlive the service it was created for.

comm -23 <(ufw status numbered | awk '/ALLOW/ {print}' | grep -Eo '[0-9]+/(tcp|udp)' | cut -d/ -f1 | sort -u) <(ss -ltnp | awk '/LISTEN/ {n=split($4,a,":"); print a[n]}' | sort -u)
Study mapping

Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.