Ssl

Proof of Concept: Build my own Web Provider at home (III) – Stunnel

published on

Stunnel

Please note latest versions of HAProxy can support Stunnels features with higher performance and lower complexity.

stunnel

The stunnel software is awesome. It allows you to encrypt any connection between local or remote systems. We will use it to perform the SSL Offloading for our system. This tool will take care of all the SSL encryption, releasing that burden from the web servers, because web servers are … well, web servers, not SSL managers.

We will use stunnel to:

  1. Listen for secure SSL connections on port 443 of our external IPs
  2. Manage the encryption/decryption
  3. Request (without encryption) the web page from the Web servers
  4. Send the request back to the client encrypted

 

From the Stunnel web page:

The stunnel program is designed to work as an SSL encryption wrapper between remote client and local (inetd-startable) or remote server. It can be used to add SSL functionality to commonly used inetd daemons like POP2, POP3, and IMAP servers without any changes in the programs’ code. Stunnel uses OpenSSL libraries for cryptography, so it supports whatever cryptographic algorithms you compiled into your library.

Stunnel can benefit from FIPS 140-2 certification of the OpenSSL library, as long as the building process meets its Security Policy.

Stunnel is a free software authored by Michal Trojnara. Although distributed under GNU GPL version 2 or later with OpenSSL exception, stunnel is not a community project. We retain the copyright of the source code. Please contact us for support or non-GPL licenses.

The obsolete 3.x branch is no longer maintained. Use stunnel3 perl script as a drop-in replacement for backward compatibility.

Ideally you could run your own farm of TLS/SSL Offloaders using their own hardware (in combination with a balancing  software tools like HAproxy / Wackamole / Spread  / UltraMonkey you can have your own home made High Availability Load Balancer). As mentioned before, this would allow you to release the encryption load from the Web tier.

Read More...

Proof of Concept: Build my own Web Provider at home I – The idea

published on

The idea

I’ve run web servers at home for a quite long time. I used to have my LAMP system (compiled to fit my needs) running on Slackware and it covered all my needs for many years. But during the last years I found myself running very different flavors of Application Servers and I found that my LAMP setup was not flexible enough to deal with such an heterogeneous systems.

I wanted to have a solution that would allow me to run different web servers (apache, nginx, Jetty, flask…), different Application Servers (tomcat, WebLogic, JBoss, Django, perl scripts, etc..) all of them isolated as much as possible from the others.

Since this is a home solution and I cannot afford to have a rack full of blades at home, all these services should run in commodity hardware. I’ve chosen to run it on a laptop, that gives me a UPS service (battery) although it has the drawback of not much CPU power and (most important)  not much RAM. Of course, the solution could be extrapolated to multiple machines, having the ability to grow either horizontally or vertically. But for now, this solution will be confined into a single server 🙁

My ideal solution should, if possible, cover these needs:

Read More...