3.5.1.4 NIS - restrict NIS server communication - review contents

Information

If NIS must be used in the environment, limit access to the NIS data to specific subnets.

Rationale:

By default the NIS server will authenticate all IP addresses if the /var/yp/securenets file does not exist, or exists without any subnets defined. The /var/yp/securenets file contains a list of subnets that are considered trusted and are allowed to access NIS data using the ypserv and ypxfrd daemons. This is a user-created file that resides on a NIS master server and any slave servers. Without configuring this file, anyone with knowledge of the NIS server address and the domain name, can obtain NIS served data, including the contents of the /etc/passwd file. Hence, it is recommended that the /var/yp/securenets file is configured to restrict access.

Solution

Create and secure the /var/yp/securenets file (if it does not already exist):

touch /var/yp/securenets
chmod u=rw,go= /var/yp/securenets
chown root:system /var/yp/securenets

Edit the file:

vi /var/yp/securenets

Add the allowed subnets:

255.255.255.0 128.311.10.0

NOTE: The format of the file is netmask netaddr as shown in the example above. Explicitly define all valid network subnets (one entry per line).
Stop and start NIS to implement the configuration changes:

stopsrc -g yp
startsrc -g yp

Default Value:

N/A

Additional Information:

Reversion:

Remove the /var/yp/securenets file:

rm /var/yp/securenets

See Also

https://workbench.cisecurity.org/files/4119

Item Details

Category: CONFIGURATION MANAGEMENT

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

Plugin: Unix

Control ID: 6a6a56f5622b172498f853c83c3df495c226f609987b9f8a8c52ffb9d32c4722