Remote Desktop over SSH SOCKS proxy to bypass firewall

45,573

Solution 1

You don't need a SOCKS proxy for this; simple SSH port forwarding will work. For example, there's a server at my office I frequently need to access, which we'll call server.example.com. I can't connect to it directly, but I can ssh to myofficemachine.example.com. So I do this:

ssh -L 3389:server.example.com:3389 myofficemachine.example.com

And then I point my local Remote Desktop client to localhost. This works great, and my setup is almost identical to yours -- a Mac at home, a Linux box at my office, and a Windows server on another work network.

Solution 2

You could try using CoRD, a replacement remote desktop app which supports SOCKS proxies.

Share:
45,573

Related videos on Youtube

simonhamp
Author by

simonhamp

Senior Developer at Elvie. I have a number of side projects: Estilistas Ensemble Built with Bootstrap

Updated on September 17, 2022

Comments

  • simonhamp
    simonhamp over 1 year

    I'm trying to connect to a Windows server from my Mac using RDC2.1 for Mac.

    The problem is the server I need to connect to is guarded by the evil dragon - IP-based access control on a completely separate network.

    I have an IP I can get in on, but it's at my office (i.e. a completely separate network).

    Because that network isn't set up for VPN, I've set up a SOCKS proxy through an SSH tunnel (which is all working fine).

                   (SSH proxy)
    Me (on my Mac) ----------> Office Linux box ----> Windows server
    (home network)             (office network)       (other network)
    

    From my Linux server in my office (the SSH server) I can telnet to port 3389 on the Windows server, no problem. But from my Mac I can't get so much as a squeak out of it. Any ideas?

    • GregD
      GregD over 13 years
      So you're asking Sys Admins to help you bypass security put in place by Sys Admins?
    • simonhamp
      simonhamp over 13 years
      "I have an IP I can get in on" - there would be no point having the security if I couldn't bypass it! That's like having a security guard at your front door and telling him to never let anyone in or out and him taking you very literally...
  • simonhamp
    simonhamp over 13 years
    This did the trick nice and quickly!
  • simonhamp
    simonhamp over 13 years
    After downloading and using CoRD I already prefer it to Microsoft's own RDC... good find Marc
  • user1089802
    user1089802 over 10 years
    This works with the latest Mac Remote Desktop client too? With a Domain on the Windows side?
  • user2751502
    user2751502 over 10 years
    It shouldn't matter what's on the other side. I don't know if I've used the latest Mac client, but it should work. If you're having problems, you might want to post a new question.
  • Sina
    Sina over 9 years
    This still works with the latest RDP client (by Microsoft) on Mac (OSX 10.10). ... just to keep the answer up to date
  • 0xC0000022L
    0xC0000022L about 8 years
    @Simon: it would help this answer to appear at the top if you accepted this one instead of the other one (yes, one can change that).
  • simonhamp
    simonhamp about 8 years
    @0xC0000022L done :)
  • user2943160
    user2943160 over 7 years
    Well, this question is, for some reason, "off topic," but this answer is exactly what I needed for a quick how-to-use-ssh-for-this. Still works with RDP on MacOS to a Windows 7 computer in a firewalled network via a computer that I've got remote ssh access into.