How to Check Open Ports Using CMD in Windows?
Last Updated : 09 Apr, 2025
Open ports on your Windows computer act like doors for data-letting information in and out. While necessary for apps and services, unprotected ports can become security risks. Checking which ports are open helps you spot vulnerabilities, fix connection issues, and keep your system safe.
Using Command Prompt (CMD), you can quickly see active ports with simple built-in commands—no extra tools needed. This guide walks you through the steps to check open ports in Windows, understand the results, and close any unnecessary ones.
Whether you’re troubleshooting a network problem or guarding against threats, these CMD techniques give you control over your system’s security.
How to Check Open Ports Using CMD in WindowsHow to Check Open Ports Using CMD in Windows
Make sure that the essential ports are allowed or blocked by your firewall system configuration. The Control Panel's Windows Firewall settings allow you to control all the initial processes for system requirements. If you discover the open ports that ought to be closed within the system, you might want to halt the related service or change the in-build configuration of the program that opened the port manually.
Now, see the below-mentioned steps and implement them to Check Open Ports Using CMD in Windows.
Step 1: Open CMD or Command Prompt
- Press Win + R from your keyboard > Type cmd > Click on the Enter button
Open CMDStep 2: Implement the "netstat" Command
An effective tool for keeping an eye on open ports within the system and configured network connections is the netstat command to simplify. It offers comprehensive details on all open connections and system servers, such as the protocol in use, and local and international addresses to control or verify all the connection's status.
- Type the below command in the cmd to check the open port functions > Press Enter
netstat -an | find "LISTEN"
netstatTCP 0.0.0.0:135 0.0.0.0:0 LISTENING
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
TCP 0.0.0.0:902 0.0.0.0:0 LISTENING
netstat listIn this case, 0.0.0.0 designates that all pre-processed network interfaces are listening on the port, which is open for the internal system server. The port number is the number that comes after the colon of the system commands (e.g., 135, 445, 3389).
Step 3: Observe the functional Process Using the Port
- Write the following command to identify which application or process is using a specific port within the system.
netstat -ano | find "LISTEN"
LISTENAn extra -o flag is included with this command while processed, which shows the Process ID (PID) connected to each port manually.
- See the output within a PID column
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 1160
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4
- Search and Open Task Manager > Go to Details option > See the PID column
LISTEN LIstStep 4: Check Specific Port in cmd
- You can change the implemented command to focus on a particular port if you want to see if it's open or not within the system configuration. For instance, use this to see if port 60 is open to identify the process:
netstat -an | find ":60"
- See the final entry below -
find entryTCP 0.0.0.0:40 0.0.0.0:0 LISTENING
find portsConclusion
Using Windows' CMD to check all the internal open ports is a simple yet effective method for network management, security control, and troubleshooting issues identification. You can safeguard your system from external potential dangers and make sure your connected network is operating efficiently by routinely checking open ports within the system. The netstat command is an invaluable resource for any IT professional or developer toolset, especially when paired with a basic understanding of ports and processes of all the initial implementations.
Also Read
Similar Reads
How to Open Google Chrome Using CMD on Windows 11?
Opening Google Chrome using CMD in Windows 11 is a convenient way to launch the browser without needing to use the graphical interface. Whether you're troubleshooting or simply prefer using the command line, this guide will show you how to run Chrome via CMD on Windows 11. The steps are easy and can
4 min read
How to Open Command Prompt in Windows 11, 10, 8, 7
The Command Prompt is a powerful tool in Windows for executing commands, troubleshooting issues, and automating tasks. Whether you're using Windows 11, 10, 8, or 7, this guide covers all the methods to open Command Prompt quickly and efficiently. 8 Proven Methods to run the Command Prompt (cmd) in W
8 min read
How to use CMD for Python in Windows 10?
Using the Command Prompt (CMD) is an effective way to interact with Python on your Windows 10 machine. Whether you're writing scripts, testing code, or running programs, mastering CMD for Python in Windows 10 is crucial. This article will guide you on how to run Python in CMD, execute scripts, and t
4 min read
How to Open Windows PowerShell as an Admin in Windows 11?
Windows Powershell is a powerful command-line shell and scripting language devised for administrators and professionals. PowerShell with administrative privileges in Windows 11 makes it possible to carry out tasks with superior permissions. This article will discuss several ways of opening Windows P
4 min read
How to Check DNS Records Using Basic NsLookup CMD?
The NsLoookup command is a utility that can be used when trying to troubleshoot problems with networking or test DNS configurations. It allows querying the DNS server for domain information, such as which IP addresses are associated with it, mail server information, and other DNS records DNS, or Dom
5 min read
How to Find Connected WiFi Password in Windows?
If you're connected to a WiFi network but can't remember the password, don't worryâWindows allows you to retrieve it easily. Whether you need to connect a new device or share the password with someone else, finding the connected WiFi password in Windows is a straightforward process. This guide will
3 min read
How to Install or Uninstall a Windows Service in C#?
Windows Services is a core component of the Microsoft Windows NT operating system that allows the creation and regulation of processes. Windows Services can start without user intervention and may continue to run long after the user has logged off. Windows services run in the background of the OS an
3 min read
How to check Active Network Connections in Windows?
There could be instances where we need to check our current network connectivity or sometimes troubleshoot a particular connection. We can follow a few simple steps to check the active connections. We also have some predefined commands that when entered in command prompt give a detailed explanation
3 min read
How to Get Open Port Banner in Python
In this article, we will see how to Get Open Port Banner in Python. Here we will discuss What is Port? Port is a terminology used on computer networks. You might know, that whenever you connect to the internet, your system or any device to which you are connecting is assigned an IP address.  So, wh
4 min read
How to Upgrade PowerShell in Windows
Upgrading PowerShell on Windows ensures access to new commands, enhanced security features, and better compatibility with modern scripts and tools. Whether youâre using it for system administration, automation, or development, staying up to date can make a significant difference. In this guide, weâl
6 min read