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 server at work which is behind a firewall (the company's firewall) so it is reachable only thrugh port 22 (SSH). I'm able to connect to the server with putty without problems.
Also, that server has Apache running and listening on port 80 as usual.
But I cant connect to the website using my browser since port 80 (and everyone else) is blocked by the company's firewall.

Is there a way I can make my browser to connect to Apache in that server so I can browse the site I'm working on?



Since I was having no success with normal SSH tunneling techniques, I thought this problem was different from all those trying to pass through firewalls (and hence I asked here).
But I was mistaken, it's the exact same situation and a normal ssh-tunnel can solve the problem.

However, what made this problem a bit different (and the reason why I was being unsuccessful) is that the remote server was also behind a NAT, so the server's real IP was a private IP, not the public IP I use to start a SSH sesion.
One I realized that I put in my browser's address bar the server's private IP and voila! It worked like a charm.

share|improve this question
Discuss your problem with your system administrator. – John Gardeniers Apr 21 '10 at 8:20
up vote 4 down vote accepted

From your edit I guess you were trying to use the tunnel as a socks proxy in your browser.
Consider, instead, using the tunnel as a one-to-one connection, i.e. making you PC to behave as a surrogate of the remote server:

On Windows use putty like this
putty.exe -L 80:localhost:80 userName@serverIp

Then navigate in your browser to http://localhost
That way you are effectively turning your PC into a surrogate web server listening on port 80.
No socks proxy configuration needed.

share|improve this answer
I can't believe I didn't know this. Guess I rarely need to get around firewalls, but this is a sweet little trick! +1 – Gomibushi Apr 22 '10 at 6:16

ssh tunneling would work. connect via

ssh USER@host -L 8080:

Now browse on your computer to

  • The port 8080 can be chosen freely.
  • in the ssh connection ist the loopbackadress of your Webserver.
share|improve this answer

I think you're looking for "ssh tunneling".

I just ...ahem... googled it and felt on this article between hundreds of others.

You might as well look at the "Related" questions on the right of this page.

share|improve this answer
Nice short article. – Gomibushi Apr 22 '10 at 6:12

Put in a request to your network team to open port 80 from your machine to that server. Make sure to state your business case for needing the port open.

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.