How do I display all listening source and destination http sockets using network command ss?



  • Also see the man page: ss(8) - another utility to investigate sockets

    To display all listening source and destination http sockets:

    $ ss  -o state listening '( dport = :http or sport = :http )'
    Netid    Recv-Q     Send-Q            Local Address:Port           Peer Address:Port
    tcp      0          128                     0.0.0.0:http                0.0.0.0:*
    tcp      0          128                        [::]:http                   [::]:*
    
           Available identifiers are:
    
                  All  standard  TCP  states: established, syn-sent, syn-recv, fin-wait-1,
                  fin-wait-2, time-wait, closed, close-wait, last-ack, listening and clos‐
                  ing.
    
                  all - for all the states
    
                  connected - all the states except for listening and closed
    
                  synchronized - all the connected states except for syn-sent
    
                  bucket  -  states,  which are maintained as minisockets, i.e.  time-wait
                  and syn-recv
    
                  big - opposite to bucket
    

Log in to reply
 

© Lightnetics 2024