Home > windows > Can I use SSH port forwarding to connect via RDC to a Windows VM setup to use NAT?

Can I use SSH port forwarding to connect via RDC to a Windows VM setup to use NAT?

August 8Hits:3
Advertisement

I have the following, totally bizarre, please don't ask, setup:

  1. AirPort router
  2. iBook running Virtual PC connected to AirPort
  3. MacBook running RDC connected to AirPort
  4. 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?

Notice

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.

Answers

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:

Host virtual_pc_rdc
  Hostname ibook
  User kch
  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:

ssh virtual_pc_rdc

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.

Related Articles

  • Can I use SSH port forwarding to connect via RDC to a Windows VM setup to use NAT?August 8

    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 th

  • Setting up iptables or ssh port forwarding for connecting to mysqlApril 6

    I've got a linux (ubuntu) computer at work from where I can connect to an external mysql server (not on company NAT). I've also got a laptop from which I want to connect to the mysql server but outside the work network. How can I setup iptables or ss

  • How to remove SSH port forwardingJuly 3

    The following command has been executed on our server, Nexus, to forward remote desktop connections to remote machine Lagos-B: screen -S rdp ssh -L [*]:886:10.1.100.91:886 [email protected] -N I need to change this bind but I cannot simply overwrite it by

  • ssh port forwarding problemFebruary 18

    I want to use ssh port forwarding. I haven't used this feature for a few years, so I may have forgotten something obvious, or OS defaults may have changed. I have tried this on three different machines (all Ubuntu 9.10). The debug says that it is ope

  • How do I log SSH port forwards?September 16

    Say I have an SSH server, with port forwarding enabled. It's fairly simple for a user to set up an SSH connection and forward BitTorrent traffic or other illegal or abusive traffic over it. How can I set up logging to record what port forwards users

  • SSH Port Forward a local IRC server to my remote serverJuly 13

    So, I have this slight dilemma: I am not allowed to host an IRC server on my VPS, but I am allowed to use tunneling of some sort to let users connect to an IRC server I have set up locally on my Mac Mini. Basically - how would I go about tunneling co

  • SSH port forwarding, forward port over VPNApril 17

    The scenario: I have a Linux laptop (linuxlaptop) There's a piece of software that I develop that access a web service https://ws.behind-vpn.com that is behind a Cisco AnyConnect VPN. I cannot connect to the VPN from the Linux laptop (the VPN certifi

  • Is it possible to use SSH port forwarding with FTP?April 18

    I tried using SSH port forwarding with FTP but it didn't work even though I used FTP connections. It seems that the FTP server gives you another port number to use, so you must be able to connect to that port in order to receive data from the server.

  • SSH port forwarding with automatic reconnect, script executing at startupDecember 27

    In short, every time my computer boots, I would like to start a ssh port-forwarding connection that will reconnect with the server if the connection drops. Computer is Debian Wheezy x64. An initial and successful connection can be made as follows: sc

  • SSH port forwarding to a host that needs to contact a third named host to access MySQLFebruary 7

    We customize and support standard web applications that our customers host on managed servers from different web hosters. Usually, the application consists of a web application in PHP and a database (mostly MySQL). For our customers, we want to offer

  • What's ssh port forwarding and what's the difference between ssh local and remote port forwarding

    What's ssh port forwarding and what's the difference between ssh local and remote port forwarding February 19

    This question already has an answer here: ssh port forward to access my home machine from anywhere 3 answers How does reverse SSH tunneling work? 3 answers I feel confused about ssh port forwarding and the difference between ssh local and remote port

  • SSH port forwarding (SQLYog Tunnel)March 29

    I'm running CentOS 4.3 and ISPConfig 2.2 with OpenSSH 0.9.7a. I'm able to login via putty on windows to my linux box and login to mysql. I would like to use SQLyog Enterprise to create a SSH tunnel to mysql, however, when I attempt to do this, I get

  • Accessing mysql behind firewall with ssh port forwardingOctober 8

    I have an architecture which looks like this: | - DMZ - | ________ | ________ | _______ | CLIENT | | | SERVER | | | MYSQL | |________| | |________| | |_______| | | | <-FIREWALLS-> | I need to connect from CLIENT (linux) to MYSQL (service running on

  • SSH Port Forwarding October 24

    This question already has an answer here: SSH connection refused from inside my LAN 2 answers I'm trying to set up an ssh port forwarding from my router to my linux host. I'm using the dynamic dns service from http://www.dnsexit.com. I'm using their

  • OpenVPN over SSh port forwarding : can't redirect all trafic through VPNNovember 5

    I'm trying to escape my university wifi network rules with my Macbook (OSX 10.10). The university allows us to use a server, say bastion.univ.com, to mount an ssh port forwarding. I've an OpenVPN server running at home (tunnelblick). On client : I mo

  • iMessage / iCloud via SSH Port forward to get through firewallJanuary 23

    What ports does iCloud and iMessage use and is it possible to use SSH port forwarding via a proxy to use them on a network that blocks the services? --------------Solutions------------- According to: http://support.apple.com/en-us/HT202078 | Ports |F

  • Persistent SSH port forward without public keysMarch 13

    Problem I haven't found a solution to run an SSH port forward in a reliable and persistent fashion, when the server you are connecting to does not support public-key authentication. Question What is the most reasonable way to keep a persistent SSH po

  • What does port forwarding mean in "SSH port forwarding"?

    What does port forwarding mean in "SSH port forwarding"?October 22

    Wikipedia says In computer networking, port forwarding or port mapping is an application of network address translation (NAT) that redirects a communication request from one address and port number combination to another while the packets are travers

  • Linux iptables ssh port forwarding (martian rejection)November 23

    I have a Linux gateway performing NAT for my home network. I have another network which I'd like to transparently forward packets to, but only to/from specific IP/ports (ie. not a VPN). Here's some example IP and ports to work with: Source Router Rem

  • ssh port forwarding errorFebruary 15

    I have two Linux servers and one Mac client, and I would like to do SSH port forwarding via local port address on the Mac. In Terminal 1 on the Mac, localhost:~ user1$ ssh -L 8022:server2:22 server1 and from Terminal 2 on the same Mac localhost:~ use

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.877 s.