Check telnet port windows

Обмен данными по локальной сети или через интернет осуществляется путем подключения друг к другу двух компьютеров. Чтобы получить данные с удаленного сервера, требуется соблюсти несколько условий – наличие IP-адреса у источника и получателя, выбор конкретного протокола приема-передачи и открытые порты на обоих компьютерах.

Что такое порт компьютера

Порт – это виртуальное дополнение к сетевому адресу, которое позволяет разделить запросы разных приложений и обрабатывать их автономно. Часть постоянно занята системными службами Windows или другой операционки, остальные свободны для использования прикладными программами, в том числе запускаемыми на удаленных серверах.

Проверка порта на доступность

Особенности портов:

  1. Иногда порты путают с разъемами на материнской плате (формально они и являются ими, но там речь идет о подключении физических устройств).
  2. Общее количество портов составляет 65535. Они имеют определенное назначение, например, 20-21 «по умолчанию» используется для соединения по FTP, а 110 выделен под почтовый протокол POP3.
  3. Сочетание IP-адреса и порта принято называть сокетом или файловым дескриптором, при помощи которого программа передает данные.

Перед подключением к какому-либо порту рекомендуется проверить, свободен ли он. Если нет, то операционная система выдаст ошибку, и соединение прервется. Многие программы делают проверку в автоматическом режиме и сами пытаются менять номера в поиске незанятого подключения. Но в ряде случаев это требуется сделать вручную, например, при отладке собственного кода.

Комьюнити теперь в Телеграм

Подпишитесь и будьте в курсе последних IT-новостей

Подписаться


Как проверить, открыт ли порт для подключения

Порты присутствуют у всех сетевых устройств, включая маршрутизаторы и роутеры, поэтому при анализе среды важно понимать, какой именно узел проверяется. На этом отчасти основаны системы безопасности, когда ради блокировки вероятных хакерских атак закрываются все свободные сокеты и открываются только те, которые используются корпоративным софтом.

Открыт ли порт

Существует три основных способа проверки открытых портов:

  1. Специализированные онлайн-сервисы.
  2. Прикладные приложения, запускаемые на компьютере.
  3. Встроенные в операционную систему утилиты.

Выбор решения зависит от задач. Так, если требуется открыть доступ к своему компьютеру извне, можно воспользоваться сервисами 2ip.ru или portscan.ru. При локальных работах удобнее приложения типа Portforward Network Utilities или штатная утилита TELNET. Она поставляется в «стандартной» сборке Windows и доступна для запуска в консоли CMD.

Перечень открытых портов на локальном компьютере

Открытый порт на домашнем или рабочем компьютере – это фактически «дыра» в безопасности и риски утраты контроля над ситуацией. Именно через них проникают трояны и иные вирусы, которые имеют цель предоставить злоумышленнику возможность удаленного подключения к ПК без разрешения владельца. 

Командная строка

Проверить занятые порты легко:

  1. Нужно нажать комбинацию клавиш <Win+R>.
  2. Ввести команду CMD и нажать кнопку Enter.
  3. Ввести команду netstat –a и повторно нажать Enter.

В консоли отобразится перечень занятых портов с указанием, какое приложение или служба ими «распоряжается». Такой вариант проверки интересен тем, что он дает объективную картину. Если рассчитывать только на онлайн-сервисы, иногда создается впечатление, что открытых портов нет. Эффект создается из-за блокировки внешних запросов брандмауэром Windows или другим ПО.

Порт телнет

Если хочется изучить список на предмет «посторонних» программ, его лучше выгрузить в файл при помощи команды netstat –a >имя.txt. По умолчанию список сохраняется в каталоге пользователя, в аккаунте которого происходил запуск утилиты (типа C:\\Пользователи\User\). При желании перед запуском утилиты можно перейти в корень диска командой cd c:\.

VDS Timeweb арендовать

Просмотр открытых портов на удаленном компьютере

При взаимодействии с удаленным сервером используется другая утилита – TELNET. В Windows она по умолчанию отключена, потому что не относится к пользовательским приложениям. Перед первым запуском придется провести «активацию». Существует два способа включения – в консоли или через графический интерфейс.

Запуск утилиты telnet

