0

I have VMWare Fusion running on my OS X host and I have a Windows 8 Pro guest VM running. On my host I have an SSH tunnel open on port 1010. The SSH tunnels works great from OS X Safari once I set the SOCKS proxy to localhost:1010.

I would like to achieve the same sort of thing on my Windows 8 VM, but localhost:1010 fails to work as a SOCKS proxy. I assume this is because it's a different localhost to my host's localhost. My Windows VM is currently using NAT mode. Anyone know what I'm doing wrong?

jnthnclrk
  • 139
  • 1
  • 9

2 Answers2

3

By default the SSH client will listen on 127.0.0.1 (i.e. localhost), which can only be accessed from that machine. In order to access it from another machine (such as a VM) you need to tell your SSH client to listen on all interfaces. Modify your port forward to specify 0.0.0.0 as the gateway:

ssh -D 0.0.0.0:1010 myserver.example.com

Note that this will also allow access from any machine on the local network.

Then you need to configure Fusion to allow access to the host from the VM. This usually means using a bridged networking setup instead of NAT. The VM should then be able to access the SOCKS port using the host's IP address.

mgorven
  • 30,615
  • 7
  • 79
  • 122
0

The answer on this question solved it for me. Phrasing the issue as SSH sharing makes much more sense. This solution works well with NAT too. Specifically:

ssh -D *:1010 root@example.com

You then just need to find your host's IP on the same subnet as the VM and use the IP and port in the web browser SOCKS proxy settings.

jnthnclrk
  • 139
  • 1
  • 9