Skip to content Skip to navigation

How to Mount Rutgers Microsoft or Samba Fileserver Securely from Home for MacOS X

By Hanz Makmur - LCSR Computing Facility Rutgers University

 

Last Modified: June 4, 2009

 

Scenario:

You have files sitting on Microsoft fileserver or Samba fileserver that can be accessed only from inside Rutgers. You want to be able to mount this fileserver shares securely on your home computer via your DSL or Cable modem service.

 

Solution:

MacOS X client versions starting from 10.1 include a client for Windows networks. As a result, this is can easily be done by setting up a secure encrypted tunnel via your unix account on a machine such as eden.rutgers.edu or rci.rutgers.edu and use it as a router to fileserver whose volume you would like to mount. The method we will be using is known as local port forwarding.

 

Client for WindowsTuneling Setup for home computer running MacOS X

 

To setup your MacOS X computer to access windows fileserver at Rutgers, do the following:

  1. Set up a Secure Tunnel to Your Fileserver
  2. Mount the Fileserver securely.
  3. Unmounting Volume and Closing the Tunnel

 

1. Set up a Secure Tunnel to Your Rutgers Samba or Microsoft Fileserver

 

First we have to establish a tunnel to the Rutgers fileserver that we would like to access. Use the following steps to setup the tunnel:

a.        In MacOS X, run the terminal program by double clicking on it. The Terminal program is located in Applications/Utilities/Terminal
 

Figure 1.

 

b. A terminal window will open. In the prompt type the following line:

% su

and you will be asked for root password. Enter the password. This is required because you are opening privilege port (ports below port 1024.) Next type the following at the prompt to establish a secure tunnel for the fileserver.

 

% /usr/bin/ssh -N -L 139:jetli.rutgers.edu:139 username@eden.rutgers.edu

and you will be ask for a password. Enter your eden.rutgers.edu password here. On a successful tunnel, nothing will happen on the screen as if the connection is waiting for something. This is the correct behavior.

 

Details of options to the above ssh command:

-N

tells ssh to only handle tunnel, you do not want a shell on this host

-L

specifies the kind of tunnel (Local port forwarding)

139

the local port we will use to connect

jetli.rutgers.edu

The fileserver we would like to mount

139

the server port where the service is running

Username

the username you want to connect as.

eden.rutgers.edu

the ssh server you will use as the gateway to the service

 

  1. Now you are ready to mount the fileserver volume from your MacOS X machine.

 

2. Mount the Microsoft or Samba Fileserver Securely.

 

Now that a secure tunnel have been established between your home MacOS X computer and the Rutgers fileserver via eden.rutgers.edu, we can securely mount a Rutgers restricted fileserver onto the desktop of your home computer. Just like being in your office, to mount a fileserver (in this example: JETLI.RUTGERS.EDU), you must have an account on the fileserver. Do the following to mount the fileserver securely:

 

a.        Go to the Finder by clicking on the desktop . Next click the GO menu and select Connect to Server as shown in Figure 2. A Connect to server window will open as shown in Figure 3.

 

 

b.       In the Connect to Server window, as shown in Figure 2, enter the following in the address field
smb://127.0.0.1/username or smb://127.0.0.1/sharename. In this example we enter: smb://127.0.0.1/makmur where makmur is the sharename on the server.

 

Figure 2.

 

c.        Click the Connect button to connect to the fileserver. An authentication window will open and ask you to enter Workgroup/Domain, Username and Password to access the fileserver as shown in Figure 3.

 

Figure 3.

 

d.       After you enter the required authentication information above, click the OK button.

e.        On a successful authentication, you will the fileserver share mounted on your computer�s desktop as shown in Figure 4.

 

Figure 4.

 

3. Unmounting Volume and Closing the Tunnel

To unmount the mounted network volume shown in Figure 4, click on the icon of the mounted volume and select Eject from the File menu. To remove the tunnel, press control-c on the session window as shown in figure 1 and steps 1a above.

 

This completes the instruction on How to Mount Rutgers Microsoft or Samba Fileserver Securely from Home for MacOS X. If you have any questions, please contact HelpDesk