HOWTO setup swat to use ssl under Red Hat Linux
written by John Newbigin
jn@it.swin.edu.au

Set up SWAT over SSL

Make sure samba-swat is installed.

# up2date samba-swat

Then run the following commands: (The # is your prompt, do not type that).

# mkdir /etc/stunnel
# chmod go-rwx /etc/stunnel/
# openssl req -new -x509 -days 365 -nodes -out /etc/stunnel/swat.pem -keyout /etc/stunnel/swat.pem
# chmod o-r /etc/stunnel/swat.pem
# echo "swat : 192.168.1.10" >> /etc/hosts.allow

Then start stunnel like this: (all on one line)

# /usr/sbin/stunnel -P /var/run/ -p /etc/stunnel/swat.pem -d 901 -l /usr/sbin/swat swat

Stunnel 4.04

For stunnel 4.04 you need to create a config file (called /etc/stunnel/swat.conf) like this:

cert = /etc/stunnel/swat.pem
pid = /var/run/stunnel.swat
service = swat

[swat]
accept = 901
exec = /usr/sbin/swat
execargs = swat
TIMEOUTclose = 0

And run stunnel like this

# /usr/sbin/stunnel /etc/stunnel/swat.conf


Last modified 20031216.
Maintained by John Newbigin http://uranus.it.swin.edu.au/~jn