A command table for the program ports that the query runs under Windows

Source: Internet
Author: User
Tags port number

We want to view the ports in Windows 2000/xp/server 2003 using the netstat command:

Command format: netstat-a-e-n-o-s

-A indicates that all active TCP connections and the TCP and UDP ports that the computer listens to are displayed.

-E Indicates the number of bytes sent and received by the Ethernet, the number of packets, and so on.

-N indicates that only the address and port number of all active TCP connections is displayed numerically.

-O indicates that the active TCP connection is displayed and includes the process ID (PID) for each connection.

-S indicates statistics for various connections, including port numbers, by protocol.

Close/Open ports

Before introducing the role of various ports, here is how to close/Open the port in Windows, because by default, there are many unsafe or useless ports are open, such as Telnet service 23 port, FTP Service 21 port, SMTP Service 25 port, RPC Service 135 ports, and so on. In order to ensure the security of the system, we can use the following method to close/open the port.

Close port

For example, to turn off the SMTP service's 25 port in Windows 2000/XP, you can do this by opening Control Panel first, double-clicking Administrative Tools, and then double-clicking Services. In the Open service window, locate and double-click the simple Mail Transfer Protocol ( SMTP) service, click the Stop button to stop the service, then select Disabled in Startup Type, and then click OK. In this way, shutting down the SMTP service is equivalent to shutting down the corresponding port.

Open port

If you want to open the port, you can enable the port by clicking the "Start Type" option, clicking the "OK" button, and then opening the service, in the service status, click the Start button, and then click OK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.