3

How would I access a webserver behind a firewall? I'm developing an application for this webserver which is not yet open to the public.

Someone walked me through this before, so I know it can be done. However, it has been about four months and I haven't been able to do it again.

I'm using Putty to connect to the remote machine. From that machine I can open the site http://dev.server.address:83 using Firefox. However, I want to be able to open http://localhost:80 on my machine to see the same page.

I'm using the server address and port 83 for the "source port" I'm using localhost:80 for the "destination port"

Christopher Bottoms
  • 11,218
  • 8
  • 50
  • 99

4 Answers4

4

You need to enter "80" into Source port and dev.server.address:83 to Destination.

[And don't forget to click the "Add" button before you leave the configuration screen. If you don't click that, PuTTY doesn't actually create a tunnel. I fell for that gotcha quite a few times myself]

intgr
  • 19,834
  • 5
  • 59
  • 69
2

Have you tried using 127.0.0.1:80 instead of localhost:80? I don't use PuTTY, but when I use SSH on my machine, I have to specify 127.0.0.1 instead of localhost.

Reynolds
  • 404
  • 2
  • 11
  • Thanks for your answer. I thought that 127.0.0.1 and localhost were always equivalent (http://en.wikipedia.org/wiki/Localhost), so I wonder whey it wouldn't work sometimes. – Christopher Bottoms Nov 25 '09 at 14:56
  • I thought that too, believe me. I have no explanation as for why it isn't. – Reynolds Nov 25 '09 at 15:04
1

Do you have a webserver running on your local machine? If that is listening on port 80 http://localhost:80 wont work. Alternatively try mapping the source to a different port (12345 for eg.) and then try http://localhost:12345 in your browser.

Anand Shah
  • 14,575
  • 16
  • 72
  • 110
0

On Linux you can also make it happen with:

$ ssh -f -R 83:localhost:80 user@dev.server.address

Provided that you have an SSH account named "user".

The Finn
  • 1
  • 1