See listening sockets and active connections.
ss
What is listening
ss -tlnp
Who is connected right now
ss -tnp state established
Filter by port
ss -tnp '( sport = :443 or dport = :443 )'
Connections in a state that tends to mean a leak
ss -tanp state time-wait | wc -l
On a busy host the default
ss -tanp output scrolls past. Narrow by port first, then by state.