<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://it-arts.net/index.php?action=history&amp;feed=atom&amp;title=PFSENSE_-_NETSTAT_Command</id>
	<title>PFSENSE - NETSTAT Command - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://it-arts.net/index.php?action=history&amp;feed=atom&amp;title=PFSENSE_-_NETSTAT_Command"/>
	<link rel="alternate" type="text/html" href="https://it-arts.net/index.php?title=PFSENSE_-_NETSTAT_Command&amp;action=history"/>
	<updated>2026-05-02T18:23:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://it-arts.net/index.php?title=PFSENSE_-_NETSTAT_Command&amp;diff=850&amp;oldid=prev</id>
		<title>Admin: Text replacement - &quot;Category:Wiki&quot; to &quot;Category:Wiki

&#039;&#039;&#039;&#039;&#039;[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]&#039;&#039;&#039;&#039;&#039;
&quot;</title>
		<link rel="alternate" type="text/html" href="https://it-arts.net/index.php?title=PFSENSE_-_NETSTAT_Command&amp;diff=850&amp;oldid=prev"/>
		<updated>2026-01-17T07:03:52Z</updated>

		<summary type="html">&lt;p&gt;Text replacement - &amp;quot;&lt;a href=&quot;/index.php/Category:Wiki&quot; title=&quot;Category:Wiki&quot;&gt;Category:Wiki&lt;/a&gt;&amp;quot; to &amp;quot;&lt;a href=&quot;/index.php/Category:Wiki&quot; title=&quot;Category:Wiki&quot;&gt;Category:Wiki&lt;/a&gt;  &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;quot;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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 07:03, 17 January 2026&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 class=&quot;diff-marker&quot;&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;[[Category:Wiki]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;[[Category:Wiki]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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 colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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;&#039;&#039;&#039;&#039;&#039;[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]&#039;&#039;&#039;&#039;&#039;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&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=&quot;diff-marker&quot;&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;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&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;== Syntax ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&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;== Syntax ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://it-arts.net/index.php?title=PFSENSE_-_NETSTAT_Command&amp;diff=490&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;Category:Wiki  == Syntax ==  The basic syntax of the `netstat` command is:   &lt;nowiki&gt; netstat [options] &lt;/nowiki&gt;  Where `[options]` can be any of the following flags, which modify the behavior of the command.  == Common Options ==  * `-a` : Display all sockets (both listening and non-listening). * `-n` : Show numerical addresses instead of resolving hostnames. * `-r` : Show the routing table. * `-i` : Display network interfaces and their statistics. * `-s` : Display...&quot;</title>
		<link rel="alternate" type="text/html" href="https://it-arts.net/index.php?title=PFSENSE_-_NETSTAT_Command&amp;diff=490&amp;oldid=prev"/>
		<updated>2025-12-14T07:31:09Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php/Category:Wiki&quot; title=&quot;Category:Wiki&quot;&gt;Category:Wiki&lt;/a&gt;  == Syntax ==  The basic syntax of the `netstat` command is:   &amp;lt;nowiki&amp;gt; netstat [options] &amp;lt;/nowiki&amp;gt;  Where `[options]` can be any of the following flags, which modify the behavior of the command.  == Common Options ==  * `-a` : Display all sockets (both listening and non-listening). * `-n` : Show numerical addresses instead of resolving hostnames. * `-r` : Show the routing table. * `-i` : Display network interfaces and their statistics. * `-s` : Display...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Wiki]]&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
