Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does the Windows server view port information

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to view port information on Windows server". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to view port information on Windows server.

The following collates and summarizes some methods and tools on how to view server port information (under the Windows platform).

1:tcpview tool View Port

Using the tcpview tool to view port information, this tool can display not only the port (Local Port) of the current server, but also the remote port number corresponding to a TCP connection.

2: resource Monitor View Port

There are a variety of ways to run Explorer, and here are three commonly used ways:

1: in the "menu" → all programs "→" attachment "→" system tools "→" Resource Monitor

The corresponding operations of the English system are as follows:

Start menu → All Programs → Accessories → System Tools → Resource Monitor

2:Windows + R runs the resmon.exe command to start the Resource Monitor.

Click Resource Monitor in 3:Windows Task Manager

As shown in the screenshot below, in the Resource Monitor, you will find the "listening Port" panel, and you will find the corresponding program name, process number, protocol, firewall status, address, port. The information is more detailed and refreshed regularly. You can also clearly see whether the firewall restricts the port number. It can also be sorted by certain indicators. The deficiency is also obvious: search and positioning is more troublesome, induction and statistics is more troublesome.

3: command netstat to view the port

The netsta command is very powerful and can be used to display statistics related to the IP, TCP, UDP and ICMP protocols. It is generally used to verify the network connectivity of each port of the machine. Netstat is a program that accesses network and related information in the kernel. It can provide reports on TCP connection, TCP and UDP snooping, and process memory management.

View help information for the netstat command:

Netstat-help displays protocol statistics and current TCP/IP network connections. NETSTAT [- a] [- b] [- e] [- f] [- n] [- o] [- p proto] [- r] [- s] [- t] [interval]-a shows all connection and listening ports. -b displays the executable programs involved in creating each connection or listening port. In some cases, the executable is known to host multiple independent components, in which case the sequence of components involved in creating a connection or listening port is displayed. In this case, the name of the executable program is at the bottom [], and the component it calls is at the top until it reaches the TCP/IP. Note that this option can be time-consuming and may fail if you do not have sufficient permissions. -e displays Ethernet statistics. This option can be used with the-s option. -f displays the fully qualified domain name (FQDN) of the external address. -n displays the address and port number in numeric form. -o displays the owned process ID associated with each connection. -p proto displays connections to the protocol specified by proto; proto can be any of the following: TCP, UDP, TCPv6, or UDPv6. If used with the-s option to display statistics for each protocol, proto can be any of the following: IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6. -r displays the routing table. -s displays statistics for each protocol. By default, statistics for IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6 are displayed; the-p option can be used to specify the default subnet. -t displays the current connection uninstall status. Interval redisplays the selected statistics, the number of seconds between displays. Press CTRL+C to stop redisplaying statistics. If omitted, netstat prints the current configuration information once.

Note: the parameters of the netstat command under Windows are different from those of the netstat command under Linux. It is best to check the help information of the command.

Some examples of netstat commands, the power of the nestat command is that it is flexible and can meet a variety of scenarios.

View all listening ports

C:\ Users > netstat-aon | find / I "listening" C:\ Users > netstat-ano | findstr ": 139" TCP 192.168.103.63 LISTENING 139 0.0.0 Users 0 LISTENING 4 C:\ Users > netstat-aon | find / I "listening" | find "445" TCP 192.168.103.63 aon 139 0.0.00 LISTENING 4 C:\ Users >

Displays the usage of UDP port numbers:

C:\ Users > netstat-a-p UDP

The help of the find command is as follows:

C:\ Users > find /? Search for strings in the file. FIND [/ V] [/ C] [/ N] [/ I] [/ offline]] "string" [[drive:] [path] filename [...]] / V displays all lines that do not contain the specified string. / C displays only the number of lines that contain a string. / N displays the line number. / I ignores case when searching for strings. / OFF [LINE] do not skip files with offline property sets. "string" specifies the text string to search for. [drive:] [path] filename specifies the files to search for. If no path is specified, FIND searches for text typed at the prompt or text generated by another command.

The help of the finstr command is as follows:

C:\ Users > findstr /? Look for a string in the file. FINDSTR [/ B] [/ E] [/ L] [/ R] [/ S] [/ I] [/ X] [/ V] [/ N] [/ M] [/ O] [/ P] [/ F:file] [/ C:string] [/ G:file] [/ D:dir list] [/ A:color attributes] [/ OFF[LINE]] strings [[drive:] [ Path] filename [...]] / B begins the pairing mode on a line. / E pairing mode at the end of a line. / L uses the search string by word. / R uses the search string as a general expression. / S searches the current directory and all subdirectories for matching files. / I specifies that searches are case-insensitive. / X prints lines that match exactly. / V prints only lines that do not contain matches. / N prints the number of lines before each line that matches. / M if the file contains a match, only its file name is printed. / O prints the character offset before each matching line. / P A file with slightly unprintable characters. / OFF [LINE] does not skip files with offline property sets. / A:attr specifies the color attribute with hexadecimal digits. See "color /?" / F:file to read the file list from the specified file (/ on behalf of the console). / C:string uses the specified string as the text search string. / G:file gets the search string from the specified file. (/ represents the console). / D:dir looks for the text that strings is looking for in the list of directories separated by semicolons. [drive:] [path] filename specifies the file to find. Unless the parameter has a / C prefix, use a space to separate the search string. For example: 'FINDSTR "hello there" x.y' look for "hello" or "there" in the file x.y. FINDSTR / C: "hello there" x.y' file x.y looking for "hello there". Quick reference to general expressions:. Wildcard: any character * repetition: previous character or class appears zero or more times ^ line position: line start $line position: line end [class] character class: any character in the character set [^ class] complement character class: any character not in the character set [Xmury] range : any character within the specified range\ x Escape: the text usage of metacharacter x\ word position: the end of the word details about common FINDSTR expressions See the online command reference. At this point, I believe you have a deeper understanding of "how to view port information on the Windows server". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report