Connecting to a Samba Server from outside the department by
tunnelling Samba through ssh.
This allows you to see networked disks and printers from a Windows XP
PC outside the department as can be achieved by clicking on for example
the bell
icon from a PC inside the department.
This method makes Windows file sharing relatively safe across the
Internet as all information in transit is
encapsulated in encrypted ssh protocol. Also as bell and the UCL
firewall will accept ssh connections from outside, this is a way of
getting Windows protocol through. Normally it is blocked.
Setting it up
This assumes you are using Windows XP Service Pack 2.
If you are using Service Pack 3, don't install the Windows XP SP2 patch
described below. Service pack version is displayed under Start,
Control Panel, System.
If you don't have putty installed with version number greater than
0.56, download the latest version onto the desktop from http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
The putty version number is displayed by clicking on the putty icon and
then on the about button.
Install the Windows XP SP2 patch from http://support.microsoft.com/?id=884020 if the PC is running service pack 2.
You don't need to restart the PC yet as you will need to do
this as instructed after the following configuration.
Click on the putty icon
Enter:-
Host Name: bell.phon.ucl.ac.uk (or whatever the Internet
name is of the Samba Server)
Saved Sessions:
bell_tunnel ( or
servername_tunnell)
Click on: ssh, tunnels
Enter:-
Source port:10.0.0.1:139
Destination:127.0.0.1:139
Check:-
Local ports accept connections from other hosts
Click on: Add, Session, Save.
Under Windows XP click on
Start, Control Panel, Add Hardware
Select these options:-
Yes I have already added the hardware
Add a new hardware device
Install the hardware that I manually select from a list (Advanced)
Network adapters
Microsoft, Microsoft Loopback Adapter
Continue through the install menu to install this adapter.
Click on: Start, Command Prompt
Type in: ipconfig /all Note down addresses
displayed for Default Gateway and DNS Servers
Click on: Start. Control panel, Network Connections
Click on the icon labelled : Microsoft Loopback Adapter
Then on: Properties, Internet Protocol(TPC/IP), Properties
Check: Use the following IP address
Enter IP address: 10.0.0.1
Subnet mask: 255.255.255.0
Default gateway: address noted down from ipconfig /all
Check: Use the following DNS server addresses DNS servers:
addresses noted down from ipconfig /all
Click on: Advanced, WINS
Check: Enable LMHOSTS lookup, Disable NetBIOS over TCP/IP
Click on IP Settings
In Interface metric window enter: 9999
Click on: OK OK
Under General
Check: Client for Microsoft Networks
Uncheck: File and printer sharing for microsoft networks
OK
Close
Restart PC
To connect to Samba server bell:-
(or other samba server)
click on putty
bell_tunnel
( or servername_tunnell)
Log in to bell.phon.ucl.ac.uk via this putty connection to get the bell
Unix prompt. (or required samba server)
Under Win XP click on Start, Run
Enter: \\10.0.0.1
OK
You should get a connection to Samba server bell with a prompt to log
in. (or required samba server prompt)
If you don't
Go to Start, command prompt
telnet 10.0.0.1 139
A blank screen means that the tunnelling via ssh is working to the
samba server.
An error message probably means that putty is not connected to the
samba server
with correct tunneling configuration or loopback adapter is not
configured properly.