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?
Thanks.
Edit:
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.
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.
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.
ssh tunneling would work. connect via
ssh USER@host -L 8080:127.0.0.1:80
Now browse on your computer to 127.0.0.1:8080.
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.