In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Netstat-an to view the listening ports that have been started on this machine
Netstat-ano to view the listening port and the corresponding process (PID)
Example:
Netstat-ano | findstr "9050" (check the process number corresponding to a port)
TCP 127.0.0.1:9050 0.0.0.0:0 LISTENING 2016
We can see that the process number corresponding to the 9050 port number is 2016
Tasklist | findstr "2016" (view the tasks corresponding to a process)
Tor.exe 2016 Console 0 16064 K
We can see that the task corresponding to 2016 of the processes is tor.exe.
Command format: NETSTAT [- a] [- b] [- e] [- n] [- o] [- p proto] [- r] [- s] [- v] [interval]
-a displays 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 the TCP/IP is reached. 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 in combination with the-s option.
-n displays the address and port number in numeric form.
-o displays the owning process ID associated with each connection.
-p proto displays connections to the protocol specified by proto; proto can be one of the following protocols: TCP, UDP, TCPv6, or UDPv6. If used with the-s option to display statistics by protocol, proto can be one of the following protocols: IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.
-r displays the routing table.
-s displays statistics by protocol. By default, statistics for IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, and UDPv6 are displayed; the-p option is used to specify the default subnet.
-t displays the current connection uninstall status.
Interval redisplays the selected statistics, pausing the interval (in seconds) between each display. Press CTRL+C to stop redisplaying statistics. If omitted, netstat displays the current configuration information (only once)
Close the port
For example, to close port 25 of the SMTP service in Windows 2000/XP, you can do this: first open the Control Panel, double-click Administrative tools, and then double-click Services. Then find and double-click the "Simple Mail Transfer Protocol (SMTP)" service in the open service window, click the "stop" button to stop the service, then select "disabled" in the "Startup Type", and finally click the "OK" button. In this way, shutting down the SMTP service is equivalent to closing the corresponding port.
Open the port
If you want to open the port, just select "automatic" in "Startup Type", click "OK" button, then open the service, click "start" button in "Service status" to enable the port, and finally, click the "OK" button.
In addition, in the network connection properties, select the "TCP/IP Protocol" property, open the advanced TCP/IP settings, turn on TCP/IP filtering on the page of the options, and in the settings window that appears, you can also set the port to open and close according to the implementation. The default is that TCP/IP is not enabled.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.