OSX port forwarding to a VM via RDP

0

My goal is to connect over WAN to a Windows VM via RDP. The problem is that my new router HG633, does not detect the VMs as connected devices, therefore direct port forwarding to them doesn't work. (NOTE: the VMs have network access via the same router).

So I need a workaround to my issue by the more experienced users.

Host OS: OSX 10.11.6 / VMware Fusion 8 / Guest OS: Windows Server 2008 (Using Bridged Network configuration).

  1. Can I port forward external connections to OSX and then redirect the connection to my VM via RDP?
  2. Or can I somehow tunnel it via SSH?

Please help, thanks in advance.

anglojojo

Posted 2016-09-25T23:01:32.330

Reputation: 1

When you say "detect" what exactly do you mean? Most routers simply have you point a port to an IP. – user186658 – 2016-09-26T18:36:59.383

In regards to this router HG633 it needs to detect a device as it is connected to the subnet, and only then you have the option to make a port forwarding rule for it. In other routers it is flexible and simple just input the IP for the forwarding but it is not possible with the HG633. – anglojojo – 2016-09-27T12:42:20.650

Is the VM using DHCP? – user186658 – 2016-09-27T15:32:10.250

Nope, all internal static addresses. – anglojojo – 2016-09-27T19:12:54.053

If you figured out how the router is querying devices you could work from there. It could be an issue of the VMWare bridge blocking LAN broadcasts. – user186658 – 2016-09-27T19:32:26.123

I run a packet trace on my OSX. I noticed many Spanning-tree-(for-bridges) packets. Then I pinged the router from the VM, and I could see the OSX sending ARP requests on the subnet. (I am not an expert in Networking, so I am not sure why I am seeing STP packets coming from the router). – anglojojo – 2016-09-27T20:10:59.083

I believe the router is querying the MAC addresses, when I tried to ping the VM from the router, I could see that the OSX sent an ARP request for the router address, once the ARP was responded then the Echo reply came from the VM. – anglojojo – 2016-09-27T20:23:17.167

Arp requests are sent commonly, there's no guarantee it was linked to the icmp request. – user186658 – 2016-09-27T21:51:55.333

Answers

0

An SSH tunnel would be easiest. To tunnel to the OS X machine from the WAN, over SSH, your command will look something like this:

ssh -L 9998:localhost:3389 user@yourdomain

You'll need port forwarding set up on your router to forward port 22 (SSH) to the OS X machine.

Once you've made the SSH connection that sets up the tunnel, connect to localhost on port 9998 with your RDP client.

D Schlachter

Posted 2016-09-25T23:01:32.330

Reputation: 1 399

Thanks for the input, however, it is not working for me. – anglojojo – 2016-09-27T19:12:26.450

I managed to forward port 22 to the OSX host, however, the tunnel part is failing on me. Do I need to have an SSH server on the Windows Server which I want to RDP to? – anglojojo – 2016-09-27T19:18:16.013

If on the OS X machine running the VM, you connect to localhost on port 3389 for RDP, then on the machine connected with SSH, you would connect to localhost on port 9998 after setting up the tunnel. How do you connect to RDP locally on the OS X machine hosting the VM? – D Schlachter – 2016-09-27T20:28:45.553

No, I want to connect over WAN, from a Windows RDP Client to the Windows VM hosted on the OSX. I don't want to connect to the VM locally. – anglojojo – 2016-09-27T20:36:31.070

If you can't connect locally on the OS X machine, you can't tunnel to the RDP server. Tunnelling makes a port on the remote machine available as a local port on the local machine. – D Schlachter – 2016-09-27T20:44:29.450

Yes thats what I thought, and thats why I asked for a workaround. I guess I can setup a remote connection on the OSX directly (VNC) and then just access the VM like that. I just wanted somehow direct access to the VM over the WAN. – anglojojo – 2016-09-27T20:47:14.217