OPNsense Forum

Archive => 17.7 Legacy Series => Topic started by: mausy5043 on January 27, 2018, 11:49:10 am

Title: Enable NFS client mode
Post by: mausy5043 on January 27, 2018, 11:49:10 am
I would like to be able to mount an NFS share from one of the Debian-servers (boson) on my LAN. I've added a line to /etc/fstab:

Code: [Select]
boson:/srv/array1/rbin/firebin  /home/admin/bin   nfs   rw   0   0

According to the "Hardened BSD Handbook" (https://hardenedbsd.org/~shawn/hbsd_handbook/book.html#network-nfs (https://hardenedbsd.org/~shawn/hbsd_handbook/book.html#network-nfs)) I should also activate the NFS-client. This should be done in /etc/rc.conf.

On OPNsense: I assume I should create a file in /usr/local/rc.d containing
Code: [Select]
nfs_client_enable="YES" which should override one of these settings:
Code: [Select]
$ cat /etc/defaults/rc.conf |grep nfs
netfs_types="nfs:NFS smbfs:SMB" # Net filesystems.
nfs_client_enable="NO" # This host is an NFS client (or NO).
nfs_access_cache="60" # Client cache timeout in seconds
nfs_server_enable="NO" # This host is an NFS server (or NO).
nfs_server_flags="-u -t" # Flags to nfsd (if enabled).
nfs_server_managegids="NO" # The NFS server maps gids for AUTH_SYS (or NO).
nfs_reserved_port_only="NO" # Provide NFS only on secure port (or NO).
nfs_bufpackets="" # bufspace (in packets) for client
nfsv4_server_enable="NO" # Enable support for NFSv4
nfscbd_enable="NO" # NFSv4 client side callback daemon
nfscbd_flags="" # Flags for nfscbd
nfsuserd_enable="NO" # NFSv4 user/group name mapping daemon
nfsuserd_flags="" # Flags for nfsuserd

Is that correct? Or should I create /etc/rc.conf  itself?
Title: Re: Enable NFS client mode
Post by: mausy5043 on January 27, 2018, 01:21:48 pm
I've decided to create /etc/rc.conf and add
Code: [Select]
nfs_client_enable="YES"to it.

This works and NFS mounts can be mounted after
Code: [Select]
service nfsclient start
Title: Re: Enable NFS client mode
Post by: franco on January 27, 2018, 03:11:45 pm
Never did this before but happy this works out of the box. :)


Cheers,
Franco