The basic syntax of the `netstat` command is:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat [options]&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where `[options]` can be any of the following flags, which modify the behavior of the command.&lt;br /&gt;
&lt;br /&gt;
== Common Options ==&lt;br /&gt;
&lt;br /&gt;
* `-a` : Display all sockets (both listening and non-listening).&lt;br /&gt;
* `-n` : Show numerical addresses instead of resolving hostnames.&lt;br /&gt;
* `-r` : Show the routing table.&lt;br /&gt;
* `-i` : Display network interfaces and their statistics.&lt;br /&gt;
* `-s` : Display statistics by protocol (TCP, UDP, ICMP, etc.).&lt;br /&gt;
* `-p` : Show the PID and program name associated with each socket.&lt;br /&gt;
* `-t` : Display TCP connections only.&lt;br /&gt;
* `-u` : Display UDP connections only.&lt;br /&gt;
* `-l` : Show only listening sockets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Display All Network Connections ==&lt;br /&gt;
&lt;br /&gt;
To display all network connections (both listening and non-listening), use the `-a` option.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -a&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will show all active connections, including TCP and UDP connections, along with the listening sockets.&lt;br /&gt;
&lt;br /&gt;
== Display Network Connections with Numerical Addresses ==&lt;br /&gt;
&lt;br /&gt;
To show the numerical addresses of network connections instead of hostnames, use the `-n` option. This can be helpful for avoiding DNS resolution delays.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -an&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will show the connections using IP addresses instead of hostnames.&lt;br /&gt;
&lt;br /&gt;
== Show Routing Table ==&lt;br /&gt;
&lt;br /&gt;
To display the routing table, use the `-r` option.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -r&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will display the kernel routing table, showing how the system routes network traffic.&lt;br /&gt;
&lt;br /&gt;
== Display Interface Statistics ==&lt;br /&gt;
&lt;br /&gt;
To view network interface statistics, use the `-i` option. This command will show the statistics for each interface.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -i&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output includes information like the number of packets received and sent, errors, dropped packets, etc.&lt;br /&gt;
&lt;br /&gt;
== Display Protocol Statistics ==&lt;br /&gt;
&lt;br /&gt;
Use the `-s` option to display statistics for each network protocol (e.g., TCP, UDP, ICMP, etc.).&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -s&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will show protocol-specific statistics, including the number of packets received, sent, errors, and other related metrics.&lt;br /&gt;
&lt;br /&gt;
== Display Listening Sockets ==&lt;br /&gt;
&lt;br /&gt;
To show only the listening sockets (ports that are waiting for incoming connections), use the `-l` option.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -l&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will display all listening sockets, helping you identify which services are ready to accept connections.&lt;br /&gt;
&lt;br /&gt;
== Display TCP Connections ==&lt;br /&gt;
&lt;br /&gt;
To filter and show only TCP connections, use the `-t` option.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -t&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will show all active TCP connections, including both incoming and outgoing.&lt;br /&gt;
&lt;br /&gt;
== Display UDP Connections ==&lt;br /&gt;
&lt;br /&gt;
To show only UDP connections, use the `-u` option.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -u&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will show all active UDP connections.&lt;br /&gt;
&lt;br /&gt;
== Display PID and Program Name ==&lt;br /&gt;
&lt;br /&gt;
To display the PID (Process ID) and the associated program name with each socket, use the `-p` option.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -p&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will show the process ID and the name of the program that owns each socket.&lt;br /&gt;
&lt;br /&gt;
== Combining Options ==&lt;br /&gt;
&lt;br /&gt;
Multiple options can be combined to display more specific information. For example, to display all active connections with numerical addresses and associated PID/program name, use:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -anp&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will show all connections with numerical addresses and the corresponding PID and program names.&lt;br /&gt;
&lt;br /&gt;
== Example: Show Listening TCP Ports ==&lt;br /&gt;
&lt;br /&gt;
If you want to display all listening TCP ports, use:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -lt&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will display only the TCP sockets that are in the listening state.&lt;br /&gt;
&lt;br /&gt;
== Example: Show Active UDP Connections with Program Info ==&lt;br /&gt;
&lt;br /&gt;
To show active UDP connections along with the associated program names and PIDs:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -up&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will display active UDP connections and the processes associated with them.&lt;br /&gt;
&lt;br /&gt;
== Example: Show Routing Table with Interface Information ==&lt;br /&gt;
&lt;br /&gt;
To display the routing table along with interface information, use:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netstat -ri&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will show the routing table and interface statistics in a readable format.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting with netstat ==&lt;br /&gt;
&lt;br /&gt;
Here are some practical troubleshooting scenarios where `netstat` can be useful:&lt;br /&gt;
&lt;br /&gt;
* **Identifying open ports**: Use `netstat -an` to see which ports are open on your pfSense system.&lt;br /&gt;
* **Finding listening services**: Use `netstat -l` to determine which services are waiting for incoming connections.&lt;br /&gt;
* **Monitoring network performance**: Use `netstat -i` to check for packet errors, drops, and overall interface health.&lt;br /&gt;
* **Debugging connection issues**: Use `netstat -p` to find which processes are using specific network ports, helping to diagnose application-level issues.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>