samba / wfs over ssh

Here’s a useful trick for people who like using windows file share / samba outside of their LAN. This is for a windows client when you don’t want to disable windows file share on the client.

1. Run an SSH server on the samba server. Ok you’re done for the server.

2. On your windows client, create a new network connection using the “Microsoft Loopback Adapter”.

3. Disable “File and Printer Sharing” and enable TCP/IP on the adapter. Copy the subnet/gateway/dns information if you want, and set it to an IP that you don’t use, e.g. 10.0.0.1

4. Startup an ssh client like putty and tunnel 139 on the server to your loopback ip, 10.0.0.1:139

5. Now you can access your samba server through \\10.0.0.1, hooray!


About this entry