Активация заключается во вводе специальной команды:

dism /online /Enable-Feature /FeatureName:TelnetClient

Она сработает только при запуске консоли с правами администратора. Схема открытия приложения несколько иная:

  1. Нажать комбинацию клавиш <Win+X>.
  2. Выбрать пункт «Командная строка (администратор)».
  3. В открывшемся окне ввести команду активации telnet.

Команда telnet

Если пользователь предпочитает управлять компьютером через графический интерфейс, нужно запустить панель управления, а в ней утилиту «Удаление программы». В открывшемся окне нужно перейти в раздел «Включение или отключение компонентов Windows», далее в общем списке найти строку «Telnet», поставить в ней галочку и нажать кнопку ОК. Все, служба активирована и готова к использованию (даже в консоли).

клиент Телнет

Синтаксис:

telnet опции хост порт

Хост – это домен или его IP-адрес, порт – виртуальное дополнение для образования сокета, опции же позволяют менять режим подключения. Их основные варианты:

  1. -4 – использовать адреса стандарта IPV4;
  2. -6 – использовать адреса стандарта IPV6;
  3. -8 – применять 8-битную кодировку типа Unicode;
  4. -E – отключение поддержки Escape-последовательностей;
  5. -a – вход с именем пользователя из переменного окружения User;
  6. -b – использовать локальный сокет;
  7. -d – включить режим отладки;
  8. -p – режим эмуляции rlogin;
  9. -e – задать символ начала Escape-последовательности;
  10. -l – пользователь для авторизации на удаленном сервере.

Простейший вариант проверки открытых портов – это ввод команды без опций:

telnet 10.0.119.127 80

Если на экран будет выведено сообщение «Сбой подключения», порт закрыт, нужно подбирать другой номер. Если порт открыт, пользователь увидит пустой экран или приглашение со стороны сервера ввести логин и пароль.

Как проверить, открыт ли порт

  • Что такое порт
  • Как проверить, открыт ли порт

В этой статье мы расскажем, что такое порт, какие они бывают и как проходит проверка порта на локальном и удаленном компьютере.

Вы можете узнать, открыт ли порт, с помощью нашего сервиса проверки доступности портов.

Что такое порт

Порт — это числовой идентификатор программы или процесса, который обслуживает сетевые соединения на заданном IP-адресе. Номера портов могут быть от 0 до 65 535.

Каждое устройство (компьютер, ноутбук, мобильный телефон и др.) имеет свой IP-адрес. Он дает возможность организовывать сетевые соединения между устройствами. Но на отдельном устройстве может быть запущено несколько сетевых приложений одновременно. Например, есть интернет-сервер с IP-адресом. На нем расположен: веб-сервер, почтовый сервер, FTP-сервер. Как сделать так, чтобы мы могли связаться именно с почтовым сервером? Для этого и нужен порт. Порты предоставляют возможность идентифицировать сетевые приложения на отдельно взятом компьютере.

Есть стандартные порты, такие как:

  • порт 80 — для  веб-сервера, который работает по протоколу HTTP,
  • порт 443 — для защищенного SSL-сертификатом веб-сервера, который работает по протоколу HTTPS,
  • порт 21 — для FTP-протокола (протокола передачи файлов).

Как проверить, открыт ли порт

Проверка порта на доступность возможна как для своего (локального) компьютера , так и для удаленного.

Как узнать, какие порты открыты на локальном компьютере в Windows

  1. Вызовите командную строку сочетанием клавиш Win+R

  2. Введите команду «cmd» и нажмите ОК:

  1. Пропишите команду netstat -a и кликните Enter:

Готово, перед вами список открытых портов на вашем компьютере.

Как узнать, какие порты открыты на удаленном компьютере

Провести проверку портов на открытость удаленного компьютера можно при помощи команды telnet.

Telnet — это утилита, с помощью которой можно соединиться с удаленным портом любого компьютера. Telnet позволяет установить связь, чтобы передавать команды и получать ответы (например, сделать проброс портов).

В Windows 7/8/10 и Vista утилита telnet отключена по умолчанию. Утилиту можно установить по инструкции.

