Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I've read many articles here, at MS and through Google, on remote debugging and all of them cover Windows Firewall and how to open ports and adding the debugger remote agent as an exception. It seems that using the remote debugger it must be able to dynamically open ports.

Using an external firewall, this is not possible. Does anybody know what configuration to use to allow remote debugging through an external firewall? Client computer has all ports open, server has these ports opened:

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

EDIT: Using Windows 2008 R2 SP1 on the website side and Windows 7 SP1 on the debugging side, where VS is installed. The firewall, however, is external to both and must be configured separately, i.e., it has no info on the running process asking for a port, it just sees the port request.

like image 329
Abel Avatar asked Jun 25 '11 08:06

Abel


1 Answers

In Vs2010 managed remote debugging is done via RPC. If your remote OS supports it - you can try to use configure RPC dynamic port allocation and open configured ports on your firewall. Btw in addition to ports you also have to configure user access.

Don't know your OS - One more link for more modern operating systems How to restrict RPC dynamic TCP/IP port allocation

* NetSh INT IPV4 SET DynamicPort TCP Start=1024 num=65535
* NetSh INT IPV4 SET DynamicPort UDP Start=1024 num=65535
like image 153
elevener Avatar answered Sep 26 '22 03:09

elevener