Last year we suffered the BitCoin miner virus which locked our computer and levied a ransom. And yet, the main reason for the spread of the virus was that the unused ports did not close. So, to guard against happening again, we have to determine what ports are being used in windows and then turn it off.

What is a Port?

When it comes to port, it’s necessary to talk about IP as well. Let me draw an analogy to describe the relationship between the Port and IP. Once upon a time, if you want to send a letter to your friend in a faraway place, you need to write down your address and his address on the envelope. The envelope is amount to the data package while both addresses are amount to IP. When the postman sends the letter to your friend’s house, and if your friend opens the door to get it, now the door is equal to the port. If your friend doesn’t open the door, that is to say, the port closed. After that, the letter will be sent back to you. In network technology, ports divide into two classes. One is a physical port, such as USB port. The second is the logical port, which generally refers to the port in the TCP/IP protocol. These port will cause some virus and harm your PC. As a result, there is necessary to check if the port is open.

Determine What Ports are Being Used in Windows 10

Step 1: Hit Windows + R to invoke Run dialog and type cmd to open Command Prompt.

Step 2: Type netstat -ano to list states of all ports.

Alternatively, type telnet <IP address> <Port> to check if port is open.

port is closed

Step 3: Locate to the target port and view the corresponding PID in the final column. For example, the PID of port 2179 is 3800.

list states of all ports

Step 4: Input tasklist|findstr “3800” and hit Enter on the keyboard to view which service takes up the port.

view process takeup

Step 5: To end up this service, run taskkill /f /t /im vmms.exe.

end up service