Network Information Service (NIS) B.11.31.04 Administrator's Guide

where:
IP_address specifies the Internet address of an NIS client, NIS slave server,
or the subnet that requests NIS information or transfers NIS
maps from the NIS master server.
address_mask indicates the important bit fields in the IP_address.
If a bit is set in the address_mask field, the corresponding
bit in the source address of any incoming NIS requests must
match the same bit in the IP_address field.
Example 4-1 Allowing a Specific Client to Access the Slave Server
Example 4-1 provides information about how to allow specific clients to access the
slave server.
The following entry from the /var/yp/securenets file allows only the NIS
client, at IP address 20.21.12.15, to request information from the NIS slave server:
255.255.255.255 20.21.12.15
Each bit is set in the address mask. Only the host with IP address 20.21.12.15 is
allowed access to the NIS slave server.
Example 4-2 Allowing Selected Clients on the same Subnet to Access the Slave Server
Example 4-2 provides information about how to allow selected clients on the same
subnet to access the slave server.
The following entry from a /var/yp/securenets file allows any host on the
20.21.12.0 network, to request NIS information or transfer NIS maps from the slave
server:
255.255.255.0 20.21.12.15
The last eight bits in the IP address are ignored because the last eight bits of the
address mask are set to 0. Any host whose subnet ID is 20.21.12 is allowed access
to the NIS slave server.
3. Restart the ypserv process:
# /sbin/init.d/nis.server stop
# /sbin/init.d/nis.server start
For more information, see securenets (4).
50 Configuring and Administering an NIS Slave Server