Как открыть порт в Firewall Windows Server ® ?
- Нажмите Пуск → Служебные Windows → Панель управления → Брандмауэр защитника Windows → Дополнительные параметры .

- В списке слева нажмите Правила для входящих подключений , затем справа Создать правило… .

- Выберите Для порта и нажмите Далее .
- Укажите порт, несколько портов (через запятую, например «80,443») или диапазон портов (через дефис, например «27015-27019»). Нажмите Далее и еще раз Далее .
- Укажите профили, для которых применяется правило, и нажмите Далее .
- Укажите название и описание правила и нажмите Готово .
How to Open Ports on Windows Server?
All recent versions of Windows include the Windows Firewall utility. A firewall includes options for opening and closing ports, as well as allowing and disabling specific programs and services.
Computer resources can be protected from unauthorized access by firewalls on networks and servers. Incoming or even outgoing traffic is checked for by the firewall systems and in accordance with the rules configured, decisions are made about them.
Windows Firewall cannot access the port if it isn’t explicitly allowed. TCP/IP ports are reserved for applications whenever they want to access the network, which means anyone else cannot use them.

Open Ports on Windows Server
In Windows Server 2008/2012 R2/2016 and Windows Server 2019, there are three ways to open ports.
- MMC
- The command line (netsh)
- PowerShell commands (For 2012R2 and 2016 only)
So, you can open ports on Windows Server by following the instructions in the following article.
Open Ports via MMC
- Here first of all you have to log in using an admin account.
- Then you have to click on:
Start > Administrative Tools > Windows Firewall with Advanced Security
- Now you have to click on the Inbound Rules on the left of the MMC.
- Then click on the New Rule on the Right of the MMC.
- Now here you will get five steps to open a port and accept incoming connections:-
- Rule Type
- Protocol and Ports
- Action
- Profile
- Name
- Suppose for example the servers with Parallels RAS Publishing Agents will need to open TCP port 20002.
- Now under the Rule Type section, you have to select “Port” and then click on the “Next” button.
- Then under the Protocol and Ports section, you have to select the “TCP” as the type of protocol.
- After that, you have to type “20002” in the “Specific local ports” input field.
- Next, you have to head to the Action section in which you have to select “Allow the Connection“ and then you have to click on the “Next” button.
- Now under the Profile section, you have to select all three options and click on the “Next” button.
(NOTE: Here at this point if you wish to limit the connection to a particular profile then you can simply select the profiles that are appropriate to your setup.)
- After that, now you have to enter a “Name” for this rule under the Name section, and then click on the “Finish” button when you are done.
- That’s it, now you are done.
Open Ports through command line (netsh)
- First of all, using an administrator account you have to login to the server.
- Then you have to open and run the Command Prompt as Administrator.
- For the Publishing Agents role on the servers, open the TCP port 20002 with the following command.
- That’s it, now you are done.
Open Ports through PowerShell commands
- First of all, using an admin account you have to Log in.
- Then you have to run the Windows PowerShell as Administrator.
- You need to open the TCP port 20002 on the publishing agents server using the following command.
- That’s it, now you are done.
Once all is done, now immediately after creating this rule, the firewall rule will allow traffic to (or from) your server. While if you want to open a port for both sending and receiving, you need to repeat the process as an Outbound rule.
Ports play a very important role in any computer system. In computer networks, ports are used to connect computers and other devices to one another. When you open a port, you are allowing specific types of information to go in and out of your computer.
For example, if you want to host a website, you need to open port 80 to allow web traffic to go in and out. This blog is all about how to open ports on a Windows server and we hope that you liked it.
FAQs
What is a firewall and how does it work?
A firewall is a security system that is used to protect computer resources from unauthorized access. It checks incoming and outgoing traffic on a network or server, and according to the configured rules, decides whether to allow or block traffic.
How do I open ports on Windows Server?
There are three ways to open ports on Windows Server 2008/2012 R2/2016 and Windows Server 2019: using MMC, command line (netsh), or PowerShell commands. To open a port using MMC, you need to log in as an admin, click on Start > Administrative Tools > Windows Firewall with Advanced Security, click on Inbound Rules, then click on New Rule, and follow the five steps to open a port and accept incoming connections.
What is a TCP/IP port and why do applications need them?
TCP/IP ports are reserved for applications when they want to access the network, which means that no one else can use them. Ports are used to connect computers and other devices to one another. When you open a port, you are allowing specific types of information to go in and out of your computer.
What is the difference between Inbound and Outbound rules when opening a port?
Inbound rules control traffic coming into the server, while outbound rules control traffic going out of the server. If you want to open a port for both sending and receiving, you need to repeat the process as an outbound rule.
Why is it important to open ports on a Windows server?
Opening ports on a Windows server is important because it allows specific types of information to go in and out of your computer. For example, if you want to host a website, you need to open port 80 to allow web traffic to go in and out. By opening ports, you can ensure that the applications and services you want to use can communicate properly.
Открытие портов на Windows Server 2012 R2
При работе с серверными операционными системами часто возникает необходимость предоставить программе или модулю доступ к сети, чтобы ПО могло получать необходимые данные извне. Для этого требуется открыть порт. Задача непростая, особенно для новичка, поскольку существует множество подводных камней (но если вы решили купить Windows Server, то вам придется в них разобраться). Сделать это можно несколькими способами. Рассмотрим один из них, чтобы более подробно осветить вопрос того, что такое открытие портов на Windows Server 2012 R2.
_04.jpg)
Открытие порта через брандмауэр
Открыть порт в серверной Windows можно через встроенную систему безопасности брандмауэр. Для этого вам необходимо зайти в Панель управления, выбрать пункт «Системы и безопасность» и открыть соответствующее меню. Затем переходите в дополнительные настройки и выполните следующие шаги:
- выберите пункт «Правила для входящих подключений»;
- нажмите на кнопку «Создать правило»;
- укажите тип правила и перейдите в следующее меню;
- укажите требуемый для открытия тип порта (например, тут можно как открыть порт TCP, так и после изменить его);
- перейдите в «Локальные порты» и введите его значение (цифры);
- на следующей странице «Действие» подтвердите соединение соответствующей кнопкой;
- на следующей вкладке «Профиль» укажите параметры рабочей среды;
- затем введите «Имя» и нажимаем «Готово»;
- перезагрузите ПК.
Все готово, вы открыли порт через брандмауэр.
Как изменить порт по умолчанию?
В ряде случаев у пользователей возникает необходимость не открыть, а поменять порт по умолчанию для протокола RDP (используется для удаленного соединения с сервером). Стандартный порт 3389 решает большинство задач, но все же иногда необходимо его поменять. Например, чтобы отвечать требованиям политики безопасности. Как это сделать в Windows Server 2012? Это осуществляется через редактирование реестра в ОС. Для этого выполните такие шаги:
- запустите командную строку (введите в поиске cmd и выберите соответствующий пункт);
- в новом окне введите команду regedit;
- в новом меню отыщите раздел RDP-Tcp;
- отыщите пункт PortNumber в правом окне и откройте его;
- введите в строку «Значение» новый порт для подключения по RDP (в правой части меню выберите десятичную систему);
- сохраните изменения.
При выборе номера порта учтите, что есть специальные категории занятых или служебных. Например, порты от 0 по 10213 заняты системными приложениями системы. А вот порты от 1024 по 49151 предназначены для частных задач пользователя. Также для приватных решений и работы с любыми приложениями на машине есть номера от 49162 по 65535. Если вы введете неправильный номер, то столкнетесь с проблемой, что в Windows Server не открывается порт.
Затем вам нужно создать правила для измененного порта. Это можно сделать через специальное меню брандмауэра в режиме повышенной безопасности. Для этого откройте Диспетчер Серверов и перейдите в меню «Средства». Затем перейдите в раздел «Правила для входящих подключений» и нажмите кнопку для создания правила (для порта). После укажите тип протокола (UDP или TCP), номер порта, указанный в реестре, и тип действия (в нашем случае нужно разрешить подключение). Затем укажите область действия. На финальном шаге введите название для правила и завершите процесс создания.
Предыдущая статья
Современные операционные системы заметно отличаются от предыдущих версий. Они не только функциональнее и.
Открытие портов в брандмауэре Windows Server
Чтобы разрешить тот или иной порт в брандмауэре Windows Server:
- В меню «Пуск» выберите «Служебные — Windows» — «Панель управления»
- Далее выберите «Система и безопасность» — «Брандмауэр защитника Windows».
- В меню слева выберите пункт «Дополнительные параметры».
- В меню слева кликните «Правила для входящих подключений» и в блоке «Действия» справа кликните «Создать правило…».
- Выберите «Для порта» и кликните «Далее».
- Укажите нужный протокол и порт (порты). Здесь можно ввести:
-
- один конкретный порт;
- несколько портов через запятую (1540,1541);
- диапазон портов через дефис (1560-1591);
- Нажмите «Далее», затем снова «Далее».
- Выберите, для каких профилей применять созданное правило, и снова нажмите «Далее».
- Введите имя и описание правила и кликните «Готово».
Была ли статья полезна?