Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

There is a web service that I am accessing, unfortunately, I can't paste the uri here because it is inside of an internal network and wouldn't do us any good here. The web service works great but the problem is the maintainers of it only support http and have no intentions of implementing https.

So, my question is... is there any way to force encryption without being able to use https? I imagine an SSH tunnel would be quite effective but I'm not sure how to implement it in this situation.

Any ideas?

share|improve this question
Do you have control over the system it's running on? – Shane Madden Mar 15 '11 at 20:08
Setup an HTTPS to HTTP service on the box or in front of it with stunnel.… – Zoredache Mar 15 '11 at 21:01
@shane Unfortunately, I don't have control over the web server, otherwise, I wouldn't be trying to MacGyver this situation. – jonyamo Mar 16 '11 at 1:44
@zoredache stunnel sounds exactly like what I'm looking for, but I'm still trying to figure out how to apply it to my situation. – jonyamo Mar 16 '11 at 1:46

SSH tunnels are quite simple. Just make sure the firewall doesn't allow HTTP out (it would render the tunnel pointless) and does allow SSH out.

Then it's just a matter of tunneling localhost:80 (or whatever the port is) to a local port for you.

Here's an example if your computer runs *nix:
ssh -L 8080:localhost:80 -fN

This will work assuming the ssh server is the same as the web server, if it is not, use the web server's ip instead of localhost. The -fN puts the tunnel in the background, freeing up the terminal again.

Once the tunnel is up, you can browse the server on localhost:8080 on your computer.

If you are on a Windows machine, use something like PuTTY. Here is a good how-to with screenshots.

share|improve this answer
I don't have SSH access to the web server, so, unless I'm mistaken I would imagine that kills the SSH tunnel idea. But, you saying the SSH server may not necessarily be the same as the web server is throwing me off. If I don't SSH directly to the web server doesn't that render the encrypted tunnel pointless? – jonyamo Mar 16 '11 at 1:41
If you can't access the web server using anything other than HTTP, you cannot encrypt the traffic as it leaves the webserver. You could encrypt it on some intermediary machine that you have shell access to, if that would be helpful. – sciurus Mar 16 '11 at 2:32

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.