[Samba] SMB over SSH tunnel

Wojtek Bogusz wojtek at frontlinedefenders.org
Mon Aug 11 12:04:35 GMT 2008


hi. thank you for reply.
i enabled connection from firewall to windows server on 137/udp, 
138/udp, 139/udp and 139/tcp.
i tunnelled 137, 138 and 139 to windows server over SSH in putty.
i switched off 'file and printer sharing in MS network'
and it does not work? it behaves same way as i described it in my last 
email (i copy it below your email).
any help please?
regards, Wojtek

kissg wrote:
> I think, you have to enable the following UDP ports on your firewall to 
> use Samba:
> 
> - 137/udp
> - 138/udp
> 
> Also, you have to use WINS or DNS to resolve computer names, if you need 
> to. You don't have to enable any other ports to use WINS. DNS runs on 
> ports 53/tcp and 53/udp. Enable these ports on your firewall, and try to 
> connect to your share from the remote machine.
> 
> This worked for me through a VPN connection, I hope it will work for 
> you, too.

hi, i am trying to tunnel SMB over the SSH tunnel. but it does not work 
for me :-( could you advice me please?

my setup is:
- laptop with windows xp connected somewhere to internet;
- gateway-firewall (ubuntu with shorewall) with public and local network 
address;
- windows server (with local network address);

i enabled tcp connections in shorewall (firewall) from gateway to 
windows server on port 139.
i did try to do all the steps that are described in documents like 
http://www.security-hacks.com/2007/05/18/tunneling-smb-over-ssh-secure-file-sharing

i also did other option by trying to uninstall 'file and printer sharing 
for ms networks' and i try to connect to map \\localhost\folder_name 
directly and tunnel local port 139 to the windows server port 139.

it all does not work. i get either 'no path' message or i am asked about 
the user and password while 'maping the network drive' but whatever user 
& password i provide the user/password window come back on and on.

what can i try to make it work? please advice...

best regards, Wojtek


More information about the samba mailing list