SECURENETS(4) | File Formats and Configurations | SECURENETS(4) |
/var/yp/securenets
The format of the file is as follows:
Both ypserv(1M) and ypxfrd(1M) use the /var/yp/securenets file. The file is read when the ypserv(1M) and ypxfrd(1M) daemons begin. If /var/yp/securenets is present, ypserv(1M) and ypxfrd(1M) respond only to IP addresses in the range given. In order for a change in the /var/yp/securenets file to take effect, you must kill and restart any active daemons using ypstop(1M) and ypstart(1M).
An important thing to note for all the examples below is that the server must be allowed to access itself. You accomplish this either by the server being part of a subnet that is allowed to access the server, or by adding an individual entry, as the following:
hosts 127.0.0.1
If individual machines are to be give access, the entry could be:
255.255.255.255 192.9.1.20
or
host 192.0.1.20
Example 2 Access for a Class C Network
If access is to be given to an entire class C network, the entry could be:
255.255.255.0 192.9.1.0
Example 3 Access for a Class B Network
The entry for access to a class B network could be:
255.255.0.0 9.9.0.0
Example 4 Access for an Individual IPv6 Address
Similarly, to allow access for an individual IPv6 address:
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff fec0::111:abba:ace0:fba5e:1
or
host fec0::111:abba:ace0:fba5e:1
Example 5 Access for all IPv6 Addresses Starting with fe80
To allow access for all IPv6 addresses starting with fe80:
ffff:: fe80::
May 16, 2020 |