Remote port windows firewall

How to open ports in Windows Firewall

When dealing with certain apps and processes on your Windows 10 PC, you might run issues if you aren’t connecting properly to the internet. If you’ve come across a potential fix that involves opening a certain port in your firewall, you might be wondering what exactly that process entails. This is a problem that can arise in plenty of situations, but especially when attempting to set up a VPN. If you suspect Windows Firewall is part of your connectivity issue, here’s how to open ports.

How to open a port for incoming traffic in Windows Firewall

Windows Firewall is designed as a security measure for your PC. To put it simply, a firewall analyzes incoming and outgoing connections to determine whether or not they’re threats. If you suspect that your Windows Firewall is causing connectivity issues, you can open a port for incoming traffic. Here’s how:

  1. Right-click the Start button.
  2. Click Search.

Type Windows Firewall.

Click Advanced settings.

Click New Rule… in the right frame of the window.

Click Next.

Click Specific local ports.

Click Next.

Click Next.

Click Next.

Click Finish.

How to open a port for outgoing traffic in Windows Firewall

The same set of steps listed above can be used to create a rule for outgoing traffic. In step No. 6, instead of clicking Inbound Rules, you’ll want to click Outgoing Rules. The rest of the steps are the same, and you can disable the rule in the same manner by using the steps in the next section.

How to close a port in Windows Firewall

Want to disable the rule you created to open a port in the Windows Firewall? Here’s how:

    Right-click the Start button.

Click Search.

Click Windows Firewall.

Click Inbound Rules or Outbound Rules in the left frame of the window, depending on what type of rule you created.

Click the name of the rule in the right frame of the window.

Click Delete if you want to completely delete the rule.

More resources

Need a bit more help with Windows Firewall and Windows 10? We have plenty of resources covering a wide range of topics.

Halo: MCC’s live service elements make it better, not worse

Halo: The Master Chief Collection is more popular than ever, but some fans don’t agree with the live service approach 343 Industries has taken with it. Here’s why those elements are, at the end of the day, great for the game and for Halo overall.

Microsoft’s Surface Duo is not ‘failing up’

Microsoft announced this week that it was expanding Surface Duo availability to nine new commercial markets. While Surface Duo is undoubtedly a work in progress, this is not a sign of a disaster. It’s also doesn’t mean that Surface Duo is selling a ton either. Instead, the reason for the expansion is a lot more straightforward.

Here’s what you can do if Windows 10 update KB5001330 is causing issues

In this guide, we’ll show you the steps to get rid of the update KB5001330 to fix profile, gaming, and BSoD problems with the Windows 10 October 2020 Update and May 2020 Update.

These are the best PC sticks when you’re on the move

Instant computer — just add a screen. That’s the general idea behind the ultra-portable PC, but it can be hard to know which one you want. Relax, we have you covered!

Как открыть порт в брандмауэре (Firewall) Windows

Брандмауэр Windows — это встроенный файервол (firewall) Windows, который призван защищать компьютер от угроз из локальной сети и глобальной сети Интернет.

Иногда, в брандмауэре требуется открыть соответствующие порты. Например,

  • для подключения по удаленному компьютеру по протоколу RDP — это порт 3389;
  • для создания виртуальной сети VPN — порт 1723.

Итак, чтобы открыть порт в Брандмауэре Windows необходимо:

  1. Нажать на сочетание клавиш «WIN+R» и вписать команду firewall.cpl:

нажмите «ОК»

2. Откроется окно » Брандмауэра Windows«, в котором нажмите на пункт «Дополнительные параметры«:

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

4. Тип правила выбрать «Для порта«:

нажмите кнопку «Далее«.

5. В следующем окне необходимо указать номер порта, который необходимо открыть:

нажмите кнопку «Далее«;

6. в разделе «Действие» выставите пункт «Разрешить подключение«:

нажмите кнопку «Далее»

7. Далее необходимо выбрать в каких профилях применять правило:

Настройка брандмауэра Windows для удаленной отладки Configure Windows Firewall for remote debugging

В сети, защищенной брандмауэром Windows, необходимо настроить брандмауэр для разрешения удаленной отладки. On a network protected by Windows Firewall, the firewall must be configured to permit remote debugging. Visual Studio и средства удаленной отладки пытаются открыть правильные порты брандмауэра во время установки или запуска, но также может потребоваться открыть порты или разрешить отладку приложений вручную. Visual Studio and the remote debugging tools try to open the correct firewall ports during installation or startup, but you may also need to open ports or allow apps manually.

