19

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?

simonhamp
  • 465
  • 1
  • 5
  • 13
  • 1
    So you're asking Sys Admins to help you bypass security put in place by Sys Admins? – GregD Dec 21 '10 at 13:37
  • 2
    "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 Dec 23 '10 at 09:57

2 Answers2

23

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.

larsks
  • 41,276
  • 13
  • 117
  • 170
  • 1
    This did the trick nice and quickly! – simonhamp Dec 23 '10 at 09:53
  • This works with the latest Mac Remote Desktop client too? With a Domain on the Windows side? – Thorbjørn Ravn Andersen Oct 01 '13 at 09:31
  • 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. – larsks Oct 01 '13 at 16:53
  • 1
    This still works with the latest RDP client (by Microsoft) on Mac (OSX 10.10). ... _just to keep the answer up to date_ – Sina Dec 15 '14 at 12:50
  • @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). – 0xC0000022L Feb 12 '16 at 09:28
  • 1
    @0xC0000022L done :) – simonhamp Feb 13 '16 at 10:42
  • 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. – user2943160 Nov 13 '16 at 20:44
1

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

Marc
  • 119
  • 3