Как проверить доступность порта с помощью команды telnet в Windows:

  1. Вызовите командную строку сочетанием клавиш Win+R.

  2. Введите команду «cmd» и нажмите ОК.

  3. В окне терминала введите команду:  telnet имя_сервера номер_порта (например, telnet mysite.ru 31). 

    Можно проверить порт на доступность по IP, если ввести команду telnet IP_сервера номер_порта (например, telnet 10.0.119.127 31).

  • Если на экране появится текст «“telnet” не является внутренней или внешней командой, исполняемой программой или пакетным файлом», то на вашем компьютере отключена утилита и ее надо установить по инструкции:

  • Если на экране командной строки появится ошибка, значит порт закрыт:

  • Если экран станет полностью пустым или появится приглашение сервера, значит порт открыт:

Checking open TCP/IP ports on your Windows computer is crucial for managing network security and ensuring smooth connectivity. Certain apps and processes in Windows may face issues due to closed or misconfigured ports, often caused by firewalls or private IP addresses. This guide will walk you through step-by-step methods to check whether a TCP port is open or closed using built-in tools and third-party utilities.

Why You Should Check TCP/IP Ports?

Here are some common scenarios where checking ports is necessary:

  • Troubleshooting connectivity issues for applications or services.
  • Configuring firewalls to ensure necessary connections are allowed.
  • Detecting suspicious activity that might indicate a security breach.

Methods to Check Open TCP/IP Ports

There are several ways to check open TCP/IP ports in Windows. Here are a few options:

Method 1. Using Telnet Client

Step 1: Check whether the telnet client feature is ON or not. In order to check, open the Turn Windows feature on or off settings from the search bar. OR press the ‘window’ key and type ‘windows’ features. Then press on “Turn Windows features on or off”.

Windows Features Option

A new prompt will be opened. Search for “Telnet Client” and check the box in front of ‘telnet Client’.

Windows Features

Step 2: Open the command prompt. Press the ‘windows’ key and type ‘cmd’. Press “Command Prompt”.

Command Prompt Option

Step 3: On the command prompt, type the command “telnet + IP address or hostname + port number” and check the status of the provided TCP port.

Telnet Command

Step 4: If only the blinking cursor is visible, then the port is open.

Port is Open

Step 5: If you get the message “connection failed” then the port is closed.

Port is close

Method 2: Using built-in netstat command-line utility:

Step 1: Open the command prompt. 

Step 2: Run the following command:

netstat -an

Method 3. Using TcpView

Another option is to use the TcpView utility from Microsoft’s Sysinternals suite of tools. This utility provides a more user-friendly interface for viewing active TCP/IP connections, along with additional information such as the process ID and process name for each connection. Steps to be followed:

Step 1: Download the TcpView utility from the Microsoft Sysinternals website. You can find the download link on the TcpView page of the Sysinternals website.

Download Page

Step 2: Extract the downloaded file and run the TcpView.exe file to launch the TcpView utility. This will open the TcpView window, which shows a list of all active TCP/IP connections on your machine.

Extracted FIles

Step 3: Open the tcpview.exe (application).

By default, TcpView will display the following columns in the list of connections:

Protocol: Shows the protocol being used for the connection (TCP or UDP)

Local Address: Shows the local address and port being used for the connection

Remote Address: Shows the remote address and port being connected to

State: Shows the current state of the connection (e.g. Established, Listen, etc.)

You can use the “Local Address” and “Remote Address” columns to see which ports are being used by which applications. For example, if you see a connection with a local address of “127.0.0.1:80”, this means that the local application is using port 80 for outgoing connections.

Method 4. Using Windows PowerShell

You can also use Windows PowerShell to check open TCP/IP ports. To do this, use the Get-NetTCPConnection cmdlet, which allows you to view a list of active TCP/IP connections and the local and remote addresses and ports being used. For example, you can run the following command to view a list of all active TCP/IP connections:

Get-NetTCPConnection | 
Select-Object LocalAddress,
LocalPort, RemoteAddress, RemotePort

Get-NetTCPConnection cmdlet

Method 5. Using Nmap

To install Nmap in the Windows command line, follow these steps:

Step 1: Download the latest version of Nmap from the Nmap website. You can find the download link on the Nmap download page: 