В этой статье описывается настройка брандмауэра Windows для включения удаленной отладки на компьютерах с Windows 10, 8/8.1 и 7, а также на компьютерах с Windows Server 2012 R2, 2012 и 2008 R2. This topic describes how to configure the Windows firewall to enable remote debugging on Windows 10, 8/8.1, and 7; and Windows Server 2012 R2, 2012, and 2008 R2 computers. Компьютер с Visual Studio и удаленный компьютер не должны работать под управлением разных операционных систем. The Visual Studio and remote computer don’t have to be running the same operating system. Например, на компьютере с Visual Studio может использоваться Windows 10, а на удаленном компьютере — Windows Server 2012 R2. For example, the Visual Studio computer can run Windows 10, and the remote computer can run Windows Server 2012 R2.

Инструкции по настройке брандмауэра Windows немного различаются в зависимости от операционной системы. Кроме того, они другие в прежних версиях Windows. The instructions for configuring the Windows firewall differ slightly on different operating systems, and for older versions of Windows. В параметрах Windows 8/8.1, Windows 10 и Windows Server 2012 используется слово приложение, тогда как в Windows 7 и Windows Server 2008 используется слово программа. Windows 8/8.1, Windows 10, and Windows Server 2012 settings use the word app, while Windows 7 and Windows Server 2008 use the word program.

Настройка портов для удаленной отладки Configure ports for remote debugging

Visual Studio и удаленный отладчик пытаются открыть правильные порты во время установки или запуска. Visual Studio and the remote debugger try to open the correct ports during installation or startup. Однако в некоторых сценариях, таких использование стороннего брандмауэра, может потребоваться открыть порты вручную. However, in some scenarios, such as a third-party firewall, you may need to open ports manually.

Открытие порта To open a port:

В меню Windows Пуск найдите и откройте Брандмауэр Windows в режиме повышенной безопасности. In Windows Start menu, search for and open Windows Firewall with Advanced Security. В Windows 10 это Брандмауэр Защитника Windows с повышенной безопасностью. In Windows 10, this is Windows Defender Firewall with Advanced Security.

Для нового входящего порта выберите Правила для входящего трафика, затем Новое правило. For a new incoming port, select Inbound Rules and then select New Rule. Для правила для исходящего трафика выберите Правила для исходящего трафика. For an outgoing rule, select Outbound Rules instead.

В окне мастера создания правил для входящего трафика выберите Порт, а затем нажмите кнопку Далее. In the New Inbound Rule Wizard, select Port, and then select Next.

Выберите TCP или UDP в зависимости от номера порта из следующих таблиц. Select either TCP or UDP, depending on the port number from the following tables.

В разделе Определенные локальные порты введите номер порта из следующих таблиц, а затем нажмите кнопку Далее. Under Specific local ports, enter a port number from the following tables, and select Next.

Нажмите кнопку Проверить соединение, а затем Далее. Select Allow the Connection, and then select Next.

Выберите один тип сети или несколько для включения, в том числе тип сети для удаленного подключения, а затем нажмите кнопку Далее. Select one or more network types to enable, including the network type for the remote connection, and then select Next.

Присвойте правилу имя (например, msvsmon, IIS или Веб-развертывание), а затем нажмите кнопку Готово. Add a name for the rule (for example, msvsmon, IIS, or Web Deploy), and then select Finish.

Новое правило должно появиться и быть выбранным в списке Правила для входящего трафика или Правила для исходящего трафика. The new rule should appear and be selected in the Inbound Rules or Outbound Rules list.

Чтобы открыть порт с помощью PowerShell, выполните следующие действия: To open a port using PowerShell:

Для Брандмауэра Windows можно использовать команды PowerShell, например New-NetFirewallRule. For Windows Firewall, you can use PowerShell commands such as New-NetFirewallRule.

В следующем примере порт 4024 открывается для удаленного отладчика на удаленном компьютере. The following example opens port 4024 for the remote debugger on the remote computer. Путь, который необходимо использовать, может отличаться. The path you need to use may be different.

Порты на удаленном компьютере, обеспечивающие удаленную отладку Ports on the remote computer that enable remote debugging

Для удаленной отладки на удаленном компьютере должны быть открыты следующие порты. For remote debugging, the following ports must be open on the remote computer:

