Archive for August, 2009

Microsoft Vista SP2 has broken SAMBA through ssh tunnels

August 12, 2009

When trying my samba connections through ssh tunnels today, port 139 could not be forwarded by putty:

2009-08-12 17:13:53 Local port 10.0.0.1:445 forwarding to lehre4:139 failed: Network error: Permission denied

I think, Vista has now also “stolen” port 139 on the loopback devices (see below for port 445). I try to grab it in my script also, before Vista can get it.

Note: I have said “I put it into autostart”. Actually, I use the “Task scheduler”, “Task Scheduler Library”, to run it at startup.

The script look now like:

# batch file to start the smb service without port 445 and 139
# Peter Steier 2009-02-28
start “bind_port_445” “C:\Program Files\nc.exe” -l -s 10.0.0.1 -p 445
start “bind_port_139” “C:\Program Files\nc.exe” -l -s 10.0.0.1 -p 139
net start smb
ping 127.0.0.1 -n 2 -w 1000 > nul
taskkill /fi “Windowtitle eq bind_port_445”
taskkill /fi “Windowtitle eq bind_port_139”

However, still does not work… I just see that port 445 is now again the problem, not port 139. I undo this change.

Following http://social.technet.microsoft.com/Forums/en-US/itprovistanetworking/thread/d30d3c98-58c5-47f6-b5a5-f5620882020d/
I create HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters\SmbDeviceEnabled = 0x00000000 (0)
Helps nothing. I delete the Key again.
However, maybe I have the solution. I check the recipe to prevent port grabbing at http://social.technet.microsoft.com/Forums/en-US/itprovistanetworking/thread/d30d3c98-58c5-47f6-b5a5-f5620882020d/#page:2 again, and see:

Go to “Device Manager” select View and enable “show hidden devices.”; Expand “Non-Plug and Play Drivers” and set “Message-oriented TCP/IP and TCP/IPv6 Protocol (SMB session)” to start on demand.

I check this – and see that it is set to “System” insted of “on demand”. I change this and reboot…
-> works! Problem solved.