FreeBSD 11.3 mount network share

I would like to mount network share folders (Synology NAS, and Windows 10) from my FreeBSD 11.3, is mount_smbfs the only way?

but it seems mount_smbfs still only support SMBv1, any alternative way to mount them in SMBv2 / SMBv3?

would installing samba4 on FreeBSD help?

Thanks
 
I have a Gluster-Volume running on 2 servers with 4 HD's in total, exported via Samba410 as a network-share.
I mount it with cifs in my fstab (not smbfs). I've seen working mount-examples with fusefs, but that didn't work for me for a reason (permissions)
 
Maybe, I will check it. If so, is below correct?

Assume 192.168.1.123:/usr/local/downloads is the share folder I need to mount:
Code:
echo 'nfs_client_enable="YES"' >> /etc/rc.conf

service nfsclient start

mkdir /mnt/test

mount -v 192.168.1.123:/usr/local/downloads /mnt/test


I have seen someone on Internet using below, but not sure whether it is necessary:
Code:
mount -t nfs -o nfsv3,nolockd 192.168.1.123:/usr/local/downloads /mnt/test
 
thanks all, btw, how to mount window share? I have tried below but no luck...

192.168.1.123:/share is the share folder on win10, it's set to share to Everyone (i.e. any users)

Code:
mount -v 192.168.1.123:/share /mnt/test

do I need to set something on win10 first? any hints is welcome
 
On Windows SMBv1 has been turned off completely. You can turn it back on but I really don't recommend doing that because there is malware abusing the issues inherent with SMBv1 (which is why Microsoft turned it off).

And it looks like you're trying to NFS mount an CIFS/SMB share, that's not going to work for obvious reasons.
 
thanks all, btw, how to mount window share? I have tried below but no luck...

192.168.1.123:/share is the share folder on win10, it's set to share to Everyone (i.e. any users)

Code:
mount -v 192.168.1.123:/share /mnt/test

do I need to set something on win10 first? any hints is welcome
It's also in the Link: Do you have Password-authentication turned off on your Windows-Machine?
 
It's unfortunate, but FreeBSD is currently not usable as an SMB client. AFAIK, mount_smbfs is the only option you have, and as SBMv1 is dead in practice, there's no use ...

The only sane option ATM is to use NFS instead. Windows servers support NFS, for other Windows systems, you can install 3rd party NFS services.
 
Here seems to be a workaround using gvfs
See this quote from the thread over there:
So, everything OK? Not quite. The performance of the chain fuse->gvfs->smb is very poor. If you have many small files - like I have with a Maildir - you wait ages for file operations to be finished.

Now I ended up using sshfs. It is also a fuse based filesystem, but a lot faster than using gvfs (which seems to be the bottleneck in the chain mentioned above).
Doesn't sound like a workaround to me. If even sshfs works faster, this must pe practically unusable.
 
That would be nice ideed! I guess, as always, "somebody has to do it" ;) For me personally, it was much simpler to provide my shares via NFS as well, so Windows clients use SMB and FreeBSD clients use NFS.
 
I would enable SMBv1 on your Windows machine but use the firewall to block it (port 139 and 445).

(Actually, on Windows block everything but the programs you need, then you can avoid the telemetry and consumer "updates", creating a much more deterministic and secure install).

Set up a SSH server on your windows machine and allow it through the firewall (port 22 incoming).

Now to connect, first set up a tunnel to your server:
$ ssh -L1445:localhost:445 <your_ip>

You can now use mount_smbfs on localhost, like it was on your server.

# mount_smbfs //<username>@localhost:1445 <mountpoint>

Remember to use the gpedit.msc firewall instead of the normal one because programs can change the normal one and allow their DRM/telemetry through.

If you set up SSH with passwordless access (priv/pub keys) and you might as well do the same with your SMB server because only local users (or authenticated SSH users) can now access it, you can create a script to mount it at start up.
 
I wanted to add the NFS shares are a no-go for Synology volumes when encrypted. Given that, plus the fact that smb doesn't seem to work in FreeBSD, and every fusefs project that I tried failed silently, we seem to be SOL for mounting synology shared folders on FreeBSD.
 
Back
Top