There are numerous ports on your computer, but not all of them are open. Those ports connected to any incoming remote IP address and capable of exchanging data packets are called open ports. Such open ports can be abused to penetrate your computer if not monitored properly.  Some methods to check and monitor open ports on your computer have been addressed in this article.

How to Check Open Ports on Windows?

Windows provides its users with various inbuilt tools to detail information related to networking in a computer. The tools that will help to check open ports on your computer are Netstat, Get-NetTCPConnection, and Telnet. The steps for each have been listed below:

Netstat

Netstat (Network Statistics) is a command line tool in Windows that is able to provide various details related to the network connections of your computer. By running the right command on your Command prompt, you will be able to check for open ports. The steps for this include the following: Here, switch ‘n’ would show the IP address and ports numerically. And the ‘a’ switch filters to show only active ports.  Referring to the above image, the numbers beyond the colon on both local and foreign addresses show the port number and, before the colon are the IPs. For instance, Local address 0.0.0.0:135 is in Listening state for TCP protocols, which means port number 135 on your computer is open and ready to connect from all networks.  Except, foreign address shows the IP address:port number of the remote system where the connection has been established.

Get-NetTCPConnection

An alternative to the netstat command in Command Prompt would be Get-NetTCPConnection in Powershell. The availability of filtering features in Powershell provides an upper hand, as it can provide a list of only open ports. The steps mentioned below will guide you in doing so:

TCPView

TCPView is a free tool from Microsoft Sysinternals to get network statistics in an interactive GUI(graphical user interface) form. You will be able to view the open ports on your computer as soon as you download and launch the application. Follow the steps to do so:

Telnet

Telnet is a Microsoft service that uses a virtual terminal to connect to computers within the same network. Upon running its command, telnet tries to connect to any specified port of the mentioned IP address (computer). If the port is open on that IP, the connection establishes, and if it isn’t, the connection fails. You can follow the steps below to do so:

Should I Close All the Open Ports?

Seeing so many open ports on the computer can be overwhelming for a user. However, if you have checked your ports through the netstat command, you can get more information about what type of open ports and established connections are safe. As already covered, the local address (IP:port_number) shows to which IPs (network IPs) the computer is open and at which specific port. If the IP addresses start with 127.#.#.#, the corresponding port is open to only loopback addresses meaning local hosts(your own computer). No need to worry about threats there. But 0.0.0.0 IPs mean the suffixed ports are open to any type of connection, so they may be at potential risk but not at the current moment. Ports Listening to the local network IPs might be at slightly lower risks. However, other ports having Established connections should be kept an eye on.  Peculiar local addresses/ports connected to unknown foreign IP addresses/ports might be risky. But before you rush to close all the open ports, just know that not all the open ports are at a security risk. If you’re worried about any specific port, we recommend checking your firewall rules to understand what it’s used for before closing it.

How to Close an Open Port on Windows?

If you find a port connected to any unwanted computer/server/service, you can disconnect the connection and free up the port by using the Process ID(PID). PID associated with any port can be viewed with netstat -aon a command on the Command Prompt. The Process ID would list on the PID column of the returned tabular result. Now, to free up the port, you run the command: taskkill /f /im   But, if you want to completely block incoming connections to any desired port using Windows Firewall, you can run the following command in Command Prompt: netsh advfirewall firewall add rule name= “” dir=in action=block protocol=TCP localport= You can change the to any rule name you want and to the actual port number you want to block incoming connections to.  Furthermore, to open the blocked port, you can edit the action as allow (action=allow)in the command. And you can also edit dir as out, (dir=out), to perform an action on outgoing connections. Also, you can toggle between TCP and UDP protocols by changing protocol=UDP. 

How To Check If A Port Is Open On Windows - 74How To Check If A Port Is Open On Windows - 89How To Check If A Port Is Open On Windows - 10How To Check If A Port Is Open On Windows - 73How To Check If A Port Is Open On Windows - 77How To Check If A Port Is Open On Windows - 27How To Check If A Port Is Open On Windows - 53How To Check If A Port Is Open On Windows - 43How To Check If A Port Is Open On Windows - 48How To Check If A Port Is Open On Windows - 84How To Check If A Port Is Open On Windows - 21How To Check If A Port Is Open On Windows - 40How To Check If A Port Is Open On Windows - 53