How to see the closed ports

How to see the closed ports

At connection to the Internet the operating system selects to the programs working with network ports through which reception and sending data is carried out. The port can be open or closed. Sometimes the user has a need to check a status of ports.


1. When about port say that it is open, it means that it is used at present by some program. For connection with network more than 65 thousand ports can be used. Those ports which are not used, are closed at present. For this reason it is impossible to see the closed ports per se, in the analysis of network connections watch open ports.

2. How to look what ports on the computer are open? For this purpose open the command line (console): "Start-up" - "All programs" - "Standard" - "Command line". In the appeared black window (its view can be configured) enter the netstat command – aon and click Enter. There will be a list of the current network connections. In the first column the type of the network protocol – TCP or UDP is specified, in the second you will see the local addresses.

3. Pay attention to the digits going in lines of the local address after a colon it and there are numbers of the ports opened on your computer. How to learn what programs open them? For this purpose pay attention to the last column – PID. It is a process identifier. Knowing it, you can always learn a name of process to which it belongs. For this purpose in the same window of the console make the tasklist team. There will be a list of the processes started on the computer. Find the identifier interesting you in the second column, to the left of it there will be a process name.

4. There are situations when you have to open compulsorily in a firewall some port – that is to make it open for connection. If it is about a regular firewall of Windows, then it is quite possible to work with it via the console. So, for opening of some port it is enough to make the netsh firewall add portopening TCP 45678 system team in the console and to click Enter. In this example port 45678 will be open under the TCP protocol.

5. For closing of open port it is necessary to enter the netsh firewall delete portopening TCP 45678 command into consoles. In this example the port opened earlier is closed. You can look at settings of a firewall, having entered into etsh firewall show config consoles.

6. Whether it is possible means of a firewall to compulsorily close specific port, that is in general to prohibit programs to open it? It is possible, but in it there is no sense. Qualitative Trojan programs select the port opened by them in a random way therefore it is impossible to guess what port should be closed to be protected from any given trojan.

7. It is impossible to close all "excess" ports too as during the work on the Internet the browser uses not only the 80th port, but also others. Therefore, first, it is necessary to configure the list of the entrusted applications, and secondly, to watch in the console the list of connections at suspicious network activity of the computer. Also in settings of a firewall it is useful to include maintaining the log of connections.

Author: «MirrorInfo» Dream Team