[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I access a forwarded port on Box A from Box B?

Richard Bronosky wrote:

>So, I have a machine behind a firewall on a remote network that is
>reverse port forwarding to a machine with my home network via:
>ssh -p 2222 -N -R 8080:localhost:80 bruno@myhomemachine

>On myhomemachine I can surf to http://localhost:8080 and I get the
>content from the machine behind the remote firewall.  All is well.

>Now I want to get to that content on the remote firewalled network
>from myotherhomemachine.  Unfortunately, http://myhomemachine:8080
>doesn't work.

When you set up the tunnel, the endpoint on myhomemachine is bound to the
loopback interface. If instead you use "-R *:8080:localhost:80", then the
endpoint will be bound to all interfaces - then http://localhost:8080
and http://myhomemachine:8080 will work. Or you could just bind it to
the ethernet interface with "-R myhomemachine:8080:localhost:80" and then
only http://myhomemachine:8080 will work, but not http://localhost:8080.

Reply to: