Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a remote machine at with sshd listening to port 1234 and a web service at port 5678.

For some reasons, I want to 'localize' the http requests to that web service.

When I execute

ssh -L -p 1234 -N

On the local machine (, I can view the web service by navigating to:


However, if I point the browser to:

I get error (Error 102: net::ERR_CONNECTION_REFUSED if that makes any difference).

Is there a way to make the ssh port forwarding available under ip address rather than localhost?

I need it in order to have the remote service available for other computers on the LAN (

share|improve this question
up vote 2 down vote accepted

I just found this SSH port forwarding

ssh -L \* -p 1234 -N

is the way to go

share|improve this answer

When using remote port forwarding, ensure that sshd_config on server has gateway ports enabled (GatewayPorts yes). Otherwise sshd will ignore the bind interface and only bind on localhost

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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