Hello,
While working through the details of how to resolve samba access
remotely through firewalls, I came across a posting that I would like
to share.
It basically, sets up the capability of connecting Samba through a
Putty based SSH VPN tunnel. It works well and I hope that it may be
useful to some of you.
Frank
TIM Program
Carleton University
Reference:
http://alirezabagheri.com/blog/?p=67
For Windows 7:
A different solution is required for Windows 7. You don't need a
loopback adapter to use both your Windows and Samba shares, but
instead you will have to do some service management. I have provided
steps to do this manually (based on this post), but I have also
included a script to make this process automated.
First, Disable Windows "Server" service and Reboot.
1. Right click on 'Computer', select 'Manage'.
2. Navigate to 'Services and Applications' > 'Services'
3. Locate service named "Server" and open properties.
4. Set 'Startup Type' to Disabled, and choose the "Stop" button to
stop the service.
o Important: this will stop your Windows shares.
5. Reboot your system.
Next, configure the SSH Tunnel
1. Download and Open PuTTY.
2. Using the configuration window on the left, navigate to Connection
> SSH.
3. Enable two boxes "Don't start a shell or command at all" and
"Enable Compression".
4. Navigate to Connection > SSH > Tunnels
5. For ‘Source port’, enter ‘139′. For ‘Destination’, enter ‘localhost:
139′. Click the 'Add' button.
6. For ‘Source port’, enter ‘445′. For ‘Destination’, enter ‘localhost:
445′. Click the 'Add' button.
7. Navigate to "Sessions" (the initial screen) to enter the host
information and save the connection profile (so you don't have to
reconfigure again)
8. Start Putty session.
Finally, map the network drive and resume Windows "Server" server:
1. Open 'My Computer' and choose 'Map network drive' from the menu
bar.
2. For 'Folder', enter '\\localhost\samba-folder', where samba-folder
is substituted accordingly. If required, choose 'Connect using
different credentials'.
3. Return to 'Properties' screen for windows "Server" service (as done
initially).
4. Set 'Startup Type' to Manual, and choose the "Start" button to stop
the service.
5. You can now access both your windows and Samba shares.