2.1.9 Ensure network file system services are not in use

Information

The Network File System (NFS) is one of the first and most widely distributed file systems in the UNIX environment. It provides the ability for systems to mount file systems of other servers through the network.

If the system does not export NFS shares, it is recommended that the nfs-kernel-server package be removed to reduce the remote attack surface.

Solution

Run the following command to stop nfs-server.service and remove nfs-kernel-server package:

# systemctl stop nfs-server.service
# apt purge nfs-kernel-server

- OR -

- IF - the nfs-kernel-server package is required as a dependency:

Run the following commands to stop and mask the nfs-server.service :

# systemctl stop nfs-server.service
# systemctl mask nfs-server.service

Impact:

There may be packages that are dependent on the nfs-kernel-server package. If the nfs-kernel-server package is removed, these dependent packages will be removed as well. Before removing the nfs-kernel-server package, review any dependent packages to determine if they are required on the system.

- IF - a dependent package is required: stop and mask the nfs-server.service leaving the nfs-kernel-server package installed.

See Also

https://workbench.cisecurity.org/benchmarks/18960

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6, 800-53|CM-7, CSCv7|9.2

Plugin: Unix

Control ID: e4e29e905e4a89ccc1d8060dba2cdd9f310c3bd8eaf274bad8cc50b15ad16222