ss – man 1st

dpkg -L iproute2

–n, –numeric don’t resolve service names
-r, –resolve : resolve host hostnames.
-l, –listening display listening sockets
-o, –options show timer information
-e, –extended show detailed socket information
-m, –memory show socket memory usage
-p, –processes show process using socket
–s, –summary show socket usage summary
-N, –net switch to the specified network namespace name
-4, –ipv4 display only IP version 4 sockets
-6, –ipv6 display only IP version 6 sockets
–0, –packet display PACKET sockets
-t, –tcp display only TCP sockets
-S, –sctp display only SCTP sockets
-u, –udp display only UDP sockets
-w, –raw display only RAW sockets
-x, –unix display only Unix domain sockets
-f, –family=FAMILY display sockets of type FAMILY

Filtering ss with TCP States
established
syn-sent
syn-recv
fin-wait-1
fin-wait-2
time-wait
closed
close-wait
last-ack
listening
closing
all (all of the above states)
connected (all the states with the exception of listen and closed)
synchronized (all of the connected states with the exception of syn-sent)
bucket (states which are maintained as minisockets, for example time-wait and syn-recv)
big (Opposite to bucket state)
#ss -t dst 192.168.1.10:443
#ss -t state established ‘( dport = :ssh or sport = :ssh )’

Posted in: net