Archive for February, 2009

Mount Vista network drive through ssh tunnel through VPN

February 28, 2009

I can access a linux computer at my office through vpn. I want start a ssh connection and tunnel the smb port(s) to samba server (another computer at the office). Then I want to map a network drive on my laptop to the samba disk. I think I finally got it. However, Microsoft sometimes really seems to make things difficult.

My solution:

Create a loopback adaptor at, and map ports and to <samba-server>:139

Prevent that the smb service grabs the port

I have in improvement that works automatically at startup:
create the following start_smb file and put it in the autostart:

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

How to get this running with the task scheduler on startup with administrator privileges with UAC dialog is explained here:

Additinally, I had to set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Lsa\LmCompatibilityLevel to 1 (from 3). See

After every start, I have to start the vpn, and then the ssh connection with the forwarding.

Map a network drive to \\\<share>

-> it works!

Not really easy, isn’t it?