File Server on my LAN

Here you can discuss every aspect of Debian. Note: not for support requests!

File Server on my LAN

Postby coppolino97 » 2020-05-10 08:35

Hi guys,
I have a computer and I want use it as home server.
On this home server I would create a file server.
Samba or FTP? :?

My main question is:
what do you suggest about file server?
I would install a solution that permit me to create a "central point" in my LAN to share and save file.
I would that device in my LAN can easy share file using it and I would reach them remotely, maybe even without a VPN.
In my opinion FTP could be the right solution, what do you sugget about it?
I have different devices with different operating system.

Thanks so much! :D
HP Elitebook 840 G3 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 10
coppolino97
 
Posts: 66
Joined: 2018-06-05 15:23

Re: File Server on my LAN

Postby andre@home » 2020-05-10 17:29

When you want to reach the fileserver from outside without a VPN using a FTP is not very safe.

There are several options, so far (since 2011) I use Webdav with https/ port 443.
Under MacOS you can easily mount the server disk as a local drive.
Linux too.
For Windows the easiest option is the last free version of Netdrive (V1.3).

In the router you need to port forward port 443 to your webdav server to be able to reach it from outside.
There are many configurations examples around.
But just find some reading on webdav.

What Debian version do you use?

For Debian 9:
https://www.hiroom2.com/2017/06/23/debi ... ll-webdav/
andre@home
 
Posts: 386
Joined: 2011-10-02 08:00

Re: File Server on my LAN

Postby coppolino97 » 2020-05-10 20:13

Hi @andre@home,
I have Debian 9 on this computer.
Thanks for your suggestion!

What do you think about FTPS?

Best regards
HP Elitebook 840 G3 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 10
coppolino97
 
Posts: 66
Joined: 2018-06-05 15:23

Re: File Server on my LAN

Postby andre@home » 2020-05-11 04:50

Only SFTP is the safest FTP-protocol.
FTPS does not have imho the end-to-end encryption, imho I would never use it.

https://www.ssh.com/ssh/sftp/
SFTP support this list of operation see link. So not all.

Using WebDAV you get in principle all the operations you have using the file manager, the one you prefer.
I like that very much as I can do all the operation I'm used to.
Never got a problem since I'm using it since 2011... so 9 years without complications.

I was inspired in those days by a Frenchman:
http://www.bernaerts-nicolas.fr/linux/7 ... bdav-share
This one is outdated now.

I'm now busy with upgrading our server to Debian 9 or 10 or a Debian-based light version like and Bunsenlabs seems very interesting, and I can use the configuration files of Debian 9/10 directly.
I'm in the test phase in a Virtual Machine. I will publish my final experiences incl the configurations on the relevant site (here or Bunsenlabs) asap.
It has become even simpler to install webdav that my version based on the French one.

Setup up the VM and webdav takes me less than half an hour....
When I'm ready with my comparison of light distros (Debian based), I will choose the best one and install it on my 2 real servers.

If you're interested in this WebDAV setup, please wait a short time... or of course find out your self or use SFTP..
andre@home
 
Posts: 386
Joined: 2011-10-02 08:00

Re: File Server on my LAN

Postby arzgi » 2020-05-11 14:25

I was going to suggest curlftpfs or like, but the requirement to serve different OS's changes the game.

Have no experience of WebDav. FTP is very poor choice, as andre@home told, it sends passwords as readable text.

Samba, which I also have not used could be one solution, it's been around, so plenty of info available. Also some samba threads here at the forum.

Web based solutions as WebDav might be simpler to setup.
arzgi
 
Posts: 635
Joined: 2008-02-21 17:03
Location: Finland

Re: File Server on my LAN

Postby andre@home » 2020-05-11 15:02

Samba has some issues as Samba V1 is depreciated in e.g. Windows 10.
FTP sends the password unprotected, so a no go area.
SFTP : if you like it , its OK. There are clients for all platforms I guess.
WebDAV is as what I described. I only use it with Apache webserver, but should be possible with others. There are clients for all platforms or you can just mount it.... and use your favorite file manager... 8)
andre@home
 
Posts: 386
Joined: 2011-10-02 08:00

Re: File Server on my LAN

Postby coppolino97 » 2020-05-11 21:36

Hi,
Thanks for you replies.
I have never evaluated WebDav, after some research it is interesting!
SFTP is a good option too due to is based on SSH.
After that, if I am right, WebDav and SFTP need just one TCP port on firewall configuration.

Finally, I would that smartphone can use this file server. My smartphone is Android based.
Is WebDav more easy to use than FTP to share files on smartphone?

Thanks :)
HP Elitebook 840 G3 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 10
coppolino97
 
Posts: 66
Joined: 2018-06-05 15:23

Re: File Server on my LAN

Postby andre@home » 2020-05-11 22:36

Yes, most servers need port forwarding in the router and open port 443 (1x TCP), to be accessed thru the HTTPS protocol.
And if your server has an own firewall you need to open that port too via iptables or nftables.

Both on my Iphone 5S and my Samsung TAB A1 0.1 (Android) I use Webdav Nav lite.
https://play.google.com/store/apps/deta ... lite&hl=en

As a lot of my sons data for work are there, I have installed a VPN at home last year, just for some extra safety.
That VPN I also use for Wi-Fi on public places. This was one of the the main reason, so I do not have to bay a commercial VPN membership.
The building of it was very nice, on a Raspberry Pi (RPI).
With Pi-Hole it also adds add-blocking for all our systems, another main goal.

https://www.zwiebelfam.nl/en/raspberry-pi-3/
https://www.zwiebelfam.nl/vpn-verbinding/?lang=en
It works now for 1.5 year without problems.

The RPi is just an extra, not necessary for WebDAV it self as we never had any problems with it.

I never tried SFTP, so I cannot share experiences on that.

Good luck with making up your decisions.
andre@home
 
Posts: 386
Joined: 2011-10-02 08:00

Re: File Server on my LAN

Postby coppolino97 » 2020-05-15 07:22

Hi andre@home,
thanks so much for your help!

Best regards
Federico
HP Elitebook 840 G3 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 10
coppolino97
 
Posts: 66
Joined: 2018-06-05 15:23

Re: File Server on my LAN

Postby Zoot » 2020-05-17 13:22

The best option is not to open up ports to the outside world if you can, or just open up the bare minimum.

My home server (which is powered by Buster) has a Samba server that shares my media library out over my home LAN. It also runs an OpenVPN Access server installed in a Stretch Virtual Machine that runs via KVM/Libvirt.

If I want to access it from outside the house, I can just connect to the OpenVPN server and then I can access it as normal. All of the traffic is encrypted and it saves me having to open up lots of ports to the outside world, all that's required is UDP on Port 1194. An even better option is to get a router that can host an OpenVPN server itself, but that option isn't available to me.

There is a version of OpenVPN in the Debian repos, but I went with the Access server (there's an official repo for Buster & Stretch on the OpenVPN website) since it has a nice Newbie-friendly WebGUI to manage everything.
User avatar
Zoot
 
Posts: 137
Joined: 2010-01-12 15:27
Location: Ireland

Re: File Server on my LAN

Postby andre@home » 2020-05-24 12:22

When I'm on a trusted network I mostly take webdav directly else I can use OpenVPN too.
The advantage of having at least also webdav, I can under problem conditions download files via the browser (https) as the last way to get to the data.
I would never expose SMB to the WWW..... it cannot do https over 443.
Only this:
https://www.varonis.com/blog/smb-port/
So your VPN is a good choice to use SMB.
andre@home
 
Posts: 386
Joined: 2011-10-02 08:00


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable