<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=CMD_ss</id>
	<title>CMD ss - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://tech.uvoo.io/index.php?action=history&amp;feed=atom&amp;title=CMD_ss"/>
	<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=CMD_ss&amp;action=history"/>
	<updated>2026-04-27T17:52:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://tech.uvoo.io/index.php?title=CMD_ss&amp;diff=715&amp;oldid=prev</id>
		<title>Busk at 15:51, 15 July 2020</title>
		<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=CMD_ss&amp;diff=715&amp;oldid=prev"/>
		<updated>2020-07-15T15:51:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:51, 15 July 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ss -o state established | grep 10&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Shameless rip from https://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Shameless rip from https://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Busk</name></author>
	</entry>
	<entry>
		<id>https://tech.uvoo.io/index.php?title=CMD_ss&amp;diff=714&amp;oldid=prev</id>
		<title>Busk: Created page with &quot;Shameless rip from https://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html  List currently established, closed, orphaned and waiting TCP sockets, ent...&quot;</title>
		<link rel="alternate" type="text/html" href="https://tech.uvoo.io/index.php?title=CMD_ss&amp;diff=714&amp;oldid=prev"/>
		<updated>2020-07-15T15:50:09Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Shameless rip from https://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html  List currently established, closed, orphaned and waiting TCP sockets, ent...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Shameless rip from https://www.cyberciti.biz/tips/linux-investigate-sockets-network-connections.html&lt;br /&gt;