Порты Ports Входящий или исходящий Incoming/Outgoing Протокол Protocol Описание Description
4022 4022 Входящий Incoming TCP TCP Для Visual Studio 2017. For VS 2017. Номер порта увеличивается на 2 с каждой версией Visual Studio. The port number increments by 2 for each Visual Studio version. Более подробную информацию см. в разделе Назначение портов удаленного отладчика Visual Studio. For more information, see Visual Studio remote debugger port assignments.
4023 4023 Входящий Incoming TCP TCP Для Visual Studio 2017. For VS 2017. Номер порта увеличивается на 2 с каждой версией Visual Studio. The port number increments by 2 for each Visual Studio version. Этот порт используется только для удаленной отладки 32-разрядного процесса из 64-разрядной версии удаленного отладчика. This port is only used to remote debug a 32-bit process from a 64-bit version of the remote debugger. Более подробную информацию см. в разделе Назначение портов удаленного отладчика Visual Studio. For more information, see Visual Studio remote debugger port assignments.
3702 3702 Исходящий Outgoing UDP UDP (Необязательно.) Требуется для обнаружения удаленного отладчика. (Optional) Required for remote debugger discovery.
Порты Ports Входящий или исходящий Incoming/Outgoing Протокол Protocol Описание Description
4024 4024 Входящий Incoming TCP TCP Для Visual Studio 2019. For VS 2019. Номер порта увеличивается на 2 с каждой версией Visual Studio. The port number increments by 2 for each Visual Studio version. Более подробную информацию см. в разделе Назначение портов удаленного отладчика Visual Studio. For more information, see Visual Studio remote debugger port assignments.
4025 4025 Входящий Incoming TCP TCP Для Visual Studio 2019. For VS 2019. Номер порта увеличивается на 2 с каждой версией Visual Studio. The port number increments by 2 for each Visual Studio version. Этот порт используется только для удаленной отладки 32-разрядного процесса из 64-разрядной версии удаленного отладчика. This port is only used to remote debug a 32-bit process from a 64-bit version of the remote debugger. Более подробную информацию см. в разделе Назначение портов удаленного отладчика Visual Studio. For more information, see Visual Studio remote debugger port assignments.
3702 3702 Исходящий Outgoing UDP UDP (Необязательно.) Требуется для обнаружения удаленного отладчика. (Optional) Required for remote debugger discovery.

Если выбрать параметр Использовать режим совместимости управляемого кода в разделе Сервис > Параметры > Отладка, следует открыть эти дополнительные порты удаленного отладчика. If you select Use Managed Compatibility Mode under Tools > Options > Debugging, open these additional remote debugger ports. Режим совместимости управляемого кода позволяет использовать устаревшую версию отладчика Visual Studio 2010. Debugger Managed Compatibility Mode enables a legacy, Visual Studio 2010 version of the debugger.

Порты Ports Входящий или исходящий Incoming/Outgoing Протокол Protocol Описание Description
135, 139, 445 135, 139, 445 Исходящий Outgoing TCP TCP Обязательный. Required.
137, 138 137, 138 Исходящий Outgoing UDP UDP Обязательный. Required.

Если, согласно политике домена, обмен данными по сети должен выполняться по протоколу IPSec, необходимо открыть дополнительные порты как на компьютере с Visual Studio, так и на удаленном компьютере. If your domain policy requires network communication to be performed through IPSec, you must open additional ports on both the Visual Studio and remote computers. Для отладки на удаленном веб-сервере IIS откройте порт 80 на удаленном компьютере. To debug on a remote IIS web server, open port 80 on the remote computer.

Порты Ports Входящий или исходящий Incoming/Outgoing Протокол Protocol Описание Description
500, 4500 500, 4500 Исходящий Outgoing UDP UDP Требуется, если в соответствии с политикой домена обмен данными по сети должен осуществляться по протоколу IPSec. Required if your domain policy requires network communication to be performed through IPSec.
80 80 Исходящий Outgoing TCP TCP Требуется для отладки веб-сервера. Required for web server debugging.

Сведения о разрешении взаимодействия с конкретными приложениями через брандмауэр Windows см. в разделе Настройка удаленной отладки через брандмауэр Windows. To allow specific apps through the Windows firewall, see Configure remote debugging through Windows Firewall.

Настройка удаленной отладки через брандмауэр Windows Configure remote debugging through Windows firewall

