0

I have a GNU/Linux (Ubuntu 16.04) server and some GNU/Linux clients at home. All my computers are encrypted, my web server allows HTTPS only and ssh is set to key-based authentication, etc.

But when it comes to file sharing within my local network I have no clue how to setup a secure and fast infrastructure.

I don't use Windows. So instead of Samba NFS seems to be a good choice. But security by IP addresses and no encryption is a not go. OK, so NFSv4 support encryption, what do I need to do for that? It uses kerberos so I need a DNS, accurate time on all systems, FQDNs, a realm, primary KDC, secondary KDC and finally some users. This may is the overkill for my home network.

So maybe Samba? SMB3 has encryption, that's a start. But somehow it doesn't feel right.

Has anyone a good solution for my scenario?

5
  • Do you not trust your own network?
    – Daniel B
    Sep 26, 2016 at 10:32
  • 1
    With a lot a of so call "smart" devices in my network and IoT on the door step, the answer is: NO!
    – copyrights
    Sep 26, 2016 at 10:37
  • what's wrong with IPSEC? It can be used on LANs. It supports authentication and encryption Sep 26, 2016 at 17:44
  • @neil-mcguigan interesting idea. so instead of securing the service, secure the access/transport of the service. I will look into that, thx.
    – copyrights
    Sep 27, 2016 at 21:01
  • @copyrights just make sure you use IKEv2, as they found some vulns in IKEv1 recently Sep 27, 2016 at 21:19

1 Answer 1

1

you could use sshfs.

for ubuntu i believe that the package is sshfs-fuse.

do an apt-cache search sshfs and it will tell you for sure. download and install package, edit, /etc/fuse.conf, uncomment user_allow_other and then you can write up a quick script, something like this ->
sshfs -o allow_other,follow_symlinks,IdentityFile=~(WORKSTATION_USER)/.ssh/id_rsa SERVER_USER@SERVER_ADDRESS:/home/SERVER_USER/programming/share/ /home/WORKSTATION_USER/share
look at man sshfs to get an overview of what the previous line means.

or if you want you can make a systemd mount file for it to automatically mount the shared folders at boot.

something like this ->

[Unit]
Description=sshfs_mount /homedir/share

[Mount]
What=SERVER_USER@SERVER_ADDRESS:/home/SERVER_USER/programming/share/
Where=/home/WORKSTATION_USER/share
Type=fuse.sshfs
Options=allow_other,follow_symlinks,IdentityFile=/home/WORKSTATION_USER/.ssh/id_rsa

[Install]
WantedBy=multi-user.target

you'll have to put that in /etc/systemd/system/filename and then go through the process of enabling it and starting it.

the man pages for it are hard to follow, so take your time with them. you'll also want to name the file for the full path of where it's going to be mounted.

ie.../home/copyrights/share to home_copyrights_share.mount

hope this helps some
em

3
  • Thank you. You have some details about stability, performance and multi-user access? Do you use sshfs yourself?
    – copyrights
    Sep 27, 2016 at 21:14
  • i have 6 virtual machines that are linked to a shared folder so that i can test what i'm writing on different distros. i haven't had any problems with stability, yet i'm not really having to pressure test it at all.
    – emetib
    Sep 28, 2016 at 3:00
  • @copyrights, make sure that your ssh is open on the inside for your home machines
    – emetib
    Sep 29, 2016 at 15:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .