I have the following, totally bizarre, please don't ask, setup:
- AirPort router
- iBook running Virtual PC connected to AirPort
- MacBook running RDC connected to AirPort
- A Windows XP VM running on Virtual PC with NAT network settings.
I want to access the Windows VM via RDC.
Apparently, latest Virtual PC on latest Mac OS X cannot use Virtual Switch with AirPort, just with ethernet, so the Windows VM is running on NAT. So it's not directly connected to AirPort, hence, not on the same network as the MacBook.
Can I use SSH port forwarding to somehow make the VM on the iBook accessible to the MacBook? What the magic line would be?
The accepted answer does not work for the very specific situation described here, see my answer for details. However, as a general solution involving other virtualization software, it works great.
Yup. This shouldn't be any different than other SSH tunnels, really.
I'll use hostnames since I don't know what your internal IPs are :).
ssh -L 13389:virtual_pc:3389 [email protected]
The virtual_pc address should be whatever the ibook knows how to connect to it as. The port 13389 can be any port you like, it will be opened on your local system through the ssh tunnel. You can also put this in your ~/.ssh/config file on your Macbook:
LocalForward 13389 127.0.0.1:3389
In both cases replace kch with your actual username, of course. After adding this to your config, you will get the same SSH tunnel with:
Use whatever hostname you like instead in the Host line of the config.
Once the connection is made, you can point RDP to localhost:13389 for the connection. Caveat, I don't know RDP software that well, but you should be able specify a different port.
Well, jtimberman's answer is great, unless you're in exactly my situation, then you're SOL.
Problem is: Virtual PC won't do Virtual Switch (Bridged) to AirPort, only to ethernet. Also, only if ethernet is actually plugged to something. (Which makes it impossible to use the Mac's NAT internet sharing)
When using Virtual PC's NAT, it'll only allow outgoing connections from the guest OS, so one can't RDC into it.
So, if you're using a more reasonable virtualization thing like VMware or Parallels, do check jtimberman's answer.