https://nmap.org/download.html

Step 2: Extract the downloaded file to a location on your computer. This will create a new folder containing the Nmap files.

Step 3: Open a command prompt and navigate to the directory where you extracted the Nmap files. For example, if you extracted the files to the C:\nmap directory, you would run the following command:

cd C:\nmap

Step 4: Once you are in the Nmap directory, you can install Nmap by running the nmap.exe file. To do this, run the following command:

nmap.exe -V

This will display the version number of Nmap, indicating that it has been installed successfully.

Step 5: To use nmap to scan for open TCP/IP ports, run the “nmap -sT” command, followed by the IP address or hostname of the machine you want to scan.

nmap -sT localhost

This will scan the specified host or IP address and display the results. You can also use the -h option to view a list of available options and arguments for the nmap command. Overall, installing Nmap in the Windows command line is a straightforward process. You can download the latest version of Nmap from the Nmap website, extract the files, and then run the nmap.exe file to install it. Once it is installed, you can use the nmap command to scan hosts and IP addresses and view the results.

Common Issues That Close Ports

  • Applications not functioning as expected.
  • Misconfigured firewall rules blocking connections.
  • IP addresses improperly set as private.

Troubleshooting Common Issues

Here are some common issues that may occur during opening TCP/IP Ports in Windows:

  • Telnet Not Listed in Features: Ensure your system version supports Telnet or enable it via PowerShell.
  • Firewall Blocking Ports: Temporarily disable the firewall to test port connectivity.
  • Command Not Recognized: Verify tool installation and environment variables.

Conclusion

Checking open TCP/IP ports on your Windows computer is an important step for maintaining your system’s security and efficiency. By regularly monitoring these ports, you can identify any unwanted or suspicious connections that might put your computer at risk. Windows provides several simple tools, like Command Prompt and PowerShell, which make it easy to see which ports are open and what applications are using them. Taking the time to check your open ports helps ensure that your computer runs smoothly and stays protected from potential threats. Staying proactive about monitoring your network connections is a key part of keeping your digital environment safe and reliable.

Pinging a port is a useful way to test connectivity and ensure that a specific service on a target machine is accessible. While the traditional ping command checks if a host is reachable, it doesn’t support ports directly. To check the status of a port, alternative methods like telnet, PowerShell, or third-party tools are required.

This guide explains how to “ping” a port on Windows using practical techniques.


Pinging a port can help:
1. Troubleshoot Network Issues: Ensure a specific service is running and reachable.
2. Test Firewalls: Verify that a firewall isn’t blocking a port.
3. Check Service Availability: Confirm that an application or server is accessible on a given port.


Method 1: Using Telnet

Step 1: Enable Telnet (If Not Already Installed)

  1. Press Win + S, type Turn Windows features on or off, and select it.
  2. Scroll down and check Telnet Client.
  3. Click OK and wait for the installation to complete.

Step 2: Use Telnet to Ping a Port

  1. Open Command Prompt:
    – Press Win + S, type cmd, and hit Enter.
  2. Type the following command:
    bash
    telnet <hostname> <port>
  3. Replace <hostname> with the target IP address or domain and <port> with the desired port number.

Example:
bash
telnet 192.168.1.1 80

  1. If the connection is successful, the screen will go blank. If not, you’ll see an error message indicating the port is closed or unreachable.

Method 2: Using PowerShell

Step 1: Test the Port with PowerShell

  1. Open PowerShell:
    – Press Win + X and select Windows PowerShell or Terminal.
  2. Run the following command:
    powershell
    Test-NetConnection -ComputerName <hostname> -Port <port>
  3. Replace <hostname> with the target IP or domain and <port> with the desired port number.

Example:
powershell
Test-NetConnection -ComputerName google.com -Port 443

  1. PowerShell will display the connectivity results, including whether the port is open or closed.

If you prefer a graphical interface or need additional features, third-party tools can help.

Recommended Tools:

  1. Netcat (nc):
    – Download and install Netcat on Windows.
    – Use the following command in Command Prompt:
    bash
    nc -zv <hostname> <port>
  2. Nmap:
    – Install Nmap from Nmap.org.
    – Run the following command to scan the port:
    bash
    nmap -p <port> <hostname>
  3. Angry IP Scanner:
    – A user-friendly tool for scanning IP addresses and ports.
    – Download from Angry IP Scanner and follow the GUI instructions.

