How to configure an external firewall to enable Visual Studio remote debugging

I read many articles here on MS and through Google on remote debugging, and they all cover the Windows Firewall and how to open ports and add a remote debugger agent as an exception. It seems like using a remote debugger it should be able to dynamically open ports.

Using an external firewall is not possible. Does anyone know which configuration to use to enable remote debugging through an external firewall? All ports are open on the client computer, the server has opened these ports:

  • TCP 135, 139, 445
  • UDP 137, 138, 500, 4500

EDIT: Using Windows 2008 R2 SP1 on the site side and Windows 7 SP1 on the debug side where VS is installed. The firewall, however, is external to both and must be configured separately, that is, it does not have information about the running process with a request for a port, it just sees the port request.

+6
source share
2 answers

In Vs2010, remote debugging is done using RPC. If your remote OS supports this, you can try to use the configured dynamic RPC port allocation and open the configured ports on your firewall. By the way, in addition to ports, you also need to configure user access.

I don’t know your OS - Another link for more modern operating systems How to limit the placement of RPC ports to dynamic TCP / IP

* NetSh INT IPV4 SET DynamicPort TCP Start=1024 num=65535 * NetSh INT IPV4 SET DynamicPort UDP Start=1024 num=65535 
+2
source

I believe that Visual Studio remote debugging uses DCOM, and the problem could be related to: http://support.microsoft.com/kb/248809 (the problem is that this is probably NAT and not a firewall).

I would try setting up a VPN and debugging through a VPN. That should work ...

0
source

Source: https://habr.com/ru/post/891342/


All Articles