[Samba] Samba & STunnel

VIA Internet Tech Support tech.antispam at via.com.au
Wed Feb 27 09:09:03 GMT 2002

Hi everybody!

I'm trying to set up a secure samba connection across the net using 
Stunnel.  With no joy.  Any assistance would be appreciated.  (c:

I have four PC's.  My Windows PC (, my firewall ( &, the office firewall ( &, and the 
office file (Samba) server (

On my office firewall I have the following stunnel command:

/usr/sbin/stunnel -d 140 -r

On my firewall I have this command:

/usr/sbin/stunnel -c -d 139 -r

Now, the way I read this is that my firewall says - take anything on tcp 
port 139, and send it via stunnel to using port 140 - and then 
the office firewall says - take anything on tcp port 140, and send it 
unencrypted to using port 139.

I then try a map from my PC using the following "\\firewall\public", which 
is in my windows hosts file as -  firewall.  As far as I can 
see, this should give me a tcp tunnel from my firewall to the office 
firewall using port 140, with my PC sending tcp port 139 packets into the 
tunnel, and the tunnel spitting them out the other end to the Samba 
fileserver.  As far as the Samba server is concerned the packets should be 
coming from the firewall, and it is set to accept connections from 192.168.0.

So, what have I missed?  Why doesn't it work?  Have I screwed something up, 
or will this never work because Samba uses UDP or OOBC (out of band 
communications?), or something?

This seems like a great idea, secure telecommuting with fileserver and 
printer access, if only I could get it to work...


Colin Wilson.

More information about the samba mailing list