| PROTOR Redhat: Setup for NFS server/client |
| Author: | Don Davies |
| Date: | 2-Apr-2003 |
Network File System (NFS) allows file systems on a server to be accessed from a client. The files to be allowed for access are defined in the file.
This file contains the file systems to be exported and the access rights to the file system. For example
/home/protor/website 192.168.0.*(ro)
will allow readonly access to any client with and IP address in the range 192.168.0.1 to 192.168.0.255 to the file system /home/protor/website.
The hosts to be allowed or denied access via NFS need to be declared in the following files
Specifically declare for each daemon any hosts to be denied. For security it is recommended to deny access to all hosts and then to explicitly allow access as required in the file /etc/hosts.allow. The hosts.deny file for this setup would look like:
portmap:ALL
lockd:ALL
mountd:ALL
rquoted:ALL
statd:ALL
Declare specific hosts or range of IP addresses to allow access to individual daemons. The following example allows access to all client with IP addresses beginning with 192.168.0. to all daemons.
portmap:192.168.0.
lockd:192.168.0.
mountd:192.168.0.
rquoted:192.168.0.
statd:192.168.0.
Having modified /etc/exports or /etc/hosts.allow or /etc/hosts.deny then the NFS daemons will need to be started (or restarted(. On the server this may also require the portmap daemon to be restarted. This is most easily done by
service nfs start or
service nfs restart and
service portmap restart
On the client system NFS will also need to be running. This can also be started by
service nfs start or
service nfs restart