&lt;br /&gt;
List currently established, closed, orphaned and waiting TCP sockets, enter:&lt;br /&gt;
```&lt;br /&gt;
ss -s&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
How to display all open network ports with ss command on Linux&lt;br /&gt;
```&lt;br /&gt;
ss -l&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Type the following to see process named using open socket:&lt;br /&gt;
```&lt;br /&gt;
ss -pl&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Look at resources related to a process&lt;br /&gt;
```&lt;br /&gt;
cd /proc/3772&lt;br /&gt;
ls -l&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
/proc/self&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
More&lt;br /&gt;
```&lt;br /&gt;
Display All TCP Sockets&lt;br /&gt;
# ss -t -a&lt;br /&gt;
&lt;br /&gt;
Display All UDP Sockets&lt;br /&gt;
# ss -u -a&lt;br /&gt;
&lt;br /&gt;
Display All RAW Sockets&lt;br /&gt;
# ss -w -a&lt;br /&gt;
&lt;br /&gt;
Display All UNIX Sockets&lt;br /&gt;
# ss -x -a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Display All Established SMTP Connections&lt;br /&gt;
# ss -o state established '( dport = :smtp or sport = :smtp )'&lt;br /&gt;
&lt;br /&gt;
Display All Established HTTP Connections&lt;br /&gt;
# ss -o state established '( dport = :http or sport = :http )'&lt;br /&gt;
&lt;br /&gt;
Find All Local Processes Connected To X Server&lt;br /&gt;
# ss -x src /tmp/.X11-unix/*&lt;br /&gt;
&lt;br /&gt;
List All The Tcp Sockets in State FIN-WAIT-1&lt;br /&gt;
List all the TCP sockets in state -FIN-WAIT-1 for our httpd to network 202.54.1/24 and look at their timers:&lt;br /&gt;
# ss -o state fin-wait-1 '( sport = :http or sport = :https )' dst 202.54.1/24&lt;br /&gt;
&lt;br /&gt;
How Do I Filter Sockets Using TCP States?&lt;br /&gt;
The syntax is as follows:&lt;br /&gt;
&lt;br /&gt;
## tcp ipv4 ##&lt;br /&gt;
ss -4 state FILTER-NAME-HERE&lt;br /&gt;
 &lt;br /&gt;
## tcp ipv6 ##&lt;br /&gt;
ss -6 state FILTER-NAME-HERE&lt;br /&gt;
Where FILTER-NAME-HERE can be any one of the following,&lt;br /&gt;
&lt;br /&gt;
established&lt;br /&gt;
syn-sent&lt;br /&gt;
syn-recv&lt;br /&gt;
fin-wait-1&lt;br /&gt;
fin-wait-2&lt;br /&gt;
time-wait&lt;br /&gt;
closed&lt;br /&gt;
close-wait&lt;br /&gt;
last-ack&lt;br /&gt;
listen&lt;br /&gt;
closing&lt;br /&gt;
all : All of the above states&lt;br /&gt;
connected : All the states except for listen and closed&lt;br /&gt;
synchronized : All the connected states except for syn-sent&lt;br /&gt;
bucket : Show states, which are maintained as minisockets, i.e. time-wait and syn-recv.&lt;br /&gt;
big : Opposite to bucket state.&lt;br /&gt;
ss command examples&lt;br /&gt;
Type the following command to see closing sockets:&lt;br /&gt;
&lt;br /&gt;
ss -4 state closing&lt;br /&gt;
Recv-Q Send-Q                                                  Local Address:Port                                                      Peer Address:Port&lt;br /&gt;
1      11094                                                  75.126.153.214:http                                                      175.44.24.85:4669&lt;br /&gt;
How Do I Matches Remote Address And Port Numbers?&lt;br /&gt;
Use the following syntax:&lt;br /&gt;
&lt;br /&gt;
ss dst ADDRESS_PATTERN&lt;br /&gt;
 &lt;br /&gt;
## Show all ports connected from remote 192.168.1.5##&lt;br /&gt;
ss dst 192.168.1.5&lt;br /&gt;
 &lt;br /&gt;
## show all ports connected from remote 192.168.1.5:http port##&lt;br /&gt;
ss dst 192.168.1.5:http&lt;br /&gt;
ss dst 192.168.1.5:smtp&lt;br /&gt;
ss dst 192.168.1.5:443&lt;br /&gt;
Find out connection made by remote 123.1.2.100:http to our local virtual servers:&lt;br /&gt;
# ss dst 123.1.2.100:http&lt;br /&gt;
&lt;br /&gt;
Sample outputs:&lt;br /&gt;
&lt;br /&gt;
State      Recv-Q Send-Q                                             Local Address:Port                                                 Peer Address:Port&lt;br /&gt;
ESTAB      0      0                                                 75.126.153.206:http                                               123.1.2.100:35710&lt;br /&gt;
ESTAB      0      0                                                 75.126.153.206:http                                               123.1.2.100:35758&lt;br /&gt;
How Do I Matches Local Address And Port Numbers?&lt;br /&gt;
ss src ADDRESS_PATTERN&lt;br /&gt;
### find out all ips connected to nixcraft.com ip address 75.126.153.214 ###&lt;br /&gt;
## Show all ports connected to local 75.126.153.214##&lt;br /&gt;
ss src 75.126.153.214&lt;br /&gt;
 &lt;br /&gt;
## http (80) port only ##&lt;br /&gt;
ss src 75.126.153.214:http&lt;br /&gt;
ss src 75.126.153.214:80&lt;br /&gt;
 &lt;br /&gt;
## smtp (25) port only ##&lt;br /&gt;
ss src 75.126.153.214:smtp&lt;br /&gt;
ss src 75.126.153.214:25&lt;br /&gt;
How Do I Compare Local and/or Remote Port To A Number?&lt;br /&gt;
Use the following syntax:&lt;br /&gt;
&lt;br /&gt;
## Compares remote port to a number ##&lt;br /&gt;
ss dport OP PORT&lt;br /&gt;
 &lt;br /&gt;
## Compares local port to a number ##&lt;br /&gt;
sport OP PORT&lt;br /&gt;
Where OP can be one of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;= or le : Less than or equal to port&lt;br /&gt;
&amp;gt;= or ge : Greater than or equal to port&lt;br /&gt;
== or eq : Equal to port&lt;br /&gt;
!= or ne : Not equal to port&lt;br /&gt;
&amp;lt; or gt : Less than to port&lt;br /&gt;
&amp;gt; or lt : Greater than to port&lt;br /&gt;
Note: le, gt, eq, ne etc. are use in unix shell and are accepted as well.&lt;br /&gt;
Examples&lt;br /&gt;
###################################################################################&lt;br /&gt;
### Do not forget to escape special characters when typing them in command line ###&lt;br /&gt;
###################################################################################&lt;br /&gt;
 &lt;br /&gt;
ss  sport = :http&lt;br /&gt;
ss  dport = :http&lt;br /&gt;
ss  dport \&amp;gt; :1024&lt;br /&gt;
ss  sport \&amp;gt; :1024&lt;br /&gt;
ss sport \&amp;lt; :32000&lt;br /&gt;
ss  sport eq :22&lt;br /&gt;
ss  dport != :22&lt;br /&gt;
ss  state connected sport = :http&lt;br /&gt;
ss \( sport = :http or sport = :https \)&lt;br /&gt;
ss -o state fin-wait-1 \( sport = :http or sport = :https \) dst 192.168.1/24&lt;br /&gt;
```&lt;/div&gt;</summary>
		<author><name>Busk</name></author>
	</entry>
</feed>