Introduction
This article covers troubleshooting using the ss command.
Procedure
Ss is a tool that allows you to review the network connections to your server. Below is a list of some common tasks you can perform with the ss command
Check listening sockets by port number:
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
tcp LISTEN 0 128 *:80 *:*
tcp LISTEN 0 128 [::]:80 [::]:*
[root@serverb ~]#
Check for listening sockets on multiple ports:
[root@serverb ~]# ss -ln 'sport = :80 or sport = :443'
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
tcp LISTEN 0 128 *:443 *:*
tcp LISTEN 0 128 *:80 *:*
tcp LISTEN 0 128 [::]:443 [::]:*
tcp LISTEN 0 128 [::]:80 [::]:*
[root@serverb ~]#
Check connections from a certain host:
[root@serverb ~]# ss -n 'dst 10.3.17.119'
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
tcp ESTAB 0 36 172.16.1.3:22 10.3.17.119:53416
[root@serverb ~]#
Comments
0 comments
Article is closed for comments.