Upgrading to stunnel 4
stunnel is a great tool. It allows you to encrypt TCP connections inside SSL.
And it’s available for both Unix and Windows. I use it to hide various traffic, including the cvsup
I run to update this website and the zone files on my DNS servers. See stunnel – another way to avoid plain text passwords
and stunnel – encryption and security for my previous articles.
stunnel 4.0 came out with many new improvements. Much to the annoyance
of some users, the command line paramaters changed drastically. Personally, I thought that was a good thing.
Version 4 uses a configuration file, and comes with enhanced capability. I like it.
This article will compare my old command line format with the new configuration file format. Hopefull that will help you along the way.
Note that I’ve had success in mixing v3 and v4 of stunnel. Specifically, I’ve run v4 on my clients and v3 on the server. With the success there, I’m quite sure that it would work the other way around too.
man pages – make the migration easier
If you are upgrading to version 4, you probably already have that man page. But what you may not have is the version 3 man page. I found that having the old man page greatly simplified the conversion process. Just look up the old parameter, find out what it does, then look up the same option on the version 4 man page.
How did I create these html files? Like this:
nroff -man ~/tmp/stunnel-3.22/stunnel.8 | man2html -title "stunnel(8) - version 3" > stunnel-v3-man.html
man stunnel | man2html -title "stunnel(8) - version 4" > stunnel-v4-man.html
man2htmlis in the FreeBSD Ports tree and the home page is at http://www.oac.uci.edu/indiv/ehood/man2html.html. This assumes that I had v4 already installed and that I had extracted the tarball for v3 into the
The startup scripts
This section compares the old and new startup scripts (
As you can see the old script put the parameters right in the script. I prefer the new format.
The configuration format
I will provide a one-to-one mapping for each parameter used in the above example.
That should help you get started. The configuration file is
The following is for a client.
man stunnel for more information.
A sample client configuration file
Here is the configuration file I use on my web server in order to access my webserver. The IP address hsa been changed.
One of my favourite tools