2

votes

Vote

os-utilities in OS & Utilities Channel,
Written by: Simon Grenier on Mar 9 2010, 4:01pm

NetBIOS over SSH

I was looking for way to permit Netbios communication between two servers in different location without VPN.   

Here's what I have found, an easy way to allowed NetBios between two servers using SSH.

SSH allow you to create a tunnel between two machines and forward ports. To tunnel Netbios over SSH, you need to forwards connections on port 139 on the sharing-client machine via SSH to the sharing-provider.

Don't forget, you need to have a SSH server on you sharing-provider.

Here a simple HowTo: 

Sharing-client:

First, you will need to install and configure the Microsoft Loopback Adapter.

Control Pannel / Add Hardware

Select "Yes, I have already connected the hardware".

image 

Scroll down to the bottom of the list, select "Add a new hardware device".

image

Next, choose "Install the hardware that I manually select from a list (Advanced)".

image

Select in the list "Network adapters", click next.

image

In the right pane, select "Microsoft", left pane, select "Microsoft Loopback Adapter".

image

Then click finish.

image

Now, we need to configure the Loopback Adapter. Go back to the 

Control panel / Network Connections

Select the newly installed network adapter (You should see a new "Local Area Connection #", where # is its order number, depending on how many network connections you have).

image

Right click on the selected adapter and choose "Properties". Make sure that "Microsoft Loopback Adapter" is displayed in  "Connect using:"

image

Disable (uncheck) everything, except for "Internet Protocol (TCP/IP)", see image above.

Select "Internet Protocol (TCP/IP)" and click "Properties". On the General tab, select "Use the following IP address" set it to 

IP address: 10.10.10.10

Subnet mask: 255.255.255.0

image

On the same tab, click "Advanced". WINS tab, uncheck "Enable LMHOSTS lookup" and select "Disable NetBIOS over TCP/IP"

image

Click OK, OK, Close.

Second, you will need a SSH client. I use Tunnelier from bitvise which is a great product. Please read the License Terms before downloading. 

Install Tunnelier. Once you're done, launch it.

Login tab, insert your server information, authentication information.

image

Options tab, Reconnection section select "Always reconnect automatically". On Login section, uncheck "Open Terminal" and "Open SFTP".

image

C2S Fwding tab, Status "Enabled" Listen Interface "10.10.10.10" Listen Port "139" Destination Host "123.456.789.10" Destination Port "139", where 123.456.789.10 is your sharing-provider external IP.

image

Click "Login"

Now you should be able to access it:

\\10.10.10.10\your-share-folder

BTW, this can also be done for other ports.

Citizens Comments

Post your comment

default Avatar

You might be interested in these related contributions

SoftCity Promotion

About the Author

Simon Grenier

Sainte-Julie, Québec

12 contributions

I'm a system administrator for Linux/Unix and Windows platforms.

software social commerce