# nfs. samba, vpn.... ?



## graudeejs (Dec 21, 2009)

Hello!

Remember I told, that my family switched to GNU/Linux Ubuntu 

Well... It looks like everyone is happy.

I'd like to set some kind of file sharing service....
Mostly I want laptop users to store {as backup} important files on my FreeBSD pc...
I need this to be very easy to do... so I got to the point where I can't decide what to use... nfs, samba, some sort of vpn.

I'd like to have fast connection, easy to manage [unmount/mount...], secure....

Just found out about security/tinc
Anyone have used it?

Any thoughts recommendations?

P.S.
I don't need to share printer over net...


----------



## SirDice (Dec 21, 2009)

It's a fairly simple choice really. If it's Windows clients, go with samba. If it's *nix, go NFS. If you have both, set up both :e


----------



## mickey (Dec 21, 2009)

+1 for Samba+NFS


----------



## graudeejs (Dec 21, 2009)

Hmm, is it possible to run NFS server in jail....
Search returns: No [without some patch]

is that true?


----------



## SirDice (Dec 21, 2009)

killasmurf86 said:
			
		

> Hmm, is it possible to run NFS server in jail....
> Search returns: No [without some patch]
> 
> is that true?



AFAIK yes. The main problem seems to be that you can't bind mountd to a specific ip address. The only way to get that is to patch mountd.

You can still run it though, but it'll listen to all ip addresses.


----------



## phoenix (Dec 21, 2009)

Using shared storage is good, if you can get people to use it.  

As an alternative (or in addition to), have a look at the different Rsync for Windows clients that are out there, and consider using one of those, along with  Windows Scheduled Tasks, to do automated backups to a directory on the FreeBSD server.


----------



## phoenix (Dec 21, 2009)

SirDice said:
			
		

> AFAIK yes. The main problem seems to be that you can't bind mountd to a specific ip address. The only way to get that is to patch mountd.
> 
> You can still run it though, but it'll listen to all ip addresses.



What about the *-h* option to mountd, which is used to specify an IP to bind to.


----------



## SirDice (Dec 22, 2009)

phoenix said:
			
		

> What about the *-h* option to mountd, which is used to specify an IP to bind to.



Cool. That was added in August last year :beer

Before that you really needed to patch mountd.

So, you should be able to get it working. Provided you bind rpcbind, mountd and nfsd to a specific IP address.


----------



## graudeejs (Dec 22, 2009)

OK, I setup NFS server on FreeBSD, and mounted nfs share on Ubuntu....

Uploading from Ubuntu to FreeBSD really sux.... ~80KB/s
Downloading From FreeBSD to Ubuntu is ~600KB/s

Any ideas why it's so?
Wifi card on Laptop can upload/download at 2.5MB/s {ye it sux as well, but that's another topic}


----------



## phoenix (Dec 22, 2009)

Using UDP or TCP for NFS?  Did you specify a packet size in the mount options?  Did you specify a read-ahead amount in the mount options?

There's lots of little things you can play around with in the NFS mount options that can really affect the performance of the mount.


----------



## graudeejs (Dec 22, 2009)

Thanks for suggestion, I'll look into that


----------

