I'm used to setup a ssh proxy in the localhost like this:

ssh -fND 9999 server

I have been using it for years for daily browsing. Now I want to use the same proxy in a Windows guest in the same desktop host. The host (Fedora) is at and the guest is at But when I set the proxy as a socks5 proxy in Firefox at the Windows guest pointing it to it times out. I did open the 9999 port at the firewall. The same thing happens when setting the proxy up in another host (Centos 6) and trying to access it from my Fedora desktop. So what am I missing?

  • Are you able to otherwise access the host from the guest? ie. ping or ssh – lk- Aug 21 '12 at 20:52
  • @lk- Yes I can ping it. Didn't try to ssh as the whole point is not to use Putty. But I will try if nothing comes from this thread. – Clodoaldo Aug 21 '12 at 20:58
  • I thought this wouldn't be the issue because I misread the man page. Does it work if you use -D '*:9999' instead of -D 9999? – lk- Aug 21 '12 at 21:08
  • @lk- After some tinkering your suggestion worked. Post it as an answer and I will accept it. – Clodoaldo Aug 22 '12 at 0:09

From the description for the -D [bind_address:]port option:

By default, the local port is bound in accordance with the GatewayPorts setting. However, an explicit bind_address may be used to bind the connection to a specific address. The bind_address of "localhost" indicates that the listening port be bound for local use only, while an empty address or '*' indicates that the port should be available from all interfaces.

The default for the GatewayPorts setting is no, so omitting the bind_address part of this option argument will allow only local connections to use the tunnel. To allow the tunnel to be used from another computer, you will need to bind on other interfaces as well using ssh -fND '*:9999' server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.