Stunnel in client mode
Stunnel is a quick way on taking a non ssl connection and being able to wrap it in ssl for security
stunnel version 4 – Fedora 12/RHEL 5.3 /Centos 5.3
vim /etc/stunnel/stunnel.conf
add in
client=yes [gmail] accept = 127.0.0.1:50000 connect = mail.google.com:443
then run
stunnel
stunnel version 3 – Ubuntu 8.10 (I haven’t used newer versions)
Ubuntu 8.10 has 2 versions of stunnnel: stunnel3 and stunnel4. They have created a symbolic link from /usr/bin/stunnel -> /usr/bin/stunnel3
If you would like to use version 4 you can use the command stunnel4 otherwise if you wish to use the default version, you will need to create a self signed certificate
openssl req -new -x509 -days 3650 -nodes -out /etc/stunnel/stunnel.pem -keyout /etc/stunnel/stunnel.pem
Then to start stunnel use the following command
stunnel -c -d localhost:50001 -r mail.google.com:443