Firewalls and Remote Access to services
Often an annoying thing we come across in web development is remote access to servers. Recently we have had a project delayed while working with a 3rd party setting up a web server on site for a client. For us to access the service they have only setup FTP and SSH ports, but no HTTP ports. This would usually cause problems, the obvious being “How can we tell if the client can bring up the site?”.
We could make a HTTP GET request through our shell prompt and it would give us some results, (wget, lynx, GET commands) - but not quite the same as bringing up the page.
If we were to point our browser at their IP address, it would try to access port 80 which is firewalled. So how would we load the site in our browser?
The answer?
SSH Tunneling
A crafty tool that allows us to redirect remote IP+ports to our local machine. Meaning, whatever ports and computers you could access on the remote server, are “tunneled” to your local computer, allowing you to access them from your computer - all from 1 connection through port 22 (SSH). Virtually bypassing the firewall rules in place.
Further to make this process easier, PUTTY provides a nice utility in their settings to make this process even easier. You specify which port to forward from the external network to your local computer. You then establish a PUTTY SSH connection to the box, log in and voila, you will be able to access them on your computer.
So instead of accessing their port directly, I access my localhost:80 which pipes through SSH to their box.
I searched after for a few screenshots on how to do it, look here.