Comparison of Methods

Method Ease of Use Best For
Telnet Moderate Simple port checks on TCP
PowerShell Easy Quick and detailed connectivity results
Third-Party Tools Easy Advanced scanning and testing

FAQs About Pinging Ports

Can I Ping a Port Directly with the Ping Command?

No, the ping command in Windows does not support ports. It checks host reachability but not specific services or ports.

What Happens If a Port Is Closed?

If a port is closed, you won’t be able to establish a connection, and the tool will return an error or failure message.

How Do I Check UDP Ports?

Use tools like Nmap or specialized network scanners, as most methods above focus on TCP ports.


Pro Tips for Pinging Ports

  1. Check Firewalls: Ensure no firewalls are blocking the port on the target machine.
  2. Verify Service Status: Make sure the service associated with the port is running on the target host.
  3. Use Tools Wisely: PowerShell and Telnet are ideal for simple checks, while tools like Nmap provide more comprehensive scans.

Conclusion

Pinging a port on Windows is an essential skill for network troubleshooting and service testing. While the traditional ping command doesn’t support ports, tools like Telnet, PowerShell, and third-party applications make it easy to check port availability.

Choose the method that best fits your needs, and ensure your network remains secure and functional. Happy troubleshooting!

Download Article

Test the status of a specific local or remote port

Download Article

Are you looking for a quick way to check if a port on your router or firewall is open? It’s actually pretty simple. The right way to do it just depends on whether you’re using a Mac or PC and what kind of port you’re checking. We’ll walk you through how to do it step-by-step on Windows and macOS.

