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 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
Step 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"
- See the output below
TCP 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
In 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"
An 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
Step 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 —
TCP 0.0.0.0:40 0.0.0.0:0 LISTENING
Conclusion
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
- How to check Active Network Connections in Windows?
- Ways to Find Out List of All Open Ports in Linux
Imagine you’re playing your favorite online game, but you’re experiencing lag and connection issues. Or perhaps you’re concerned about the security of your Windows system and want to ensure no unauthorized access points exist. The culprit behind these scenarios could be open ports on your system.
Open ports act as virtual doorways that allow your computer to communicate with other devices or servers across a network. They play a crucial role in facilitating various online activities, from web browsing and email to file sharing and online gaming. However, open ports can also pose security risks if not properly managed, potentially allowing malicious actors to gain access to your system.
Understanding how to check open ports Windows is essential for both troubleshooting network problems and maintaining optimal system security. This process, known as port scanning, allows you to identify which ports are open, the services or applications associated with them, and potential vulnerabilities that may need addressing. The article will guide you on how you can check Windows open ports.
What are Open Ports?
Open ports are TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) ports that are currently in use by a running process or service on your system. These ports are essential for network communication protocols, as they allow different applications and services to exchange data. For example, when you access a website, your web browser uses port 80 (HTTP) or port 443 (HTTPS) to communicate with the web server.
There are 65,535 available TCP and UDP ports, divided into three ranges:
- Well-known ports (0-1023): Assigned to common network services like FTP (21), SSH (22), and HTTP (80).
- Registered ports (1024-49151): Assigned to specific organizations or vendors for their products and services.
- Dynamic ports (49152-65535): Used for temporary or private connections, such as during a file transfer.
Explore the Blazing Fast Speed with Cheap Windows VPS!
With Ultahost, Hosting Windows VPS has never been easier or faster. Enjoy ultra-fast SSD NVME speeds with no dropouts and slowdowns.
Checking open ports is crucial for maintaining system security and preventing unauthorized access. Here are some reasons why:
- Malware and virus infections: Malware can use open ports to communicate with their command and control servers, stealing sensitive data or spreading further infections.
- Unauthorized access: Open ports can allow hackers to access your system remotely, potentially leading to data breaches or system compromise.
- Resource utilization: Unused open ports can consume system resources, slowing down your system’s performance.
Windows provides two built-in tools for port scanning: Netstat and PowerShell. Below we outline the basic guide on how to see open ports Windows.
Netstat
Netstat is a command-line utility that displays active network connections, routing tables, and interface statistics. To use netstat for port scanning, you need to open Command Prompt as an administrator use the following command and press Enter:
netstat -an
The -an option displays all active connections, including listening ports. Look for the “Local Address” column, which shows the IP address and port number of each connection.
PowerShell
PowerShell is a powerful task automation and configuration management framework from Microsoft. To use PowerShell for port scanning, you need to open it as an administrator and then execute the below command:
Get-NetTCPConnection
This cmdlet displays all list open ports Windows, including listening ports. Look for the “LocalAddress” property, which shows the IP address and port number of each connection.
Third-party software for Port Scanning
While built-in tools can provide basic port scanning capabilities, third-party software offers more advanced features and flexibility.
Nmap
Nmap is a popular, open-source port scanner that provides detailed information about network hosts and services. To use Nmap:
Download and install Nmap from the official website.
After installing it you need to open the open Command Prompt as an administrator and execute the below command:
Type nmap -p 1-65535 <IP address>
Replace <IP address> with the IP address of your system or a specific host. Nmap will scan all 65,535 ports and display the results, including open ports and services:
nmap -p 1-65535 192.168.10.1
If you are unaware of your IP address then you can execute the ipconfig
command on the command prompt to find it.
Conclusion
Open ports play a vital role in facilitating online activities, but they can also pose significant security risks if not properly managed. Understanding how to check open ports in Windows is essential for both troubleshooting network problems and maintaining optimal system security. By identifying open ports, users can determine which services or applications are associated with them and address potential vulnerabilities that may need attention.
By utilizing built-in tools like Netstat and PowerShell, or third-party software like Nmap, users can effectively scan for open ports and take necessary steps to ensure system security. Regular port scanning can help prevent malware infections, unauthorized access, and resource utilization, ultimately protecting sensitive data and system integrity. By grasping the importance of open ports and how to manage them, users can take a proactive approach to maintaining a secure and efficient Windows system.
While enabling open ports on your Windows machine can be useful for specific applications but it also introduces security risks. For a more secure and controlled environment rent a VPS from Ultahost. These VPS plans grant you root access and complete control over your server’s firewall configuration. This allows you to open ports with specific control ensuring only necessary ports are exposed.
FAQ
What are open ports in Windows?
Open ports are communication endpoints that allow data to be transmitted between a device and a network. In Windows, these ports can be in a listening state, waiting for incoming connections, or actively transmitting data.
Why is it important to check open ports in Windows?
Checking open ports can help you identify any potential security vulnerabilities on your Windows system. Unnecessary open ports could be exploited by malicious actors to gain unauthorized access to your system or to launch attacks.
How can I check open ports in Windows?
You can check open ports in Windows using various methods, including using built-in command-line tools like Netstat or PowerShell, third-party software, or online port scanning tools.
How do I use the netstat command to check open ports?
To use the netstat command, open Command Prompt, and type netstat -an. This will display a list of all open ports and their respective states (listening, established, etc.).
Can PowerShell be used to check open ports in Windows?
Yes, PowerShell provides cmdlets such as Get-NetTCPConnection and Get-NetUDPEndpoint that allow you to check open TCP and UDP ports, respectively.
Как посмотреть список открытых портов в Windows
Статья обновлена: 10 сентября 2021
ID: 101
Чтобы посмотреть список открытых портов:
- Откройте командную строку. Инструкция в статье.
- Выполните команду:
netstat -a
- Нажмите Enter на клавиатуре.
Вы получите список открытых портов в Windows.
Спасибо за ваш отзыв, вы помогаете нам становиться лучше!
Спасибо за ваш отзыв, вы помогаете нам становиться лучше!
Quick Links
-
Use Built-In Tools to See What Is Listening on a Port
-
Use NirSoft CurrPorts to View What is Listening on a Port
Summary
- Run the command «netstat -ab» in an elevated Command Prompt, PowerShell, or Terminal window to see a list of applications and their associated ports. This works in Windows 11 too.
- Checking open ports can be done using built-in tools like Command Prompt or PowerShell, which list active ports and the associated process names or identifiers.
- The freeware application CurrPorts by NirSoft provides an easier way to view what is listening on a port, displaying detailed information about the process and allowing for better management of ports.
Whenever an application wants to make itself accessible over the network, it claims a TCP/IP port, which means that port can’t be used by anything else. So how do you check open ports to see what application is already using it?
We’ve tested this process and confirmed that all of the steps are up-to-date, and that they all work in Windows 11, too.
How Do Ports Work?
An IP address specifies a computer — or other network device — on a network. When one device sends traffic to another, the IP address is used to route that traffic to the appropriate place. Once the traffic reaches the right place, the device needs to know which app or service to send the traffic on to. That’s where ports come in.
If the IP address is akin to a street address on a piece of mail, the port is something like the name of the person at that residence who gets the mail. For the most part, you don’t need to worry about ports. But once in a while, you might encounter an app that’s set to listen for traffic on the same port that another app already has in use. In that case, you’ll need to identify the app that already has that port in use.
There are a number of ways to tell what application has a port locked, but we’re going to walk you through a couple of built-in ways that use the Command Prompt, PowerShell, or the Terminal, and then show you a great freeware application that makes it even easier. All these methods should work no matter which version of Windows you use.
We’ve got two commands to show you. The first lists active ports along with the name of the process that’s using them. Most of the time, that command will work fine. Sometimes, though, the process name won’t help you identify what app or service actually has a port tied up. For those times, you’ll need to list active ports along with their process identifier numbers and then look those processes up in Task Manager.
Option One: View Port Use Along with Process Names
First, you’ll need to open the Command Prompt in administrator mode. Hit Start, and then type «command» into the search box. When you see «Command Prompt» appear in the results, right-click it and choose «Run as administrator,» or click «Run as Administrator» on the right.
You can also use PowerShell or Terminal for this.
At the Command Prompt, type the following text and then hit Enter:
netstat -ab
After you hit Enter, the results may take a minute or two to fully display, so be patient. Scroll through the list to find the port (which is listed after the colon to the right of the local IP address), and you’ll see the process name listed under that line. If you’d like to make things a little easier, remember that you can also pipe the results of the command to a text file. You could then just search the text file for the port number you’re after.
Here, for example, you can see that port 49902 is tied up by a process named picpick.exe. PicPick is an image editor on our system, so we can assume the port is actually tied up by the process that regularly checks for updates to the app.
Option Two: View Port Use Along with Process Identifiers
If the name of the process for the port number you’re looking up makes it difficult to tell what the related app is, you can try a version of the command that shows process identifiers (PIDs) rather than names. Type the following text at the Command Prompt, and then hit Enter:
netstat -aon
The column at the far right lists PIDs, so just find the one that’s bound to the port that you’re trying to troubleshoot.
Next, open up Task Manager by right-clicking any open space on your taskbar and choosing «Task Manager.» You can also hit Ctrl+Shift+Esc.
If you’re using Windows 8, 10, or 11 switch to the «Details» tab in Task Manager.
In older versions of Windows, you’ll see this information on the «Processes» tab. Sort the list of process by the «PID» column and find the PID associated with the port you’re investigating. You might be able to tell more about what app or service has the port tied up by looking at the «Description» column.
If not, right-click the process and choose «Open file location.» The location of the file will likely give you clues as to what app is involved.
When Once you’re there, you can use the End Process, Open File Location, or Go to Service(s) options to control the process or stop it.
Use NirSoft CurrPorts to View What is Listening on a Port
If you aren’t really the Command Prompt type — or you’d rather just use a simple utility to do all this in one step — we recommend the excellent freeware CurrPorts utility by NirSoft. Go ahead and download the tool. Just make sure you get the right version (the regular version is for 32-bit Windows and the x64 version is for 64-bit Windows). It’s a portable app, so you won’t need to install it. Just unzip the download folder and run executable.
In the CurrPorts window, sort by the «Local Port» column, find the port you’re investigating, and you can see everything — the process name, PID, port, the full path to the process, and so on.
To make it even easier, double-click on any process to see every single detail in one window.
When you’ve determined what app or service has the port you’re investigating tied up, it’s up to you how to handle it. If it’s an app, you may have the option to specify a different port number. If it’s a service — or you don’t have the option to specify a different port number — you’ll likely have to stop the service or remove the app.
Maybe you’re troubleshooting a network connectivity issue for a specific program and need to check whether its port access is open. What if you need to confirm that your NAS device can communicate with your Windows 10 PC? Whatever reason you need to look for open ports, this article provides detailed steps to check them on Windows 10 using several available tools, either built-in or free to download and use.
There are a couple of handy tools in Windows to scan open ports. You’ll see how to do so on NetStat, PortQry.exe, and NirSoft CurrPorts.
Using NetStat to Check for Open Ports in Windows 10
One of the simplest ways to check for open ports is to use NetStat.exe. You can find this tool in the System32 folder on Windows 10. With NetStat, you can see open ports or ports that a specific host uses.
Netstat is short for network statistics. It shows protocol statistics and the current TCP and IP network connections. The two commands needed to identify open ports in netstat -ab and netstat -aon.
Here’s an explanation of what each letter from the commands means.
- “a” displays all connections and listening ports.
- “b” shows all executables involved in creating each listening port.
- “o” provides the owning process ID related to each connection.
- “n” shows the addresses and port numbers as numerals.
Two commands are helpful, depending on your needs. The second option (netstat -aon) additionally provides a process ID you can later search for in the Task Manager.
Using ‘netstat -ab’ to Identify Open Ports
The first option you’ll use (netstat -ab) lists all active ports and the process that uses them.
- In the Cortana Search Bar, type the following:
cmd
then select Run as administrator. - Now, type
netstat -ab
, then press Enter. - Wait for the results to load. Port names get listed next to each local IP address.
- Look for the port number you need; if it says LISTENING in the State column, it means your port is open.
Using ‘netstat -aon‘ to Identify Open Ports
The second option(netstat -aon) includes process IDs, which you’ll use to identify a task/application in the Task Manager. Some processes may be challenging to identify using netstat -ab, so netstat -aon gets used. As referenced above, “a” represents all connections and ports, “o” represents the owning process ID, and “n” represents the addresses and port numbers as numerals.
Using netstat -aon comes in handy when netstat -ab isn’t enough to identify what program has a specific port tied up. In that case, follow these steps:
- In the Cortana Search Bar, type “
cmd
“ and choose “Run as administrator.” - Once inside, type the following command without quotes:
netstat -aon
then press Enter. - You will now see five columns: Protocols, Local Address, Foreign Address, State, and PID (Process ID). In the Local Address, you have a port number. For example: 0.0.0.0:135. Here, 135 is the port number.
- In the “State” column, you will see whether a specific port appears opened. For opened ports, it will say LISTENING.
- To verify which app uses a particular port, find the PID (the number from the last column) for a specific port.
- Open the Task Manager by pressing Ctrl + Shift + Esc.
- Go to the Details or Services tab to see all processes on your Windows 10 system. Sort them by the PID column to find the PID for the port you’re trying to troubleshoot. You can see which app uses the port in the Description section.
Checking for Open Ports with NirSoft CurrPorts
If you find the Command Prompt solution too tricky, a simpler alternative is to use NirSoft CurrPorts. This tool displays your currently opened ports (TCP, IP, and UDP). You’ll also see information about a specific process, such as name, path, version info, etc.
This tool has been around for quite a while and is available for Windows 10. You can find the NirSoft Currports download link at the bottom of Nirsoft’s website.
Note: Ensure you download the correct version. They have 32-bit and 64-bit releases. The app is portable. Unzip the folder, then run the executable file.
Once you have CurrPorts running, perform the following steps:
- You’ll see a list of your computer processes. Sort them by Local Port to search through them more easily.
- Now, find and select the port you are troubleshooting.
- You can now see all the process details, such as Process Name, Process ID, State, etc.
Another way is to double-click on a process to see its details in a single window.
Checking for Open Ports Using PortQry.exe
PortQry.exe is another handy tool that lets you scan open ports. You download PortQry (scroll down to see the download) and extract it to run it through the Command Prompt. You can also download PortQryUI, a Graphical User Interface (GUI) for PortQry (more on that below), as an add-on if you don’t want to use the command line.
With portqry.exe, you insert specific parameters that can be found in the executable’s folder.
How to Run PortQry.exe Using the Command Prompt
- Download PortQry, then unzip the files to your chosen location. The default is “C:\” but can be changed if desired.
- If in the default directory, type
cd c:\PortQryV2\
in the Command Prompt to set the location of the executable file. - If in a custom directory, type
cd [drive letter]:\[folder1]\[folder2]\
but replace all content in the square brackets with actual names. Include all folders needed. - Type
portqry.exe -local
to launch it. This command displays the TCP and UDP ports the specified ‘localhost’ uses. - In addition to all the parameters NetStat displays, Portqry shows you several port mappings and the number of ports in each state.
- You can also check for open ports for a remote host. Run portqry.exe -n [hostname/IP] in the Command Prompt. Replace the hostname and IP sections with the remote host’s name and IP address. Add -e [port_number] to the command line to look for a specific port.
How to Run PortQry.exe using the UI Add-On
For those preferring to use a graphical interface instead of commands when using PortQry.exe, Microsoft offers an add-on named PortQryUI.
The PortQryUI add-on already includes the necessary version of PortQry, so you don’t need both downloads to use it.
- Download PortQryUI, then unzip the files to your chosen location. The default is “C:\” but can be changed if desired.
- Launch Windows Explorer, navigate to the PortQryUI.exe file location, then click it to launch the UI.
- To view TCP and UDP ports for the ‘localhost’ (your PC), leave the Destination IP as 127.0.0.1 so it passes through the network’s devices and configuration settings (network card, router’s config, etc.) and not just read from the local PC.
- To view all TCP and UDP ports, click on Manually input query ports, then type 1-65535 in the Ports to query section. Also, select TCP, UDP, or Both from the Protocol dropdown.
- To filter your TCP/UDP ports list, click Query predefined service, then choose which service to query. You can only select one at a time.
- You can also check a remote host by changing the FQDN or domain in the query box at the top.
- If you want to check a specific port, enter the number in Ports to query.
In closing, knowing how to check if a specific port is open is beneficial if you’re troubleshooting a program’s network connection or need a port for a particular game. Luckily, it’s not as challenging to do as it looks.
Out of all the options listed above, Netstat is recommended as it’s built into the OS and usually gives you all the details you need. There might be a few extra steps required compared to CurrPorts, but you don’t have to download anything, and there’s nothing to screw up.
How do I check if Port 3306 is open in Windows 10?
To verify if port 3306 is open, you can use NetStat, CurrPorts, or PortQry.
We recommend NetStat, as you won’t have to download new software. Run the Command Prompt as administrator. Type the following command: netstat -ab and hit Enter. Wait for the results to load. Port names will be listed next to the local IP address. Just look for port 3306. You can press Ctrl + F and type 3306 in the word box to search for it. If the port is open, it will show in the results as LISTENING.
To check if port 3306 is open via CurrPorts, just sort by Local Port, then find port 3306. If the port is available, it will show in the list.
To use PortQry.exe to find port 3306, use the Command Prompt. Type -e [3306], then press Enter.
What are Predefined Services in PortQueryUI?
Predefined Services offers details on a small handful of services such as Domains and Trusts, Networking, Exchange Servers, etc. The option queries all required ports for the specified services and displays them in the UI.
For those who don’t know where Predefined Services resides, it is directly under the Help tab and in the UI. Both serve different needs.
The Help tab option immediately displays all predefined services without testing any ports, providing a quick reference to each port name, value, and protocol used for each listed service.
The UI option lets you specify what service you want to view and see port statuses.