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 require access to network shares or the ability to provide network file system services for other host's network shares, it is recommended that the nfs-utils package be removed to reduce the attack surface of the system.
Solution
Run the following command to stop nfs-server.service and remove nfs-utils package:
# systemctl stop nfs-server.service
# dnf remove nfs-utils
-OR-
-IF- the nfs-utils 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:
Many of the libvirt packages used by Enterprise Linux virtualization are dependent on the nfs-utils package. If the nfs-utils package is removed, these dependent packages will be removed as well. Before removing the nfs-utils 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-utils package installed.