Table of Contents

Network Services Overview: NFS

General Information

This page covers the Network Services objectives, specifically for NFS.

Network Services Objectives


Lab Setup

The following virtual machines will be used:


Install the packages needed to provide the service

Install the service

yum install nfs-utils

Configure SELinux to support the service


Use SELinux port labeling to allow services to use non-standard ports

Configuring the <service-name> with a non standard port and allowing port access with selinux.

NOTE: “man semanage-port” has examples for allowing non-standard ports!


Configure the service to start when the system is booted

Check Current Service Status

systemctl status nfs-server


Enabling a service to start on boot

systemctl enable nfs-server

Configure the service for basic operation

Enable and Start the service

systemctl enable nfs-server
systemctl start nfs-server

Configure host-based and user-based security for the service

Firewall

Allow access through the firewall to the NFS service

firewall-cmd --permanent --add-service=nfs
firewall-cmd --reload


Allow access through the firewall to allow the showmount command from clients to work

firewall-cmd --permanent --add-service=rpc-bind
firewall-cmd --permanent --add-service=mountd
firewall-cmd --reload

Host Based

Configure host based access in /etc/exports

/data-share  *.example.com(ro)
 
/data-share2  192.168.1.0/24(rw)

Export modifications

exportfs -var

User Based

Default NFS security (sec=sys) is via IP addresses or hostname.

Kerberos can be used to provide user authentication to NFS services.