Howto_Loopback

Mounting your Nikhef home directory using SSH

when Windows File Sharing is enabled

Introduction

This tutorial contains screenshots for the English version of Windows 2000/XP.

Separate instructions for the English version of Windows Vista/7 can be found

here.

A version with screenshots for the Dutch version of Windows is also

available.

To be able to mount a Windows share over SSH we will need

  • Administrator access to the local computer.
  • PuTTY v0.58+,

    which is an excellent and free implementation of SSH for Windows.

    It is assumed that you are familiar with the PuTTY user interface.

  • One real or virtual network adapter with the following properties:
    • Bound to the Client for Microsoft Networks.
    • with TCP/IP property NetBIOS over TCP/IP enabled.

    Normally you should already have such an adapter, as otherwise you

    would not be able to mount any Windows shares.

  • One real or virtual network adapter with the following properties:
    • NOT bound to the Client for Microsoft Networks.
    • NOT bound to the File and Printer Sharing

      for Microsoft Networks.

    • with TCP/IP property NetBIOS over TCP/IP disabled.

    (Don’t worry, step-by-step instructions on how to achieve this are below…)

This part of the tutorial is split into the following steps:

  1. As most people do not have a spare real network adapter in their computer,

    we will add an extra virtual network adapter by

    installing the

    Microsoft Loopback Adapter.

  2. After that, the network adapter must be properly

    configured.

  3. Then we set up a special

    PuTTY session with the right port-forwarding.

  4. Finally, we start PuTTY and mount our Nikhef home

    directory.

Installing the Loopback Adapter

To install the Loopback adapter follow these steps:

  • Go to Start->Settings->Control Panel->Add Hardware. The Hardware Wizard

    will come up:

    wizardStart

  • Click Next, after which the Hardware Wizard will attempt to find new

    devices. After a while, this screen will come up:

    isConnected

  • Select Yes, then click Next, after which you’ll see

    a new screen:

    addNewHW

    Scroll down in the list of Installed Hardware to the entry

    Add a new hardware device and select it, then

    click Next.

  • A new screen will come up:

    manualSelect

    Select Install the hardware that I manually select from a list

    and click Next.

  • Now you’ll see:

    networkAdapters

    Scroll down in the list to the entry Network adapters,

    select it and then click Next.

  • In the next screen

    msLoopback

    first select Microsoft from the list of Manufacturers

    and then select Microsoft Loopback Adapter from the

    list of Network Adapters. Finally, click Next once more.

  • Almost finished:

    readyToInstall

    This is your last chance to abort, otherwise, click Next.

  • After a while you should see:

    finished

    Click Finish to exit the Hardware Wizard.

You are now ready to configure your newly installed Loopback adapter. Even though

Windows might not ask you to, reboot anyways (heey, it’s a Microsoft OS ;-)).

From reports I’ve seen on the Internet a reboot is sometimes required for the

loopback adapter to come up properly.

Configuring the Loopback Adapter

Now that your newly installed loopback adapter is up and running we must configure

it properly:

  • Right-click on the ‘Network Neighborhood’ or ‘My Network Places’ icon on your

    desktop.

    NetworkPlaces

  • Select Properties, after which a new window will appear.
  • Choose the loopback adapter (check the column Device name to select

    the appropriate adapter) and right-click on it.

  • Again, choose Properties, after which a new window will appear

    loopProperties

    Make sure that

    • the entry Client for Microsoft Networks

      is NOT enabled, i.e. does not have a checkmark in front of it.

    • the entry File and Printer sharing for Microsoft Networks

      is NOT enabled, i.e. does not have a checkmark in front of it.

    • the entry Internet Protocol (TCP/IP) is enabled.
  • Select the entry Internet Protocol (TCP/IP), then click on

    Properties.

  • A new window will appear:

    loopPropertiesTCPIP

    Select Use the following IP address and fill in the ‘IP address’

    and ‘Subnet mask’ as above.

    It is not necessary to fill in the ‘Default gateway’ or a ‘DNS server’.

  • Click on Advanced to make the following window appear:

    loopPropertiesTCPIPAdv

    Deselect Automatic metric and fill in the value of 9999

    as the ‘Interface metric’ as shown above.

  • Click on the WINS tab:

    loopPropertiesWINS

    and select Disable NetBIOS over TCP/IP.

  • Click on OK.
  • You are now back in the main ‘TCP/IP Properties’ screen. Click OK again.
  • You are now back in the main ‘Loopback Properties’ screen. Click Close.

Configuring PuTTY

Set up a special PuTTY session with the appropriate port-forwarding:

  • Start PuTTY and create a new session or load your existing session for

    logging in on login.nikhef.nl. Choose host login.nikhef.nl

    and protocol SSH.

  • Expand the Connection->SSH menu option in the Category tree-list

    and select Tunnels.

  • Add a new forwarded port:

    puttyLoopTunnels1

    • For the Source port, fill in the IP address of your

      loopback adapter, plus the port 139. The entry field might seem

      to small for it, but it will work. If you have configured your

      loopback adapter exactly as in the previous section, then fill in

      10.255.255.1:139.

    • For the Destination, fill in beuk.nikhef.nl:139.
    • Click on Add.
  • You should now see:

    puttyLoopTunnels2

  • In the Category tree-list on the left, scroll back up and choose

    Session again. Save your session.

Putting it all together

Now that we have configured both our loopback adapter and PuTTY we can put it

all together and mount our Nikhef home directory as a Windows share:

  • Start your newly created Nikhef-PuTTY session and login on

    login.nikhef.nl as normal.

  • Make sure port-forwarding is working properly by checking the PuTTY

    event log. Select the Window menu of the PuTTY screen (top left) and

    select Event log. You should see a log similar to:

    puttyLoopEventLog

    If not, then check your PuTTY session options first.

  • Go to Start->Run and type

    \10.255.255.1user<Your-nikhef-userid>

  • You will be prompted to authenticate yourself:

    networkLogin

    For the Username, fill in the domain NIKHEF followed

    by your Nikhef-Windows userid.

    For the Password, fill in your Nikhef-Windows password, which

    might be different from the password you use to log in on

    login.nikhef.nl and press OK.

  • You should now see your Nikhef home directory in Windows Explorer!

Congratulations!

Mapping a network drive

To make life even easier it might be handy to map a network drive to your

Nikhef home directory:

  • Start Windows Explorer and choose Tools->Map Network Drive.
  • In the next screen, fill in:

    loopMapNetworkDrive"

    • Choose an available drive letter.
    • Do NOT click on Browse but type in as the Folder

      name:

      \10.255.255.1user<Your-nikhef-userid>

    • Do NOT click on Finish, click on

      Different user name.

  • In the next screen, fill in your Nikhef-Windows userid:

    connectAs

    For the User name, fill in the domain NIKHEF followed

    by your Nikhef-Windows userid.

    For the Password, fill in your Nikhef-Windows password, which

    might be different from the password you use to log in on

    login.nikhef.nl and press OK.

  • Click on Finish to complete the network drive mapping.
  • You should now see a new drive letter appear in the Folders tree-list

    in Windows Explorer. Click on it to verify that you are indeed viewing your

    Nikhef home directory.

That’s all, folks!