$ ./configure --with-tcp-wrappers --with-ssl=/opt/openssl
-------------------------
pid = 
client = yes

[<port serwera>]
accept = <port przekazywany>
connect = <adres zdalny>:<port serwera>
-------------------------
cert = /etc/stunnel/stunnel.pem
pid = 
client = no

[<port przekazywany>]
accept = <port serwera>
connect = <port przekazywany>
-------------------------
ssh -f -N -L <port przekazywany>:<adres zdalny>:<port przekazywany> <adres zdalny>
-------------------------
swat stream tcp nowait.400 root /usr/local/samba/bin/swat swat
-------------------------
cert = /etc/stunnel/swat.pem
exec = /usr/local/samba/bin/swat 
execargs = swat
-------------------------
swat stream tcp nowait.400 root /usr/sbin/stunnel stunnel /etc/stunnel/swat.conf
-------------------------
cert = /etc/stunnel/swat.pem

[swat]
accept = 901
exec = /usr/local/samba/bin/swat
execargs = swat
-------------------------
# stunnel /etc/stunnel/swat.conf
