## Configure data to be available through NFS ##

[Author](authors.html): _name_ _[[contact]]_ _[[BSD_flavour]]_

[Reviewer](technical_reviewers.html): Cezary Morga cm@therek.net FreeBSD

[Reviewer](technical_reviewers.html): _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)


