1 SECURENETS(4) File Formats and Configurations SECURENETS(4) 2 3 4 5 NAME 6 securenets - configuration file for NIS security 7 8 SYNOPSIS 9 /var/yp/securenets 10 11 12 DESCRIPTION 13 The /var/yp/securenets file defines the networks or hosts which are 14 allowed access to information by the Network Information Service 15 ("NIS"). 16 17 18 The format of the file is as follows: 19 20 o Lines beginning with the ``#'' character are treated as 21 comments. 22 23 o Otherwise, each line contains two fields separated by white 24 space. The first field is a netmask, the second a network. 25 26 o The netmask field may be either 255.255.255.255 (IPv4), 27 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff (IPv6) , or the 28 string ``host'' indicating that the second field is a 29 specific host to be allowed access. 30 31 32 Both ypserv(1M) and ypxfrd(1M) use the /var/yp/securenets file. The 33 file is read when the ypserv(1M) and ypxfrd(1M) daemons begin. If 34 /var/yp/securenets is present, ypserv(1M) and ypxfrd(1M) respond only 35 to IP addresses in the range given. In order for a change in the 36 /var/yp/securenets file to take effect, you must kill and restart any 37 active daemons using ypstop(1M) and ypstart(1M). 38 39 40 An important thing to note for all the examples below is that the 41 server must be allowed to access itself. You accomplish this either by 42 the server being part of a subnet that is allowed to access the server, 43 or by adding an individual entry, as the following: 44 45 hosts 127.0.0.1 46 47 48 49 EXAMPLES 50 Example 1 Access for Individual Entries 51 52 53 If individual machines are to be give access, the entry could be: 54 55 56 255.255.255.255 192.9.1.20 57 58 59 60 61 or 62 63 64 host 192.0.1.20 65 66 67 68 Example 2 Access for a Class C Network 69 70 71 If access is to be given to an entire class C network, the entry could 72 be: 73 74 75 255.255.255.0 192.9.1.0 76 77 78 79 Example 3 Access for a Class B Network 80 81 82 The entry for access to a class B network could be: 83 84 85 255.255.0.0 9.9.0.0 86 87 88 89 Example 4 Access for an Individual IPv6 Address 90 91 92 Similarly, to allow access for an individual IPv6 address: 93 94 95 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff fec0::111:abba:ace0:fba5e:1 96 97 98 99 100 or 101 102 103 host fec0::111:abba:ace0:fba5e:1 104 105 106 107 Example 5 Access for all IPv6 Addresses Starting with fe80 108 109 110 To allow access for all IPv6 addresses starting with fe80: 111 112 113 ffff:: fe80:: 114 115 116 117 FILES 118 /var/yp/securenets 119 Configuration file for NIS security. 120 121 122 SEE ALSO 123 ypserv(1M), ypstart(1M), ypstop(1M), ypxfrd(1M) 124 125 NOTES 126 The Network Information Service (NIS) was formerly known as Sun Yellow 127 Pages (YP). The functionality of the two remains the same; only the 128 name has changed. The name Yellow Pages is a registered trademark in 129 the United Kingdom of British Telecommunications plc, and may not be 130 used without permission. 131 132 133 134 May 16, 2020 SECURENETS(4)