1 | .TH SERV.ACCESS 5
|
---|
2 | .SH NAME
|
---|
3 | serv.access \- Internet service access list
|
---|
4 | .SH SYNOPSIS
|
---|
5 | .B /etc/serv.access
|
---|
6 | .SH DESCRIPTION
|
---|
7 | .de SP
|
---|
8 | .if t .sp 0.4
|
---|
9 | .if n .sp
|
---|
10 | ..
|
---|
11 | The
|
---|
12 | .B serv.access
|
---|
13 | file contains a list of rules that guide the access checks made by the
|
---|
14 | .BR servxcheck (3)
|
---|
15 | function. The file is a text file containing entries that look as follows:
|
---|
16 | .PP
|
---|
17 | .RS
|
---|
18 | .I service1 service2
|
---|
19 | .RB ... :
|
---|
20 | .I check1 check2
|
---|
21 | .RB ... ;
|
---|
22 | .RE
|
---|
23 | .PP
|
---|
24 | Each of the service names is a service name from the
|
---|
25 | .B /etc/services
|
---|
26 | file. The same names are used in the
|
---|
27 | .B /etc/inetd.conf
|
---|
28 | configuration file that guides
|
---|
29 | .BR inetd (8).
|
---|
30 | .PP
|
---|
31 | The checks may look as follows:
|
---|
32 | .PP
|
---|
33 | .BI +
|
---|
34 | .br
|
---|
35 | .BI -
|
---|
36 | .RS
|
---|
37 | Allow all, or allow none. Used to explicitly set the initial state.
|
---|
38 | .RE
|
---|
39 | .PP
|
---|
40 | .BI + name
|
---|
41 | .RS
|
---|
42 | Grant access to one of the services if the host name of the remote system
|
---|
43 | matches
|
---|
44 | .BR name .
|
---|
45 | .RE
|
---|
46 | .SP
|
---|
47 | .BI \- name
|
---|
48 | .RS
|
---|
49 | Deny access to one of the services if the host name of the remote system
|
---|
50 | matches
|
---|
51 | .BR name .
|
---|
52 | .RE
|
---|
53 | .PP
|
---|
54 | .BI + ipaddr
|
---|
55 | .br
|
---|
56 | .BI \- ipaddr
|
---|
57 | .br
|
---|
58 | .BI + netaddr / len
|
---|
59 | .br
|
---|
60 | .BI \- netaddr / len
|
---|
61 | .RS
|
---|
62 | Grants or denies access to a remote host with IP address
|
---|
63 | .IR ipaddr ,
|
---|
64 | or the remote host whose IP address is within the network
|
---|
65 | .IR netaddr .
|
---|
66 | .I Len
|
---|
67 | tells the number of bits used for the network address, i.e. the top
|
---|
68 | .I len
|
---|
69 | bits of the network address must equal the host address.
|
---|
70 | .RE
|
---|
71 | .PP
|
---|
72 | .BR log
|
---|
73 | .RS
|
---|
74 | This is not a check, but a flag that instruct
|
---|
75 | .B servxcheck()
|
---|
76 | to log the result of the access check whether it succeeds or not to
|
---|
77 | .BR /usr/adm/log .
|
---|
78 | By default only failure is logged.
|
---|
79 | .RE
|
---|
80 | .PP
|
---|
81 | The first "+" or "\-" access check sets the tone. Read it as "access denied
|
---|
82 | unless +...", or "access granted unless \-...". An access check will
|
---|
83 | therefore almost always start with a "+" check. To make the initial state
|
---|
84 | clear you can start with a lone "+" or "\-". Checks are done from left
|
---|
85 | to right. A check that doesn't match does not change the outcome. A check
|
---|
86 | that can't change the outcome is skipped.
|
---|
87 | .PP
|
---|
88 | Both the service and the host names may contain the
|
---|
89 | .B "\(**"
|
---|
90 | wildcard that matches any number of characters including none. Letters are
|
---|
91 | compared ignoring case. A service name may appear in more than one rule,
|
---|
92 | but a service mentioned explicitly is not matched by wildcard patterns in
|
---|
93 | later rules.
|
---|
94 | .PP
|
---|
95 | A check for a hostname causes
|
---|
96 | .B servxcheck()
|
---|
97 | to do a reverse lookup on the IP address of the remote host to find its
|
---|
98 | name. This name is then looked up to find the host's IP address(es).
|
---|
99 | If those lookups fail then all
|
---|
100 | .BI \- name
|
---|
101 | checks cause access to be denied, and no
|
---|
102 | .BI + name
|
---|
103 | check grants access.
|
---|
104 | The DNS lookup failures may be a
|
---|
105 | misconfiguration, but could indicate a break-in attempt from a badly
|
---|
106 | maintained host. You can use a simple "+*" in an otherwise empty list to
|
---|
107 | just deny misconfigured hosts.
|
---|
108 | .PP
|
---|
109 | An IP or network address check is simply done on the remote hosts IP
|
---|
110 | address. Such a check has no overhead, but a
|
---|
111 | .B log
|
---|
112 | flag will cause a reverse lookup anyway.
|
---|
113 | .PP
|
---|
114 | Comments start with "#" and continue until end of line.
|
---|
115 | .SH EXAMPLES
|
---|
116 | Example access file on a machine that offers most services only to hosts within
|
---|
117 | the cs.vu.nl domain, and news (nntp) only to two machines and a specific
|
---|
118 | network.
|
---|
119 | .PP
|
---|
120 | .RS
|
---|
121 | .nf
|
---|
122 | .ta +2.2i +.4i
|
---|
123 | # Service # Access list
|
---|
124 | login shell: +*.cs.vu.nl log;
|
---|
125 | telnet pop smtp finger: + log;
|
---|
126 | nntp: +flotsam.cs.vu.nl +jetsam.cs.vu.nl
|
---|
127 | +172.16.102.0/24 log;
|
---|
128 | *: +*.cs.vu.nl;
|
---|
129 | .fi
|
---|
130 | .RE
|
---|
131 | .PP
|
---|
132 | More paranoid example that limits all services by default, but allows ftp and
|
---|
133 | http to the world:
|
---|
134 | .PP
|
---|
135 | .RS
|
---|
136 | .nf
|
---|
137 | .ta +2.2i +.4i
|
---|
138 | # Service # Access list
|
---|
139 | ftp http: +;
|
---|
140 | smtp finger: + log;
|
---|
141 | nntp: +flotsam.cs.vu.nl +jetsam.cs.vu.nl
|
---|
142 | +172.16.102.0/24 log;
|
---|
143 | *: +*.cs.vu.nl log;
|
---|
144 | .fi
|
---|
145 | .RE
|
---|
146 | .PP
|
---|
147 | (Note that the last rule doesn't match any of the services mentioned
|
---|
148 | explicitly earlier.)
|
---|
149 | .SH FILES
|
---|
150 | .TP 25n
|
---|
151 | .B /etc/serv.access
|
---|
152 | The service access check file.
|
---|
153 | .SH "SEE ALSO"
|
---|
154 | .BR servxcheck (3),
|
---|
155 | .BR services (5),
|
---|
156 | .BR inetd.conf (5).
|
---|
157 | .SH NOTES
|
---|
158 | It may be wise not to put checks on telnet. It is reasonably secure, since
|
---|
159 | it always requires a password, and your only way in if things are seriously
|
---|
160 | hosed.
|
---|
161 | .SH BUGS
|
---|
162 | IP and DNS based access checks will stop most crackers, but not the really
|
---|
163 | determined ones. Luckily MINIX 3 is sufficiently strange to thwart the well
|
---|
164 | known cracking schemes. But don't ever allow yourself to feel secure.
|
---|
165 | .SH AUTHOR
|
---|
166 | Kees J. Bot <kjb@cs.vu.nl>
|
---|