|
For those with Linux Servers I am sure that you have an SSH server setup. So when you transfer files you can use SCP or SFTP. But what about doing Samba over SSH? And especially if you are using a Windows environment. Port forwarding in SSH works for many applications but what about Samba? Forwarding port 139 for 127.0.0.1 some how or rather does not seem to work. Read on....
SSH is fantastic, it is probably the most fantastic piece of software running in Linux. Of course the rest is good. But SSH takes the cake. You can practically forward any of your local ports to remote hosts or servers from your ssh server or even to the ssh server machine itself. Lets forward Samba traffic with a few tricks in Vista The first problem we have to deal with is forwarding port 139 on the localhost. Windows is always using port 139 on the local windows computer so forwarding port 139 will not work. What you have to do is you need to create a windows loopback adapter and then give an ip address let say 10.0.0.1 Ok First up lets install the loop back adapter 1. Go to your device manager and add legacy hardware 
2. Choose to manually install the driver 
3. Select Microsoft and the Microsoft loop back adapter 
4. Later select the loop back adapter and change the ipaddress, In this case I use 10.0.0.1 

Next you have to configure putty to forward port 139 to your server. If you try connecting now you will notice that you will not be able to connect to your Samba server. Well the trick is you have to also forward port 445, doing this will do the trick. Take a look at my putty configuration: 
In your source port key the address of your loopback adapter with the port you want to forward (e.g. 10.0.0.1:139) dont worry about the size of the field. Then next add the target server you want to forward to (My samba server is 192.168.1.2:139). Do the same for port 445. After you do this Viola everything works... just access the Samba share like a regular windows share. To be able to have the convenience of accessing Samba share in windows, five cool smilies...     
Hope this tip helps!! Add as favourites (25) | Quote this article on your site | Views: 40332
Powered by AkoComment Tweaked Special Edition v.1.4.6 |