Если для какой-то программы или игры требуется подключение через определенный порт, может оказаться что по умолчанию в системе этот порт закрыт и соединение не выполняется. При необходимости порты в Windows 11, Windows 10 и предыдущих версиях системы сравнительно легко открыть.
В этой инструкции подробно о том, как открыть порты в Windows 11 или Windows 10, посмотреть список открытых портов и дополнительная информация, которая может пригодиться, если при подключении всё равно возникают проблемы.
Открытие портов в брандмауэре Windows
Основной способ открытия портов в Windows 11 и 10 — настройка соответствующих правил в брандмауэре.
Прежде всего, откройте настройки Windows в режиме повышенной безопасности. Для этого можно использовать следующие способы:
Следующий шаг — настроить правила для нужных портов:
- Нажмите правой кнопкой мыши по «Правила для входящих подключений» и выберите пункт «Создать правило» в контекстном меню.
- В мастере создания правил выберите пункт «Для порта» и нажмите «Далее».
- Выберите тип протокола — TCP или UDP (если вам не известен нужный тип, уточните в справке по конкретной программе).
- Укажите порты: конкретный порт или их диапазон, можно использовать запятые для перечисления нескольких портов, или знак дефиса для указания их диапазона. Нажмите «Далее».
- Выберите пункт «Разрешить подключение».
- Укажите, для каких типов сетей (сетевых профилей) следует открыть порты.
- Укажите имя правила и, при желании, его описание. Затем нажмите кнопку «Готово».
- Выполните действия 1-7, но уже для исходящего подключения.
Готово, порт открыт и, если что-то ещё не мешает его работе, соединения должны будут устанавливаться.
Возможные проблемы и дополнительные необходимые действия
Если вы открыли требуемые порты в Windows, но несмотря на это соединение не устанавливается, следует учитывать, проверить или выполнить следующие действия:
- VPN может влиять не возможность обмена данными по определенным портам. Решение: отключить VPN, либо посмотреть, есть ли возможность открыть порты в ПО для VPN.
- Роутеры имеют собственные функции файрволла/брандмауэра и порты может потребоваться открыть (пробросить) и в настройках роутера. В зависимости от марки и модели Wi-Fi роутера, это выполняется в разных разделах: перенаправление портов (port forwarding), брандмауэр (firewall), межсетевой экран, виртуальные серверы. Логика настройки везде одна и та же: добавляются обычно совпадающие внешний порт и внутренний порт (нужный вам порт), указывается внутренний IP (локальный IP компьютера, к которому нужно пробросить порт), тип протокола — TCP или UDP, иногда требуется указать интерфейс, для соединений из «внешней сети» — WAN.
- Если само приложение заблокировано в брандмауэре, оно не сможет устанавливать соединения: можно добавить правила, разрешающие подключения для программы тем же способом, которым это выполнялось выше для портов.
- Наличие сторонних файрволлов и антивирусов с функциями защиты сети также может влиять на возможность установки соединений по определенным портам: следует проверить их настройки, при наличии такого ПО, чтобы открыть соответствующие порты или отключить защиту для них.
Как посмотреть открытые порты в Windows и какие программы их используют
В Windows постоянно открыты многие порты, требующиеся как для работы системных служб, программ (в том числе сторонних), браузеров. Вы можете посмотреть список открытых портов одним из следующих способов:
- Запустить командную строку и ввести команду (порты указаны после двоеточия в IP-адресе)
netstat -a
- Если требуется посмотреть, какие процессы используют определенные порты, используйте команду (требует запуска от имени администратора)
netstat -ab
- Для просмотра открытых портов с ИД (PID) процесса (по которому в диспетчере задач можно увидеть конкретный процесс):
netstat -aon
- Есть сторонние программы, позволяющие получить сведения об открытых портах и использующих их процессах, например, бесплатная NirSoft CurrPorts.
Список «стандартных» и наиболее часто используемых портов доступен в Википедии, но многие игры и программы могут использовать свои собственные, не указанные в списке порты для работы.
Ports are the way that your computer communicates with the internet. All applications have their own ports, and the user can either manually open them or let them automatically open when installing them. Luckily, most Windows 10 applications open ports automatically, but you should still check them before installing any new applications. If you’re unsure how to do this, consult this article. Alternatively, you can use third-party software to see which ports are currently open on your system.
The Windows Firewall analyzes all incoming and outgoing connections and can block useful ones. In order to open these ports, you must first add them to the Windows Firewall as an exception or rule. Alternatively, you can download the dedicated Firewall app for Windows 10.
How Do I Open My Ports?
If you want to find out which ports are open on your computer, you can use the command prompt or third party software to perform the necessary steps. The process isn’t that hard, but you need to know what keys to push to get the desired results. You can see which ports are active on your computer with the help of the task manager. Alternatively, you can check the open ports of your computer using the CurrPorts software.
The best way to open ports is to enable port forwarding. It allows you to redirect the traffic that is bound for certain ports. Mostly, this technique is safe because it forwards traffic to a specific destination. But if you’re worried that you might encounter any malware, you can block certain programs by using the same process. However, it’s important to remember that port forwarding isn’t the only way to open ports on Windows 10.
How Do I Open a Port in Windows 10 Cmd?
The latest version of the Microsoft operating system is Windows 10, which is constantly getting updated with new features and bug fixes. Every application on your PC uses ports to communicate with the Internet. These ports may be automatically opened by an application when you install it, or they can be manually opened by you. You may not realize that you’ve opened a port until you see a warning message on your computer. If this happens to you, there are a few steps you can take to fix this.
To find the list of open ports, open Task Manager. Open the “Details” tab. You’ll see a list of all the processes running on your system. The PID number in the last column will be the name of the process using the port. To find out which app is using the port, right-click on the process. You’ll see the location of its listening port. This will allow you to change its status.
How Do I Manually Open a Port in Windows?
There are a few different ways to manually open a port in Windows 10. First, you can open it in the advanced settings of the Windows Firewall. Go to the Firewall and Network Protection section of Control Panel. Click the Advanced settings tab. Click on Inbound Rules. In this window, select a protocol and enter the port number. Choose Allow the connection or a range of ports. Once you’ve completed the steps, click Finish to apply the changes.
Next, you must specify the name and description of the profile that you wish to open. This way, you will be able to specify the conditions for the port to remain open. Lastly, you must confirm the entire operation. You can write down the name and description of the profile in a note. Once you’ve verified the information, click OK to close the dialog box and continue with your work. You may need to restart the computer to apply the changes.
How Do I Open Port 8080 on My PC?
There are some things that you have to do to enable port 8080 on your Windows computer. You must be using a firewall on your PC and must have an admin account. To do this, you should open the Windows Firewall and go to the Advanced settings. Next, click on the Protocols and Ports tab. You can also use the netstat command to view network status and protocol statistics. You can view interface and routing table information by selecting the appropriate option. The most common choices are s, r, and i. You can also open the Resource Monitor to view open ports on your computer.
Once you’ve opened the Control Panel, go to the Ports tab. Then, expand the Ports tab and click on the “Process ID” field. Then, search for the Port PID, if applicable. Once you’ve located the Port PID, you can select it and choose how it should be used. You can also block or allow a certain port. After this, you’ll have to confirm the operation.
How Do I Unblock Ports?
It is common for PC users to have to unblock ports in Windows for various reasons. It can be done to allow communication between different programs. Typically, users do this to interact with other players in an online multiplayer game. However, this is also necessary to enable popular social networking sites like Skype, Viber, and mTorren. It is possible to unblock ports in Windows 10 using the proxy server option.
Alternatively, if the firewall is preventing you from connecting to the internet, you can use netsh to open specific ports on your computer. Depending on what type of port you’re trying to open, you can modify the value of the port or rule name to match the application. For example, if you want to open port 8080 for Minecraft, you’ll want to change the port number to match the port number. Once you’ve done this, you’re ready to open the port to use it to connect to the internet.
To find which ports are blocked or open, you can type the netsh command. It will show you a list of open and closed ports on your computer. Next, you can click the “State” column to view the status of specific ports. The port will say “LISTENING” if it is currently open. Likewise, the “Processes” and “Services” tabs will display all the running processes on your Windows 10 system.
How Can I Tell If a Port is Open?
There are many ways to find out if a port is open in Windows 10, but a few of them are easier than others. The easiest way is to use a command that shows the status of all your system ports. This command is included in the Microsoft Sysinternals. It displays the open ports on your system in real time. You can also view the ports on remote servers by looking at the “remote ports” column.
To check if a port is open in Windows 10, you can use the “netstat” command. This command is a built-in Windows feature, and is a very useful tool. Type “netstat -ab” and it will show you a list of all open ports on your PC, as well as the Windows processes that are using them. To copy this information, right-click on the line and select “copy”.
How Can I Tell If Port 8080 is Open?
If you’re trying to figure out if port 8080 is open on your computer, you can use the command line to look up the status of the port. Type netstat -ab into a command prompt to view the open ports. If the port isn’t listed, it isn’t open, but you can manually open it if you’re unsure how to do it.
In order to open the Command Prompt, hold down the Windows key and type cmd. Type in “netstat -aon” and type in the port number to see whether the port is open. Be sure to use quotes around the port numbers to ensure that it’s correctly identified. This will ensure that you’re not sending out or receiving a non-secure message. You can also use telnet serverName 80 to check whether the port is open.
Another way to check the port status on Windows 10 is by using a third-party program to do a netstat -ab. The netstat command will display the list of open ports on your computer. The PID number appears after the last colon of the local IP address. Clicking on “State of Listening” will list any processes that are in contact with open ports.
Learn More Here:
1.) Windows Help Center
2.) Windows – Wikipedia
3.) Windows Blog
4.) Windows Central
Windows – Open a port on the Firewall using the command-line
Windows – Open a port on the Firewall using the command-line
Would you like to learn how to open a TCP port on the Windows Firewall using the command-line? In this tutorial, we are going to show you how to use the command-line to create a firewall rule to open a port on Windows.
• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
• Windows 7
Equipment list
The following section presents the list of equipment used to create this tutorial.
As an Amazon Associate, I earn from qualifying purchases.
Windows Related Tutorial:
On this page, we offer quick access to a list of tutorials related to Windows.
Tutorial Firewall – Open a TCP port using the command-line
As an Administrator, start an elevated command-line.
Create a firewall rule to open a TCP port.
Verify the created firewall rule.
Here is the command output:
In our example, we created a firewall rule to allow the input on the TCP port 80 using the command-line.
Create a firewall rule to allow the input to multiple TCP ports.
Verify the created firewall rule.
Here is the command output:
In our example, we created a firewall rule to open multiple TCP ports using the command-line.
Congratulations! You are able to create a firewall rule to open a TCP port using the command-line on Windows.
VirtualCoin CISSP, PMP, CCNP, MCSE, LPIC22021-05-26T13:01:07-03:00
Related Posts
Page load link
Ok
- Что такое программный порт
- Применение и назначение портов
- Список основных портов и их функциональность
- Просмотр активных соединений
- Открытие порта посредством брандмауэра
- Правила для входящих и исходящих подключений
- Открытие порта при помощи антивируса
- Проброс портов через роутер
- Проверка доступности порта
Понятие программного порта
Программный порт – некое логическое значение, представляющее из себя число, которое идентифицирует приложение на существующем хосте. Данные порты в существенном плане служат для безопасности соединений путем транспортного уровня и последующей передаче данных во избежание несанкционированного доступа со стороны нежелательных клиентов. Помимо прочего, программные порты существуют для того, чтобы предоставлялась возможность взаимодействовать с нужной программой, приложением или сервером, а также совершать с ними обмен пакетными данными.
Применение и назначение портов
Для синхронизации и взаимодействия хостов (клиент-сервер) при использовании какого-либо программного обеспечения, а также для получения и передачи данных используются программные порты, которые выступают в роли туннелирования. Туннелирование – это процесс, в ходе которого создается защищенное соединение между взаимодействующими хостами. Для непосредственного процесса взаимосвязанности хостов клиент, содержащий актуальные данные о себе (как отправитель), направляет запрос на удаленное назначенное устройство (получатель).
Принцип действия заключен в том, что все данные в сегментированном виде посредством транспортных протоколов tcp или udp отправляются на назначенный сетевой интерфейс, а впоследствии и на порт. Транспортный протокол tcp включает в себя гарантированную доставку целостности данных на основе контрольной суммы. Если какие-то данные при передаче будут утеряны, процесс передачи повторится вновь. Протокол udp обычно используется в видеотрансляциях, где потеря данных несущественна и в целом незаметна.
Если назначенный порт программы, приложения или какого-либо сервера по каким-либо причинам недоступен, его необходимо открыть. Формально открытие порта производится для защищенного доверенного соединения, что предоставляет доступ для передачи данных. В противном случае взаимодействия попросту не произойдет.
Читайте также: Смотрим открытые порты в Linux.
Список основных портов и их функциональность
По умолчанию операционная система посредством брандмауэра и встроенной антивирусной службы предотвращает доступ к всевозможным действующим портам в целях безопасности. В случае если пользователю нужно обратиться к какому-то конкретному серверу или программному обеспечению, для успешного активного соединения ему придется открыть для него порт. Ниже приведен перечень основных портов, с которыми на постоянной основе производится соединение и взаимодействие.
- 20 – FTP – передача данных;
- 21 – FTP – передача команд;
- 22 – SSH – криптографический сетевой протокол для безопасной передачи данных;
- 23 – TELNET – применяется для передачи текстовых сообщений;
- 25 – SMTP – сервер исходящей почты, применяется для пересылки почтовых сообщений;
- 53 – DNS – распределенная система для получения информации о доменах;
- 80, 8080 – HTTP – сетевой протокол, ориентированный на взаимодействие клиент-серверного соединения и передачу данных;
- 110 – POP3 – сервер входящей почты, применяется для приема почтовых сообщений;
- 123 – NTP – протокол, используемый для синхронизации времени;
- 143 – IMAP – альтернативный протокол POP3;
- 179 – BGP – динамический протокол маршрутизации;
- 443 – HTTPS – сетевой протокол HTTP с шифрованием по SSL или TLS;
- 520 – RIP – локальный процесс маршрутизации;
- 989 – FTPS – FTP-данные с шифрованием по SSL или TLS;
- 990 – FTPS – FTP-команды с шифрованием по SSL или TLS;
- 1935 – RTMP – протокол, используемый для передачи аудио и видеопотоков через интернет;
- 5060 – SIP – протокол передачи данных, описывающий способ установки и завершения пользовательского интернет-сеанса.
Полный перечень задействованных портов можно посмотреть по ссылке.
Просмотр активных соединений
Открываем командную строку
Для возможности просмотра состояния сессий необходимо открыть командную строку и воспользоваться встроенной утилитой netstat, которая дает представление о текущих установленных соединениях. Чтобы открыть командную строку, нажмем сочетание клавиш «WIN + R» и в поисковой службе «Выполнить» введем запрос «cmd» и нажмем «ОК».
Перед нами откроется командная строка. Для просмотра текущих активных соединений, вводим текстовую команду «netstat -a» и нажимаем Enter.
Доступные соединения
Посредством утилиты netstat перед нами отобразится список текущих установленных соединений или активных сессий. Каждая сессия показывает, по какому транспортному протоколу осуществляется передача данных. В локальном и внешнем адресах отображены данные об отправляющем и принимающем запросы хостах. Запись вида 192.168.1.47:53229 представляет собой в левой части сетевой адрес нашего компьютера, а в правой (после двоеточия) – присвоенный временный номер порта. Для установления кратковременной сессии между нашим компьютером и сервером (или какой-либо программой) порт выдается случайным образом, и может находиться в промежутке с 49152 до 65535. Все остальные порты вплоть до 49151 являются зарезервированными.
В некоторых случаях порт удаленного сервера отображается как имя – на это влияет системный конфигурационный файл, в котором заведомо прописано соответствие имени и порта. Пример такой записи: 52.139.250.253:https. В зависимости от состояния соединения, определения их статусов обозначаются следующим значением:
- LISTENING – «порт прослушивается». Компьютер ожидает подключения по этому порту.
- ESTABLISHED – соединение успешно установлено, и в данный момент с удаленным компьютером осуществляется взаимодействие.
- CLOSE_WAIT – ожидание закрытия сессии подразумевает, что в скором времени соединение будет закрыто.
- TIME_WAIT – состояние временного ожидания указывает на то, что некоторое количество времени между хостами не устанавливалось соединения.
Способы открытия портов
Бывают случаи, что при взаимодействии с каким-либо приложением или последующем установлением сессии порт в целях безопасности может быть недоступен. Для того чтобы была возможность взаимодействовать с определенной программой или хостом, необходимо открыть порт.
Открытие порта посредством брандмауэра
Брандмауэр, или межсетевой экран – программное обеспечение, осуществляющее контроль и фильтрацию проходящего через него сетевого трафика в соответствии с заданными правилами. Для того чтобы была возможность установить сессию, в брандмауэре необходимо прописать правила для входящих и исходящих подключений.
Для настройки брандмауэра следует открыть панель управления. Панель управления открываем путем поисковой строки на панели задач.
Открываем панель управления
В панели управления переходим в раздел «Система и безопасность».
Открываем этот раздел
В параметрах системы и безопасности нажимаем на «Брандмауэр Защитника Windows».
Откроем Брандмауэр Защитника Windows
Перед нами откроются параметры брандмауэра. Для настройки правил для входящих и исходящих подключений слева переходим в дополнительные параметры.
Доп.параметры
После проделанных нами действий запустится монитор брандмауэра Защитника Windows в режиме повышенной безопасности.
Загрузка …
Правила для входящих и исходящих подключений
В брандмауэре, в режиме повышенной безопасности, для открытия порта необходимо создать правила для входящих и исходящих подключений.
Для создания правила в левой части монитора брандмауэра нажимаем на вкладки «Правила для входящих\исходящего подключения», затем в правой части переходим в действия и нажимаем «Создать правило…».
Надо создать правило
По завершении проделанных действий, в зависимости от характера выбранного подключения, запустится мастер создания правил. Первым шагом для создания правила будет указываться его тип – для программы или для порта. Если вы намерены открыть доступ для конкретной программы, взаимодействующей с сетью, необходимо выбрать пункт «для программы» и указать к ней путь. Если вы намерены предоставить доступ ко всем программам, необходимо выбрать пункт «Все программы».
Мастер создания правил
Вписываем путь
Если вы хотите напрямую прописать порт – выбираем тип правила «для порта». На следующем шаге указываем протокол и прописываем порт, который необходимо открыть.
Указываем порт
Например, 80
Дальнейшие действия для настройки программ и настройки портов едины. На шаге действия выбираем пункт «Разрешить подключение», жмем «Далее».
Разрешаем
На последующем шаге применяем правило для доменного, частного и публичного профиля
Ставим галочки
На заключительном шаге даем правилу имя и при необходимости заполняем описание. Нажимаем «Готово». Правило создано, и вместе с ним произведено открытие порта.
Имя может быть любым
Открытие порта при помощи антивируса
Настройки
Правила сети
Для открытия порта создания правила через брандмауэр может быть недостаточно. За качество и контроль безопасности соединений помимо брандмауэра может отвечать и антивирусное программное обеспечение. В зависимости от установленного антивируса, скорее всего, придется прописать нужный порт и в нем. На примере рассмотрим один из самых распространенных антивирусов – Kaspersky Free. Для открытия нужного нам порта переходим в настройки, во вкладку «Дополнительно» и затем в параметры сети.
Контролировать только выбранные порты
Через параметры сети находим раздел «Контролируемые порты». По умолчанию и в целях безопасности оставляем выбранную функцию «Контролировать только выбранные порты» и нажимаем «Выбрать…».
Жмем на «Добавить»
Откроется окно сетевых портов, над которым можно произвести операции добавления, изменения или удаления. Для открытия нового порта нажимаем «Добавить».
Порт 80
При необходимости вводим название или описание порта, затем указываем сам порт, который необходимо открыть. Удостоверимся в статусе «Активно» и жмем «Добавить».
После проделанных действий для добавленного порта будет открыт доступ.
В зависимости от антивирусного программного обеспечения настройки контроля портов могут быть незначительно изменены.
Загрузка …
Проброс портов через роутер
Заключительным этапом для открытия и доступности порта будет служить его проброс через роутер. Как это делается, рассмотрим на примере часто используемого роутера tp-link.
Для начала необходимо зайти в его веб-интерфейс – для этого открываем браузер и в поисковой строке вводим сетевой адрес роутера – по умолчанию он имеет вид 192.168.0.1 или 192.168.1.1.
При удачном заходе появится окно авторизации. Для определения сетевого адреса и входных данных для вашего роутера необходимо посмотреть информацию на его задней панельной части.
При успешной авторизации перед нами откроется окно настроек роутера.
Авторизация
Виртуальные серверы
Для открытия порта перемещаемся в раздел переадресации и переходим на вкладку «Виртуальные серверы», после чего нажимаем «Добавить».
Откроется окно добавления или изменения записи виртуального сервера, в котором необходимо будет прописать нужный для доступа номер порта и локальный адрес компьютера. Внутренний порт либо не прописываем, либо указываем тот же, что и порт сервиса.
Сохраняем
Нажимаем «Сохранить».
В списке вы его увидите
Открытый порт отобразится в таблице виртуального сервера.
Путем проделанных действий будет осуществлен проброс порта через роутер.
В зависимости от производителя роутера настройки проброса порта могут незначительно отличаться. Альтернативные настройки в роутерах D-link находятся в заданных параметрах: Расширенные настройки -> Межсетевой экран -> Виртуальный сервер -> Добавить.
Альтернативные настройки в роутерах Asus: Переадресация -> Виртуальные сервера -> Добавить.
![]()
ipconfig
На заметку: для того что узнать локальный адрес компьютера, необходимо открыть командную строку и ввести текстовую команду «ipconfig». Локальный адрес будет отображен в наименовании IPv4-адрес.
Загрузка …
Проверка доступности порта
Чтобы проверить порт на доступность, можно воспользоваться сервисом 2ip.ru, позволяющим получить полную информацию об ip-адресе.
Открываем браузер и вводим поисковый запрос «2ip.ru».
Проверим тут
После перехода на сайт перед нами представится полная информация о нашем внешнем ip-адресе и его непосредственном местоположении. Для проверки доступности порта выбираем раздел «Проверка порта».
Проверка статуса
Вводим назначенный порт. Нажимаем «Проверить». Статус порта будет отображен ниже.
Однако существует нюанс, что даже при всех проделанных действиях, порт может оказаться недоступным. Скорее всего, на это дает влияние ваш интернет-провайдер, который блокирует порт по определенным причинам и обстоятельствам. Вследствие этого, с целью проверки порта на доступность будет иметь смысл связаться с провайдером и уточнить детали.
Загрузка …
Post Views: 27 956
Download Article
Configure your router or computer to accept incoming connections
Download Article
- Windows Firewall
- Windows Command Prompt
- macOS
- Router Ports
- Linux
- Check If Ports Are Open
- FAQ
- Video
- Q&A
- Tips
- Warnings
|
|
|
|
|
|
|
|
|
|
Do you need to allow an application or service through your PC or Mac’s firewall? If you’re running a server, streaming, gaming, or using an app that requires a port to be open, we can help. Many ports are closed by default to prevent intrusion, but it’s easy to open them. This wikiHow article will teach you how to open a port on Windows 10, Windows 11, Mac,, Linux, and even on your router. We’ll also show you how to find out if ports are open and share helpful security tips from computer and tech specialist Luigi Oppido.
Quick Steps: Open a Port on Windows
- Open Windows Defender Firewall with Advanced Security.
- Go to Inbound Rules > New Rule.
- Select Port.
- Select TCP or UDP and enter the port or range.
- Select «Allow the connection.»
- Name the firewall rule and click Finish.
-
To access your firewall settings on Windows 10 or 11, follow these quick steps:
- Press the Windows key on your keyboard or click the magnifying glass in your taskbar.
- Type windows firewall.
- Click Windows Defender Firewall with Advanced Security.
- If prompted, enter your password to confirm.
-
It’s in the upper-left side of the window.[1]
Advertisement
-
You’ll see this option on the right side of the window.[2]
-
This will allow you to manually choose the ports you want to open.
- If you are being told to open a port to use a specific application or play a certain game, Oppido recommends looking it up first. «If I’m being asked to open up a port, I do a quick Google search to see if that port is being used by any other services or protocols,» he says. If the port number is commonly used for a certain program, make sure that program isn’t something hackers are scanning for, as this could leave your system vulnerable.
-
Check the TCP box or the UDP box.
- Check your program’s support documentation to ensure that you are using the correct protocol.
- In most cases, if you’re opening a port to run specific software, you’re opening a TCP port.
-
Make sure the «Specific local ports» option is selected, and then type the ports you need to open into the field. You can open multiple individual ports by separating them with a comma, and you can denote a range of ports by using a dash between the two ends of the range.
- For example, you would type 8830 to open port 8830, 8830, 8824 to open both port 8830 and port 8824, or 8830-8835 to open ports 8830 through 8835.
- If you are supposed to choose a random port, Oppido recommends selecting a port in the thousands because a lot of three-digit port numbers are used by other apps and services.
-
It’s at the bottom of the window.
-
If this option isn’t checked, click the checkbox before continuing.[3]
- You can also use this tool to block connections.
-
These include the «Domain», «Private», and «Public» boxes.
-
It’s at the bottom of the window.
-
This will save your settings and open your port(s).
- If opening the ports required by your software or server doesn’t resolve your problem, you may also need to set up port forwarding on your router.
Advertisement
-
1
Open Command Prompt as an administrator. If you want to use the command prompt to open ports on Windows, you’ll want an administrator CMD window.[4]
To open one:- Press the Windows key and type cmd.
- Right-click Command Prompt and select Run as Administrator.
- Click Yes to continue.
-
2
Open a port. To open ports in command prompt, you’ll use the netsh advfirewall command. You will need to know the port number you are supposed to open and the protocol (TCP or UDP). In this example, we will open port 25565, a port commonly associated with Minecraft:[5]
- netsh advfirewall firewall add rule name= "Open port 25565" dir=in action=allow protocol=TCP localport=8025565
- «Open port 25565» is the name we gave to the firewall rule–you can call this anything you want.
- You can learn about more port-opening options by running the command netsh advfirewall firewall add rule ?
- Want to see which ports are open? Jump down to How to Check if Ports are Open.
Advertisement
-
1
Open your Mac’s firewall settings. If you want to allow a specific app through your firewall, you can do so in your firewall settings. Unlike in Windows, you won’t need to open specific port numbers on your Mac—the firewall manages ports on a per-application basis. Follow these steps to open your firewall settings:[6]
-
macOS Ventura or later: Click the Apple menu, select System Settings, click Network, and then click Firewall.[7]
- macOS Monterey and earlier: Click the Apple menu, select System Preferences…, Click Security & Privacy, and then click the Firewall tab.
-
macOS Ventura or later: Click the Apple menu, select System Settings, click Network, and then click Firewall.[7]
-
2
Click Options…. This will be called «Firewall Options» on older versions of macOS. A list of firewall rules will appear.
- If the options button is turned off, the firewall is disabled. Enable it now to continue.[8]
- If the options button is turned off, the firewall is disabled. Enable it now to continue.[8]
-
3
Click +. You’ll see this option below the list of firewall rules.[9]
-
Simply click an application to select it.
- If the app you are looking for doesn’t appear on the list, it may already have access through the firewall. This is true for many system services, as well as some digitally signed apps.[10]
- If the app you are looking for doesn’t appear on the list, it may already have access through the firewall. This is true for many system services, as well as some digitally signed apps.[10]
-
5
Click Open. It’s near the bottom of the window. Doing so will add the program to the list.
-
6
Make sure «Allow incoming connections» is displayed next to the app’s name. If you don’t see this to the right of the application’s name, click the dropdown menu to the right of the application’s name and select Allow incoming connections.
-
7
Click OK to save your changes. The application is now allowed through the firewall.
- If opening the ports required by your software or server doesn’t resolve your problem, you may need to also set up port forwarding on your router.
Advertisement
-
You’ll need your router’s IP address to access your router’s configuration page.
-
Windows: Press the Windows key on your keyboard, type cmd, and click Command Prompt. At the prompt, type ipconfig and press Enter. The IP address of your router appears next to «Default gateway.»[11]
-
Mac: Open the Launchpad, type terminal, and click Terminal.[12]
Then, type or paste netstat -nr and press Return to find the IP next to «Default.»
-
Windows: Press the Windows key on your keyboard, type cmd, and click Command Prompt. At the prompt, type ipconfig and press Enter. The IP address of your router appears next to «Default gateway.»[11]
-
Open your preferred web browser, then type or paste your router’s IP address into the address bar. Press Enter or Return to bring up the login page.
-
If you’ve already configured the router, enter the username and password you chose then. If not, consult your router’s manual or online page for the stock username and/or password.
- If you’ve forgotten your login information, you may have to reset the router.
-
Since each router’s page will differ slightly from others, look for the following options (or variations of them):
- Port Forwarding
- Applications
- Gaming
- Virtual Servers
- Firewall
- Protected Setup
- You may also want to look for an Advanced Settings section.
-
Each router will have a slightly different way of doing this, although the required information is the same for any router:
- Name or Description — Enter the application’s name.
- Type or Service Type — This can be TCP, UDP, or both. If you aren’t sure of which one to select, click Both or TCP/UDP.
- Inbound or Start — Type in the port number here. If you are opening a range of ports, type in the lowest number in the range instead.
- Private or End — Re-type in the port number here. If you are opening a range of ports, type in the highest number in the range instead.
EXPERT TIP
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.
Don’t open ports unless you know what you are doing. If you are opening ports, you’re opening more doorways into your network. Use unique ports that people aren’t using, maybe in the thousands or so, because a lot of people use three-digit ports.
-
This goes in the «Private IP» or «Device IP» field. You can find your private IP address on a PC or on a Mac.
-
Click the Save or Apply button. If prompted, you’ll also need to restart your router for the changes to take effect.
- You may also have to check an «Enabled» or «On» box next to the forwarded port row.
Advertisement
-
1
Make sure the port you want to open is not in use. You can do this using the netstat command at the command line. In this example, we’ll check to see if port 3331 is open:
- netstat -na | grep :3331
- If you get a «Command not found» when using netstat, replace «netstat» with «ss» like this: ss -na | grep :3331
- If the port is not currently in use, you will not get any sort of message because the port number was not found in the firewall rules. If the port is in use, you will see its associated rule.
-
2
Open the port in UFW (Uncomplicated Firewall). If you are using Debian, Ubuntu, or another Debian-based distribution running UFW, you would use this command to open port 3331:[13]
- sudo ufw allow 3331
-
3
Open the port in firewalld. If you are using firewalld, the default firewall for Fedora, CentOS, Red Hat, and other RH-based distros, you would use this command to open port 3331:[14]
- firewall-cmd --add-port=4000/tcp
Advertisement
-
To see if your ports are open to people outside of your network, try a web-based port checker. These port-checking websites are great for making sure certain ports, such as your Minecraft server or Soulseek port, are open. Just visit any of these sites and enter your IP address and the port you want to check.
- [15]
- [16]
- [17]
- [15]
-
If you want to see a quick list of all open ports on your Windows PC, you can run a simple command at the command prompt. Here’s how:
- Press the Windows key on your keyboard and type cmd.
- Right-click Command Prompt and choose Run as administrator.
- Click Yes to proceed.
- Type netstat -ab and press Enter.
- All open TCP and UDP ports will appear, along with the name of the app using that port.[18]
-
You can see a list of all open ports in your Mac’s Terminal app. Here’s how:
- Open Terminal by clicking the Terminal icon on the Launchpad.[19]
- Type lsof -i -P and press Return to see all open (listening) ports. It may take a moment for the list to populate.
- Open Terminal by clicking the Terminal icon on the Launchpad.[19]
-
4
See all open ports on Linux. To see which ports are in use on your Linux system, open a Terminal and run the command sudo ss -tunl.
- You can also use the command sudo lsof -nP -iTCP -sTCP:LISTEN to see a list of TCP listening ports.
Advertisement
-
1
What does open ports mean? An open port is a network entry point that can accept connections. For example, when you load a website that begins with «https://», the SSL port (port 443) is open, which allows you to access the website.
-
2
Why do hackers scan for open ports? Hackers use port-scanning tools to scan for exploitable software/vulnerabilities in remote computers. For example, a hacker can enter an IP address, scan it for all open ports, and then use various tools to try exploiting the software running on those ports.[20]
-
3
Why are ports 80 and 443 open? If these ports are open on your server, it’s usually because there’s a web server running (or installed and not yet running). Port 80 (and sometimes port 8080) is the standard unencrypted HTTP port, while 443 is the encrypted HTTPS port.[21]
In most cases, port 80 forwards to port 443 so that people attempting to load the unsecured version of the website will be served the SSL version.[22]
-
4
What happens when you open a port? You’re allowing inbound connections through your firewall. Essentially, you’re opening a door to computers outside of your network to connect to the software that runs on that port.
Advertisement
Add New Question
-
Question
Will this put my device or router in danger of hacking or viruses?
Yes, opening the wrong port may compromise your computer’s security and render it vulnerable to viruses and other malicious activity, like hacking.
-
Question
How can a hacker open a port?
By using ipconfig command at the command prompt or using Windows log key and type run and then cmd.
-
Question
How do I tell if a port is open on my router?
Go to command prompt and enable telnet services, syntax, telnet (ipadress) (port number).
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
-
Most applications use TCP ports. Time-sensitive programs, like multiplayer video games and live streaming apps, may use both UDP and TCP ports.
Thanks for submitting a tip for review!
Advertisement
-
Be careful when opening ports. Opening the wrong port may compromise your computer’s security and make it vulnerable to viruses and other malicious activity like hacking.
Advertisement
About This Article
Article SummaryX
1. Sign in to your router’s admin site.
2. Go to the Firewall page.
3. Locate the Port Forwarding section.
4. Enter or select the port.
5. Enter your computer’s private IP address.
6. Click Save or Apply.
7. Restart the router.
Did this summary help you?
Thanks to all authors for creating a page that has been read 1,288,414 times.