next up previous contents
Next: rc.local Up: Additional Configuration Previous: Anonymous FTP and

NFS Configuration

All the required NFS deamons are started at boot time by default, but the portmapper which controls access to NFS services, utilizes the /etc/hosts.allow and /etc/hosts.deny files for access control. The default installation enables all portmap service requests, but you may wish to disable or restrict such services. To do so edit /etc/hosts.allow and use portmap: <pattern> lines to control connections to portmap. In order to avoid deadlocks, the portmap program does not attempt to look up the remote host name or user name, nor will it try to match NIS netgroups. The upshot of all this is that only network number patterns will work for portmap access control. For example to allow all hosts in the redhat.com domain (whose network address is 199.183.24.0), you would add the following line to /etc/hosts.allow:

portmap: 199.183.24.0/255.255.255.0

See the hosts_access(5) and rpc.portmap(8) man pages for complete access control details.

To actually export a filesystem edit /etc/exports. For example,

/mnt/rhscd            *.redhat.com(ro)
/mnt/cdrom            *.redhat.com(ro)

allows hosts matching *.redhat.com to mount /mnt/rhscd and /mnt/cdrom read-only. After editing /etc/exports you will have to kill and restart the rpc.nfsd and rpc.mountd daemons so they will load the new configuration. This can be done by issuing:

/etc/rc.d/init.d/nfs stop
/etc/rc.d/init.d/nfs start

See the exports(5), rpc.nfsd(8) and rpc.mountd(8) man pages for complete NFS configuration details.



Marc Ewing
Mon Jun 19 17:22:10 EDT 1995