Configure data to be available through NFS
Author: name contact BSD flavour
Reviewer: Cezary Morga cm@therek.net FreeBSD
Reviewer: name contact BSD flavour
Concept
Be aware of the utilities associated with NFS and the security risks associated with allowing RPC through a firewall. In addition, be able to configure a NFS server or client according to a set of requirements on the data to be made available.
Introduction
To configure NFS server to start automatically on system boot on FreeBSD add to /etc/rc.conf
file:
""rpcbind_enable="YES"
""nfs_server_enable="YES"
""mountd_flags="-r"
You may add to mountd_flags
the -p 800 to restrict mountd to listen on given port.
To configuring NFS server on OpenBSD add to /etc/rc.conf
or /etc/rc.conf.local
:
""portmap=YES
""nfs_server=YES
Manual boot:
Examples
Sample /etc/exports
configuration file:
""/home/exports -network 192.168.112.0 -mask 255.255.255.0
""/usr/local/www -maproot=0 myhost.mydomain.org
Practice Exercises
More information
exports(5), nfsd(8), mountd(8), rpcbind(8) or portmap(8), rpc.lockd(8), rpc.statd(8), rc.conf(5) and mount_nfs(8)