title: Remote debugger over SSH tunnel
body: <p>I am communicating with a server behind Microsoft ForeFront and I am in need to connect to the Visual Studio Remote Debugger located on the server. My development computer is located outside of Microsoft ForeFront and therefor it is quite troublesome. So far I have managed to make the connection from Visual Studio on my machine outside forefront to the Remote Debugger on the server inside forefront. I can see in Remote Debugger Monitor that connection is successful. "DOMAIN\Jens connected" it says. The Visual Studio client is still waiting and after a while it complain "Unable to connect to the Visual Studio Debugging Monitor named Jens@SERVER. The Visual Studio Debugger on the target computer cannot connect back to this computer"</p>
  
  <p>To set this all up so far I have tried to tunnel the remote debugger connection using Putty.
  I have set up Putty to connect to a linux-server outside the Microsoft Forefront network. In Putty I have set up the following forwards (123.123.123.123 is the linux-server outside ForeFront):</p>
  
  <pre><code>4R123.123.123.123:135      localhost:135
  4R123.123.123.123:137      localhost:137
  4R123.123.123.123:138      localhost:138
  4R123.123.123.123:139      localhost:139
  4R123.123.123.123:445      localhost:445
  </code></pre>
  
  <p>This part works great. I can access all these ports from my development machine and as I wrote earlier Visual Studio can even connect. I have set up a local administrator on my development computer and on the server with the same username and password and I run both Visual Studio and the Remote Debugger using this user.</p>
  
  <p>Now my theory here is that the Remote Debugger on the server wants to make a TCP connection back to my development computer to send a reply to Visual Studio and I guess my connections from visual studio to the remote debugger on the server would look like they have originated from localhost. I therefore guess that the Remote Debugger will try to connect to origin (localhost) and try to send the reply there.</p>
  
  <p>Does this make sense? If so, is there a way I can spoof this connection as coming from the actual IP address of my computer? If that is possible maybe I can trick the Remote Debugger to connect to the right place?</p>
  
  <p>If I have explained this in a bad way, please ask me and I will do my best to clarify.</p>