1 .\" $OpenBSD: ypserv.acl.5,v 1.6 1997/08/05 09:26:56 maja Exp $
2 .\" Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\" must display the following acknowledgement:
15 .\" This product includes software developed by Mats O Jansson
16 .\" 4. The name of the author may not be used to endorse or promote products
17 .\" derived from this software without specific prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
20 .\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
23 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42 file controls which hosts can connect to the
46 The format is more complex than the format for
48 The first two verbs on each line controls if the line will
62 server reads the configuration file and build a list in memory. This list
63 is processed from the beginning for every incomming request. As soon a
64 match is found in the list the search terminates and it returns success
65 or failure depending on
69 If no match was found in the list success is returned.
71 If access is denied every call will cause a
75 Don't forget to allow localhost access if you want the machine running
79 There is no default name for this file. Start
83 to read a file with this format.
85 The following different syntax can be used:
92 .Nm hostname|ip-address
97 has more than one ip address then all will be added to the list.
104 .Nm netname|netnumber
106 .Op Nm netmask <netname|netnumber>
110 part of the command isn't given then the netmask will be assumed to be a
111 class A, B or C net depending on the net number.
118 A line containing one of these commands will always match any host.
121 A configuration file might appear as follows:
123 # This is an example of an access control file to be used by ypserv.
125 # This file is parsed line by line. First match will terminate the check
129 ###########################################################################
130 # This is the commands that will match a single host
132 # allow host <hostname|ip-address>
133 # deny host <hostname|ip-address>
135 # To process hostname gethostbyname is called. If the hostname has
136 # multiple ip-addresses all will be added (I hope). ip-address
137 # processed by inet_aton.
141 ###########################################################################
142 # This is the commands that will match a network
144 # allow net <netname|netnumber> [netmask <netname|netnumber>]
145 # deny net <netname|netnumber> [netmask <netname|netnumber>]
147 # To process netname getnetbyname is called, and inet_aton is used for
148 # netnumber. inet_aton both access numbers as 255.255.255.0 and 0xffffff00.
150 # If netmask isn't given the parser will assume netmask from the first bits
151 # of the network number. So if the network is subneted the you have to add
152 # the netmask. In my case I've got the network 139.58.253.0 at home so too
153 # allow any of my computers to talk with the server I need the following
156 allow net mojathome netmask 255.255.255.0
158 ###########################################################################
159 # At last we have a command that will match any caller:
165 # reject all connections
170 .Bl -tag -width /var/yp/ypserv.acl -compact
171 .It Pa /var/yp/ypserv.acl
181 Mats O Jansson <moj@stacken.kth.se>