33
33 people found this article helpful
You can use a Windows command or third-party utilities
What to Know
- Easiest: Open the Start menu > type command > right-click the Command Prompt app > Run as administrator.
- Type netstat -ab > press Enter > look for items in the «LISTENING» state.
- The alternative is to use a third-party app: We like TCPView, Nirsoft CurrPorts, and PortQry Command Line Port Scanner.
This article outlines how to check for open ports in Windows 10, which is necessary if an application cannot access the internet or you want to block an application.
How to Check If a Port Is Open With Netstat
The easiest way to check if a port is open on Windows 10 is by using the Netstat command. ‘Netstat’ is short for network statistics. It will show you what ports each internet protocol (like TCP, FTP, etc.) is currently using.
The command has many parameters, but the ones you’ll need to use to check if a port is open are (a), which provides the active ports, and (b), which will tell you the name of the processes using those ports.
-
Select the Start menu and type «command.» Right-click on the Command Prompt app and select Run as administrator.
-
Type netstat -ab and press Enter. You’ll see a long list of results, depending on what’s currently connecting to the network. You’ll see a list of running processes. The open port numbers will be after the last colon on the local IP address (the one on the left).
-
Look for the items on the list with a state of «LISTENING.» These are the processes that are communicating via one of the currently opened ports.
-
If you want to know the program’s name that has a specific port open, then type netstat -aon and press Enter. This command will show the protocol the app is using, the local and remote IP addresses, and most importantly, the PID of the application using that port (the number on the far right). Remember to look for the LISTENING status.
-
To find the application related to that PID, right-click the task manager and select Task Manager. Select the Details tab. Look in the PID field for the PID you noted from the command prompt screen.
How to Check If a Port Is Working Using Third-Party Apps
If you don’t want to use the command prompt to check for open ports, there are very easy-to-use third-party apps that can help.
TCPView
TCPView is a utility included in Microsoft Sysinternals that shows you a list of all running processes and their associated open ports. This app displays ports opening and closing and packet transfers, all in real-time.
Nirsoft CurrPorts
Nirsoft CurrPorts is another utility to see all ports currently being used by applications and services on your system. Just look for the local ports column to see which of your computer’s ports are active.
The list also includes ports that are being connected to on the remote end (the server out on the internet).
PortQry Command Line Port Scanner
Install PortQry Command Line Port Scanner for another command-line utility dedicated to scanning your computer for open ports. Once you install it, open Command Prompt in administrator mode. PortQry automatically installs in the C:\PortQryV2 directory, so change the directory of your command prompt to that directory.
Type the command portqry.exe -local to see all open TCP and UDP ports for your machine. It’ll show you everything you can see with the NetStat command, plus port mappings and how many ports are in each state.
What Is a Port?
Applications running on your computer reach out and get information and data from servers elsewhere on the internet. These applications and the server know how to communicate based on their IP address and the port number.
Think of the IP address as a street address and the port number as the apartment number. If either the server or application attempts to communicate using any other port number, it won’t work. Every other door will be «locked» because other ports are closed.
Thanks for letting us know!
Get the Latest Tech News Delivered Every Day
Subscribe
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
Как посмотреть список открытых портов в Windows
Статья обновлена: 10 сентября 2021
ID: 101
Чтобы посмотреть список открытых портов:
- Откройте командную строку. Инструкция в статье.
- Выполните команду:
netstat -a
- Нажмите Enter на клавиатуре.
Вы получите список открытых портов в Windows.
Спасибо за ваш отзыв, вы помогаете нам становиться лучше!
Спасибо за ваш отзыв, вы помогаете нам становиться лучше!
Обмен данными по локальной сети или через интернет осуществляется путем подключения друг к другу двух компьютеров. Чтобы получить данные с удаленного сервера, требуется соблюсти несколько условий – наличие IP-адреса у источника и получателя, выбор конкретного протокола приема-передачи и открытые порты на обоих компьютерах.
Что такое порт компьютера
Порт – это виртуальное дополнение к сетевому адресу, которое позволяет разделить запросы разных приложений и обрабатывать их автономно. Часть постоянно занята системными службами Windows или другой операционки, остальные свободны для использования прикладными программами, в том числе запускаемыми на удаленных серверах.
Особенности портов:
- Иногда порты путают с разъемами на материнской плате (формально они и являются ими, но там речь идет о подключении физических устройств).
- Общее количество портов составляет 65535. Они имеют определенное назначение, например, 20-21 «по умолчанию» используется для соединения по FTP, а 110 выделен под почтовый протокол POP3.
- Сочетание IP-адреса и порта принято называть сокетом или файловым дескриптором, при помощи которого программа передает данные.
Перед подключением к какому-либо порту рекомендуется проверить, свободен ли он. Если нет, то операционная система выдаст ошибку, и соединение прервется. Многие программы делают проверку в автоматическом режиме и сами пытаются менять номера в поиске незанятого подключения. Но в ряде случаев это требуется сделать вручную, например, при отладке собственного кода.
Комьюнити теперь в Телеграм
Подпишитесь и будьте в курсе последних IT-новостей
Подписаться
Как проверить, открыт ли порт для подключения
Порты присутствуют у всех сетевых устройств, включая маршрутизаторы и роутеры, поэтому при анализе среды важно понимать, какой именно узел проверяется. На этом отчасти основаны системы безопасности, когда ради блокировки вероятных хакерских атак закрываются все свободные сокеты и открываются только те, которые используются корпоративным софтом.
Существует три основных способа проверки открытых портов:
- Специализированные онлайн-сервисы.
- Прикладные приложения, запускаемые на компьютере.
- Встроенные в операционную систему утилиты.
Выбор решения зависит от задач. Так, если требуется открыть доступ к своему компьютеру извне, можно воспользоваться сервисами 2ip.ru или portscan.ru. При локальных работах удобнее приложения типа Portforward Network Utilities или штатная утилита TELNET. Она поставляется в «стандартной» сборке Windows и доступна для запуска в консоли CMD.
Перечень открытых портов на локальном компьютере
Открытый порт на домашнем или рабочем компьютере – это фактически «дыра» в безопасности и риски утраты контроля над ситуацией. Именно через них проникают трояны и иные вирусы, которые имеют цель предоставить злоумышленнику возможность удаленного подключения к ПК без разрешения владельца.
Проверить занятые порты легко:
- Нужно нажать комбинацию клавиш <Win+R>.
- Ввести команду CMD и нажать кнопку Enter.
- Ввести команду netstat –a и повторно нажать Enter.
В консоли отобразится перечень занятых портов с указанием, какое приложение или служба ими «распоряжается». Такой вариант проверки интересен тем, что он дает объективную картину. Если рассчитывать только на онлайн-сервисы, иногда создается впечатление, что открытых портов нет. Эффект создается из-за блокировки внешних запросов брандмауэром Windows или другим ПО.
Если хочется изучить список на предмет «посторонних» программ, его лучше выгрузить в файл при помощи команды netstat –a >имя.txt. По умолчанию список сохраняется в каталоге пользователя, в аккаунте которого происходил запуск утилиты (типа C:\\Пользователи\User\). При желании перед запуском утилиты можно перейти в корень диска командой cd c:\.
Просмотр открытых портов на удаленном компьютере
При взаимодействии с удаленным сервером используется другая утилита – TELNET. В Windows она по умолчанию отключена, потому что не относится к пользовательским приложениям. Перед первым запуском придется провести «активацию». Существует два способа включения – в консоли или через графический интерфейс.
Активация заключается во вводе специальной команды:
dism /online /Enable-Feature /FeatureName:TelnetClient
Она сработает только при запуске консоли с правами администратора. Схема открытия приложения несколько иная:
- Нажать комбинацию клавиш <Win+X>.
- Выбрать пункт «Командная строка (администратор)».
- В открывшемся окне ввести команду активации telnet.
Если пользователь предпочитает управлять компьютером через графический интерфейс, нужно запустить панель управления, а в ней утилиту «Удаление программы». В открывшемся окне нужно перейти в раздел «Включение или отключение компонентов Windows», далее в общем списке найти строку «Telnet», поставить в ней галочку и нажать кнопку ОК. Все, служба активирована и готова к использованию (даже в консоли).
Синтаксис:
telnet опции хост порт
Хост – это домен или его IP-адрес, порт – виртуальное дополнение для образования сокета, опции же позволяют менять режим подключения. Их основные варианты:
- -4 – использовать адреса стандарта IPV4;
- -6 – использовать адреса стандарта IPV6;
- -8 – применять 8-битную кодировку типа Unicode;
- -E – отключение поддержки Escape-последовательностей;
- -a – вход с именем пользователя из переменного окружения User;
- -b – использовать локальный сокет;
- -d – включить режим отладки;
- -p – режим эмуляции rlogin;
- -e – задать символ начала Escape-последовательности;
- -l – пользователь для авторизации на удаленном сервере.
Простейший вариант проверки открытых портов – это ввод команды без опций:
telnet 10.0.119.127 80
Если на экран будет выведено сообщение «Сбой подключения», порт закрыт, нужно подбирать другой номер. Если порт открыт, пользователь увидит пустой экран или приглашение со стороны сервера ввести логин и пароль.
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.