Easy Ways to Identify Open Ports

  • On Windows devices, enable Telnet. Open a command prompt and type “ipconfig.” Use the IP address and port number to locate an open port.
  • For Mac devices, open a Terminal window. Type “netsat -nr | grep default” into the program. Then, type “nc -vs” + your IP + port number to locate.
  • Check an External port by visiting https://canyouseeme.org/ and enter the port you want to check. Click “check port” to see if it’s open and available.
  1. Step 1 Enable Telnet for Windows.

    You can use Telnet to check if a certain port is open on your local router or access point. Here’s how to enable it:[1]

    • Type windows features in to the search bar. If you don’t see the search bar, click the circle or magnifying glass to the right of the Start menu.
    • Click Turn Windows features on or off.
    • Check the box next to Telnet Client and click OK.
    • Click Close when the app is finished installing.
  2. Watermark wikiHow to Check if a Port Is Opened

    Here’s how to open the command prompt:

    • Type cmd into the Windows search bar.
    • Click Command prompt in the search results.

    Advertisement

  3. Step 3 Type ipconfig at the prompt and press ↵ Enter.

    This displays a bunch of network information.

  4. Step 4 Write down the router's IP address.

    The address that appears next to «Default Gateway» in the ipconfig results is the local address of your router.

  5. Step 5 Type telnet at the prompt and press ↵ Enter.

    This opens the Microsoft Telnet prompt.

  6. Step 6 Type open (router's IP address) (port number).

    For example, if you wanted to see if port 25 is open on your router, and your router’s IP address is 10.0.0.1, you would type open 10.0.0.1 25.

  7. Watermark wikiHow to Check if a Port Is Opened

    Telnet will try to connect to the port.

    • If you see a message that says «Please press Enter» or «Press any key to continue,» the port is open.
    • If you see a message that says «Could not open connection,» the port is not open.
  8. Advertisement

  1. Watermark wikiHow to Check if a Port Is Opened

    To open a Terminal window, open Spotlight by clicking the magnifying glass at the top-right corner of the screen, type terminal, and then click Terminal in the search results.

    • Use this method to see if a port is open on your local router or access point.
  2. Step 2 Type netstat -nr | grep default at the prompt and press ⏎ Return.

    The router’s IP address appears next to «default» at the top of the results.

  3. Step 3 Type nc -vz (your router's IP address) (port).

    For example, if you wanted to see if port 25 is open on your router, and your router’s IP address is 10.0.0.1, you would type nc -vz 10.0.0.1 25.

  4. Step 4 Press ⏎ Return.

    Here’s how to interpret the results:

    • If the port is open, you’ll see a message that says the connection succeeded.
    • If the port is closed, you’ll see a message that says the connection was refused or timed out.
  5. Advertisement

  1. Watermark wikiHow to Check if a Port Is Opened

    If the search bar is not already open, click the circle or magnifying glass to the right of the Start menu to open it.[2]

    • Use this method if you want to see if Windows is set up to allow an app you’ve installed to communicate through your firewall.
    • The Windows firewall is enabled by default. If you’ve installed your own firewall software, use that software to check if an app is allowed through.
  2. Step 2 Click Windows Defender Firewall.

    This opens your Firewall and Network Protection settings.

  3. Step 3 Click Allow an app through firewall.

    It’s one of the text links near the bottom of the window. A list of apps allowed through the firewall will appear.

    • If the app is allowed through the firewall only when you’re connected to a network you’ve marked as «private» (such as when you’re on your home network), a check will appear in the «Private» column next to the app.
    • If the app is allowed through the firewall when you’re connected to a public network, a check will appear in the «Public» column.
  4. Watermark wikiHow to Check if a Port Is Opened

    If you don’t see the app on the «Allowed apps and features» list, click the Change Settings button at the top-right corner, and then follow these steps:[3]

    • Click Allow another app near the bottom.
    • Click Browse, select the app, and then click Open.
    • Click Network Types near the bottom-left corner, select a privacy preference, and then click OK.
    • Click Add to add the app, and then click OK.
  5. Advertisement

  1. Step 1 Go to https://www.canyouseeme.org...

    Go to https://www.canyouseeme.org in a web browser. You can use it to see if a port on your computer or network is accessible on the internet. The website will automatically detect your IP address and display it in the «Your IP» box.[4]

    • There are many different sites you can use to check for an open port. Search for «open port check tool» in your favorite search engine to find an alternative, if desired.[5]
  2. Watermark wikiHow to Check if a Port Is Opened

    Type the port you want to check (e.g., 22 for SSH) into the «Port to Check» box.[6]

  3. Watermark wikiHow to Check if a Port Is Opened

    If the port is open and available, you’ll see a confirmation message. If not, you’ll see a message that says «Error: I could not see your service on (your IP address) on port (the port number).»[7]

  4. Advertisement

  1. Step 1 Click the icon menu and select System Preferences.

    The Mac firewall is not enabled by default.[8]

  2. Step 2 Click Security & Privacy.

    It’s the house icon on the top row.

  3. Watermark wikiHow to Check if a Port Is Opened

    It’s near the top-center part of the window.

    • If you see the message «Firewall:On» near the top of the tab, this means your firewall is active.
    • If the firewall is not active but you want it to be, click the padlock icon at the bottom-left part of the window, enter your administrator password, and then click Turn On Firewall.
  4. Watermark wikiHow to Check if a Port Is Opened

    This opens your settings, including a list of apps and services set to either allow or disallow incoming connections.[9]

    • If an app or service has a green dot and the text «Allow incoming connections,» that means its port is open.
    • If you see a red dot that says «Block incoming connections,» the port is closed.
    • You can toggle whether a port is allowed or not allowed by clicking the double-arrow icon next to the app’s current status, and choosing an option.
  5. Advertisement

Add New Question

  • Question

    How do I check if a port is open Windows 10?

    Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over two years.

    Computer & Tech Specialist

    Expert Answer

    An easy way to do this is to go to canyouseeme.org and type in the port number into the webpage. It’ll be able to tell you whether or not the port is open.

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

Video

Thanks for submitting a tip for review!

About This Article

Thanks to all authors for creating a page that has been read 845,515 times.

Is this article up to date?

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Как настроить языковую панель на компьютере windows 10
  • Как снять галочку только для чтения windows 10 с папки
  • Как сбросить пароль администратора windows 7 через загрузочную флешку
  • Как создать iso образ windows 10 со своего компьютера windows
  • Canon lbp6000 drivers windows 10