English 中文(简体)
How can I set up SSH tunneling to access a webserver behind a firewall?
原标题:

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"

最佳回答

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]

问题回答

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.

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.

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".





相关问题
ssh issue in a loop

I have a script that connects to a server using ssh. While in a loop, it fails to connect to the second server after connecting to the first one. I guess I have to quit from that server to come back ...

Python SSH paramiko issue - ssh from inside of ssh session

import paramiko client = paramiko.SSHClient() client.load_system_host_keys() ip = 192.168.100.6 client.connect(ip, username= root , password= mima ) i, o, e = client.exec_command( apt-get install ...

Trying to get a terminal to work in Emacs

I ve been having a lot of problems with emacs and trying to get the terminal to work with: M-x term I installed cygwin and I fixed up my .emacs to include the paths: (setenv "PATH" (concat "...

How can I debug a Perl CGI script?

I inherited a legacy Perl script from an old server which is being removed. The script needs to be implemented on a new server. I ve got it on the new server. The script is pretty simple; it ...

ActionScript 3 and SSH

Is there a library for SSH in ActionScript 3? If not, I d appreciate some ideas on how to have Flash integrate with SSH. I have a Flash prototype programmed out, and my client wants to see some ...

Solving thread cleanup on paramiko

I have an automated process using paramiko and have this error: Exception in thread Thread-1 (most likely raised during interpreter shutdown) .... .... <type exceptions.AttributeError >: ...

how to use ping in a script

I want a bash script that ll do: for c in computers: do ping $c if ping is sucessfull: ssh $c check something done If I only do ssh and the computer is iresponsive, it takes forever ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

热门标签