Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

First time on here so please be gentle!

I have setup a small school network with a Ubuntu 12.04 Server for use as a fileserver mainly. I have managed to set the server up (all command line based - no GUI) and setup the Samba shares, which works really well internally. Internally, the school have a combination of Mac's and Windows machines and they can all access the shares happily.

The school has a fixed IP ADSL connection and I have added a route in the router to allow me remote access to the server using SSH (port 22). That also works well. All good so far!

What I now want to do is allow remote access to the shares. I have done a bit of reading and thought I had found the answer with SSHFS but I am still non-the-wiser.

So, my basic questions is:

  • In Windows, how can I map to the Ubuntu shares across the internet through the router?

  • In Mac OS, how can I add the remote share across the internet?

The school used to have a Windows server and the users were used to creating a VPN and then pulling up the share folders etc, but I'm unsure how to do this with the Ubuntu server. I assume I need to add another route through the router too allow for SSHFS or something similar?

Thanks in advance...

Donald

share|improve this question

1 Answer 1

Tough Question

If you have not already discerned as much, you have asked questions that have long, complicated answers and many tangents. In the recent past, it would have been fairly easy to create a PPTP VPN on Ubuntu/Linux; but, do not do this because MS-CHAP is now crack-able. And, we would never want to take the easy way out by exposing Samba directly to the Internet by opening ports for it in a router/firewall (insecure). The easy way is to buy hardware for a VPN, maybe a SonicWall, or whichever product meets your needs. Otherwise, change the way you share files over the Internet (not with SMB).

The one goal not in the question is printing. For that, use IPP (CUPS on Ubuntu). Open port 631 on your router for your CUPS server. Also keep in mind that without a VPN, we will not have RDP unless we implement software like NeoRouter, below. But, you have no VPN at the moment, so I suppose that's not a problem.

So, we have a working SSH configuration already. Why not use it for leverage? First remember to install DenyHosts, fail2ban, or some other software to make sure you are protected from brute force attacks. The server will almost certainly be attacked continually from all over the world. (If not today, give it time.) Then, you want them to point-and-click on files, right?

For Windows

So, win-sshfs creates a way to mount Windows drive letters over SSH. And, Swish adds support for SFTP to Windows Explorer.

For Mac

I cannot really comment much on this, because I do not know Mac. I know a Mac is Darwin Unix under the hood. A similar approach will likely work using perhaps MacFusion.

Something Different

NeoRouter I have never tried but have heard good things. Not only does it provide for file sharing but RDP as well.

Obtuse

We could expound on this topic for a long time. Thus, this answer is mostly obtuse. It can be quite challenging to implement an elegant solution that meets all requirements. There is so much more to it. If you are using the SFTP/SSHFS method, then it will take a little more as well. For example, file system permissions to shared directories will likely be done with ACL. Though this is not a precise answer, I hope there are enough clues to move forward.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.