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.
Create a loopback adaptor at 10.0.0.1, and map ports 10.0.0.1:445 and 10.0.0.1:139 to <samba-server>:139
Prevent that the smb service grabs the 10.0.0.1:445 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 10.0.0.1 -p 445
net start smb
ping 127.0.0.1 -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 http://www.mcseboard.de/windows-vista-forum-55/vista-sambalaufwerke-108079.html
After every start, I have to start the vpn, and then the ssh connection with the forwarding.
Map a network drive to \\10.0.0.1\<share>
-> it works!
Not really easy, isn’t it?