Можно установить средства удаленной отладки на удаленном компьютере или запустить их из общей папки. You can install the remote debugging tools on the remote computer, or run them from a shared folder. В любом случае необходимо правильно настроить брандмауэр удаленного компьютера. In either case, the remote computer firewall must be configured correctly.

На удаленном компьютере средства удаленной отладки находятся в следующей папке: On a remote computer, the remote debugging tools are in:

* \Common7\IDE\Remote Debugger\ * \Common7\IDE\Remote Debugger\

Разрешение и настройка удаленного отладчика через брандмауэр Windows Allow and configure the remote debugger through Windows Firewall

В меню Windows Пуск найдите и откройте Брандмауэр Windows или Брандмауэр Защитника Windows. In Windows Start menu, search for and open Windows Firewall, or Windows Defender Firewall.

Щелкните Разрешить взаимодействие с приложением через брандмауэр Windows. Select Allow an app through Windows Firewall.

Если удаленный отладчик или удаленный отладчик Visual Studio не отображаются в разделе Разрешенные приложения и компоненты, выберите Изменить параметры, а затем выберите Разрешить другое приложение. If Remote Debugger or Visual Studio Remote Debugger doesn’t appear under Allowed apps and features, select Change settings, and then select Allow another app.

Если приложение удаленного отладчика по-прежнему отсутствует в диалоговом окне Добавление приложения, нажмите кнопку Обзор и в зависимости от архитектуры приложения перейдите к папке * \Common7\IDE\Remote Debugger\ . If the remote debugger app still isn’t listed in the Add an app dialog, select Browse, and navigate to * \Common7\IDE\Remote Debugger\ , depending on the appropriate architecture for your app. Выберите msvsmon.exe, а затем нажмите кнопку Добавить. Select msvsmon.exe, and then select Add.

В списке Приложения выберите только что добавленный удаленный отладчик. In the Apps list, select the Remote Debugger that you just added. Выберите Типы сетей, затем выберите один тип сети или несколько для включения, в том числе тип сети для удаленного подключения. Select Network types, and then select one or more network types, including the network type for the remote connection.

Выберите Добавить, а затем нажмите кнопку ОК. Select Add, and then select OK.

Устранение неполадок подключения удаленной отладки Troubleshoot the remote debugging connection

Если вы не можете присоединиться к приложению с помощью удаленного отладчика, проверьте правильность всех портов брандмауэра, протоколов, типов сетей и параметров приложения для удаленной отладки. If you can’t attach to your app with the remote debugger, make sure the remote debugging firewall ports, protocols, network types, and app settings are all correct.

В меню Windows Пуск найдите и откройте Брандмауэр Windows, а затем выберите Разрешить взаимодействие с приложением через брандмауэр Windows. In the Windows Start menu, search for and open Windows Firewall, and select Allow an app through Windows Firewall. Убедитесь, что в списке Разрешенные приложения и компоненты отображается выбранный удаленный отладчик или удаленный отладчик Visual Studio и выбраны правильные типы сетей. Make sure Remote Debugger or Visual Studio Remote Debugger appears in the Allowed apps and features list with a selected check box, and the correct network types are selected. В противном случае добавьте необходимые приложения и параметры. If not, add the correct apps and settings.

В меню Windows Пуск найдите и откройте Брандмауэр Windows в режиме повышенной безопасности. In the Windows Start menu, search for and open Windows Firewall with Advanced Security. Убедитесь, что в разделе Правила для входящего трафика (и при необходимости в разделе Правила для исходящего трафика) отображается удаленный отладчик или удаленный отладчик Visual Studio с зеленым флажком, а все параметры заданы правильно. Make sure Remote Debugger or Visual Studio Remote Debugger appears under Inbound Rules (and optionally, Outbound Rules) with a green checkmark icon, and that all settings are correct.

  • Чтобы просмотреть или изменить параметры правила, щелкните правой кнопкой мыши приложение Удаленный отладчик в списке и выберите пункт Свойства. To view or change the rule settings, right-click the Remote Debugger app in the list and select Properties. Используйте вкладки Свойства, чтобы включить или отключить правило или изменить номера портов, протоколы или типы сетей. Use the Properties tabs to enable or disable the rule, or change port numbers, protocols, or network types.
  • Если приложение удаленного отладчика не отображается в списке правил, добавьте и настройте нужные порты. If the remote debugger app doesn’t appear in the rules list, add and configure the correct ports.
Читайте также:  Создать загрузочную флешку для windows 10 руфус
Оцените статью