]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/inetd/inetd.8
This commit was generated by cvs2svn to compensate for changes in r159952,
[FreeBSD/FreeBSD.git] / usr.sbin / inetd / inetd.8
1 .\" Copyright (c) 1985, 1991, 1993, 1994
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 4. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     from: @(#)inetd.8       8.3 (Berkeley) 4/13/94
29 .\" $FreeBSD$
30 .\"
31 .Dd February 4, 2006
32 .Dt INETD 8
33 .Os
34 .Sh NAME
35 .Nm inetd
36 .Nd internet
37 .Dq super-server
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl d
41 .Op Fl l
42 .Op Fl w
43 .Op Fl W
44 .Op Fl c Ar maximum
45 .Op Fl C Ar rate
46 .Op Fl a Ar address | hostname
47 .Op Fl p Ar filename
48 .Op Fl R Ar rate
49 .Op Fl s Ar maximum
50 .Op Ar configuration file
51 .Sh DESCRIPTION
52 The
53 .Nm
54 utility should be run at boot time by
55 .Pa /etc/rc
56 (see
57 .Xr rc 8 ) .
58 It then listens for connections on certain
59 internet sockets.
60 When a connection is found on one
61 of its sockets, it decides what service the socket
62 corresponds to, and invokes a program to service the request.
63 The server program is invoked with the service socket
64 as its standard input, output and error descriptors.
65 After the program is
66 finished,
67 .Nm
68 continues to listen on the socket (except in some cases which
69 will be described below).
70 Essentially,
71 .Nm
72 allows running one daemon to invoke several others,
73 reducing load on the system.
74 .Pp
75 The following options are available:
76 .Bl -tag -width indent
77 .It Fl d
78 Turn on debugging.
79 .It Fl l
80 Turn on logging of successful connections.
81 .It Fl w
82 Turn on TCP Wrapping for external services.
83 See the
84 .Sx "IMPLEMENTATION NOTES"
85 section for more information on TCP Wrappers support.
86 .It Fl W
87 Turn on TCP Wrapping for internal services which are built in to
88 .Nm .
89 .It Fl c Ar maximum
90 Specify the default maximum number of
91 simultaneous invocations of each service;
92 the default is unlimited.
93 May be overridden on a per-service basis with the "max-child"
94 parameter.
95 .It Fl C Ar rate
96 Specify the default maximum number of times a service can be invoked
97 from a single IP address in one minute; the default is unlimited.
98 May be overridden on a per-service basis with the
99 "max-connections-per-ip-per-minute" parameter.
100 .It Fl R Ar rate
101 Specify the maximum number of times a service can be invoked
102 in one minute; the default is 256.
103 A rate of 0 allows an unlimited number of invocations.
104 .It Fl s Ar maximum
105 Specify the default maximum number of
106 simultaneous invocations of each service from a single IP address;
107 the default is unlimited.
108 May be overridden on a per-service basis with the "max-child-per-ip"
109 parameter.
110 .It Fl a
111 Specify one specific IP address to bind to.
112 Alternatively, a hostname can be specified,
113 in which case the IPv4 or IPv6 address
114 which corresponds to that hostname is used.
115 Usually a hostname is specified when
116 .Nm
117 is run inside a
118 .Xr jail 8 ,
119 in which case the hostname corresponds to that of the
120 .Xr jail 8
121 environment.
122 .Pp
123 When the hostname specification is used
124 and both IPv4 and IPv6 bindings are desired,
125 one entry with the appropriate
126 .Em protocol
127 type for each binding
128 is required for each service in
129 .Pa /etc/inetd.conf .
130 For example,
131 a TCP-based service would need two entries,
132 one using
133 .Dq tcp4
134 for the
135 .Em protocol
136 and the other using
137 .Dq tcp6 .
138 See the explanation of the
139 .Pa /etc/inetd.conf
140 .Em protocol
141 field below.
142 .It Fl p
143 Specify an alternate file in which to store the process ID.
144 .El
145 .Pp
146 Upon execution,
147 .Nm
148 reads its configuration information from a configuration
149 file which, by default, is
150 .Pa /etc/inetd.conf .
151 There must be an entry for each field of the configuration
152 file, with entries for each field separated by a tab or
153 a space.
154 Comments are denoted by a
155 .Dq #
156 at the beginning
157 of a line.
158 There must be an entry for each field.
159 The
160 fields of the configuration file are as follows:
161 .Pp
162 .Bd -unfilled -offset indent -compact
163 service-name
164 socket-type
165 protocol
166 {wait|nowait}[/max-child[/max-connections-per-ip-per-minute[/max-child-per-ip]]]
167 user[:group][/login-class]
168 server-program
169 server-program-arguments
170 .Ed
171 .Pp
172 To specify an
173 .Tn "ONC RPC" Ns -based
174 service, the entry would contain these fields:
175 .Pp
176 .Bd -unfilled -offset indent -compact
177 service-name/version
178 socket-type
179 rpc/protocol
180 user[:group][/login-class]
181 server-program
182 server-program-arguments
183 .Ed
184 .Pp
185 There are two types of services that
186 .Nm
187 can start: standard and TCPMUX.
188 A standard service has a well-known port assigned to it;
189 it may be a service that implements an official Internet standard or is a
190 .Bx Ns -specific
191 service.
192 As described in
193 .Tn RFC 1078 ,
194 TCPMUX services are nonstandard services that do not have a
195 well-known port assigned to them.
196 They are invoked from
197 .Nm
198 when a program connects to the
199 .Dq tcpmux
200 well-known port and specifies
201 the service name.
202 This feature is useful for adding locally-developed servers.
203 TCPMUX requests are only accepted when the multiplexor service itself
204 is enabled, above and beyond and specific TCPMUX-based servers; see the
205 discussion of internal services below.
206 .Pp
207 The
208 .Em service-name
209 entry is the name of a valid service in
210 the file
211 .Pa /etc/services ,
212 or the specification of a
213 .Ux
214 domain socket (see below).
215 For
216 .Dq internal
217 services (discussed below), the service
218 name
219 should
220 be the official name of the service (that is, the first entry in
221 .Pa /etc/services ) .
222 When used to specify an
223 .Tn "ONC RPC" Ns -based
224 service, this field is a valid RPC service name listed in
225 the file
226 .Pa /etc/rpc .
227 The part on the right of the
228 .Dq /
229 is the RPC version number.
230 This
231 can simply be a single numeric argument or a range of versions.
232 A range is bounded by the low version to the high version -
233 .Dq rusers/1-3 .
234 For TCPMUX services, the value of the
235 .Em service-name
236 field consists of the string
237 .Dq tcpmux
238 followed by a slash and the
239 locally-chosen service name.
240 The service names listed in
241 .Pa /etc/services
242 and the name
243 .Dq help
244 are reserved.
245 Try to choose unique names for your TCPMUX services by prefixing them with
246 your organization's name and suffixing them with a version number.
247 .Pp
248 The
249 .Em socket-type
250 should be one of
251 .Dq stream ,
252 .Dq dgram ,
253 .Dq raw ,
254 .Dq rdm ,
255 or
256 .Dq seqpacket ,
257 depending on whether the socket is a stream, datagram, raw,
258 reliably delivered message, or sequenced packet socket.
259 TCPMUX services must use
260 .Dq stream .
261 .Pp
262 The
263 .Em protocol
264 must be a valid protocol or
265 .Dq unix .
266 Examples are
267 .Dq tcp
268 or
269 .Dq udp ,
270 both of which imply IPv4 for backward compatibility.
271 The names
272 .Dq tcp4
273 and
274 .Dq udp4
275 specify IPv4 only.
276 The names
277 .Dq tcp6
278 and
279 .Dq udp6
280 specify IPv6 only.
281 The names
282 .Dq tcp46
283 and
284 .Dq udp46
285 specify that the entry accepts both IPv4 and IPv6 connections
286 via a wildcard
287 .Dv AF_INET6
288 socket.
289 If it is desired that the service is reachable via T/TCP, one should
290 specify
291 .Dq tcp/ttcp ,
292 which implies IPv4 for backward compatibility.
293 The name
294 .Dq tcp4/ttcp
295 specifies IPv4 only, while
296 .Dq tcp6/ttcp
297 specifies IPv6 only.
298 The name
299 .Dq tcp46/ttcp
300 specifies that the entry accepts both IPv6 and IPv6 connections
301 via a wildcard
302 .Dv AF_INET6
303 socket.
304 Rpc based services
305 are specified with the
306 .Dq rpc/tcp
307 or
308 .Dq rpc/udp
309 service type.
310 One can use specify IPv4 and/or IPv6 with the 4, 6 or 46 suffix, for example
311 .Dq rpc/tcp6
312 or
313 .Dq rpc/udp46 .
314 TCPMUX services must use
315 .Dq tcp ,
316 .Dq tcp4 ,
317 .Dq tcp6
318 or
319 .Dq tcp46 .
320 .Pp
321 The
322 .Em wait/nowait
323 entry specifies whether the server that is invoked by
324 .Nm
325 will take over
326 the socket associated with the service access point, and thus whether
327 .Nm
328 should wait for the server to exit before listening for new service
329 requests.
330 Datagram servers must use
331 .Dq wait ,
332 as they are always invoked with the original datagram socket bound
333 to the specified service address.
334 These servers must read at least one datagram from the socket
335 before exiting.
336 If a datagram server connects
337 to its peer, freeing the socket so
338 .Nm
339 can receive further messages on the socket, it is said to be
340 a
341 .Dq multi-threaded
342 server;
343 it should read one datagram from the socket and create a new socket
344 connected to the peer.
345 It should fork, and the parent should then exit
346 to allow
347 .Nm
348 to check for new service requests to spawn new servers.
349 Datagram servers which process all incoming datagrams
350 on a socket and eventually time out are said to be
351 .Dq single-threaded .
352 The
353 .Xr comsat 8
354 and
355 .Xr talkd 8
356 utilities are examples of the latter type of
357 datagram server.
358 The
359 .Xr tftpd 8
360 utility is an example of a multi-threaded datagram server.
361 .Pp
362 Servers using stream sockets generally are multi-threaded and
363 use the
364 .Dq nowait
365 entry.
366 Connection requests for these services are accepted by
367 .Nm ,
368 and the server is given only the newly-accepted socket connected
369 to a client of the service.
370 Most stream-based services operate in this manner.
371 Stream-based servers that use
372 .Dq wait
373 are started with the listening service socket, and must accept
374 at least one connection request before exiting.
375 Such a server would normally accept and process incoming connection
376 requests until a timeout.
377 TCPMUX services must use
378 .Dq nowait .
379 .Pp
380 The maximum number of outstanding child processes (or
381 .Dq threads )
382 for a
383 .Dq nowait
384 service may be explicitly specified by appending a
385 .Dq /
386 followed by the number to the
387 .Dq nowait
388 keyword.
389 Normally
390 (or if a value of zero is specified) there is no maximum.
391 Otherwise,
392 once the maximum is reached, further connection attempts will be
393 queued up until an existing child process exits.
394 This also works
395 in the case of
396 .Dq wait
397 mode, although a value other than one (the
398 default) might not make sense in some cases.
399 You can also specify the maximum number of connections per minute
400 for a given IP address by appending
401 a
402 .Dq /
403 followed by the number to the maximum number of
404 outstanding child processes.
405 Once the maximum is reached, further
406 connections from this IP address will be dropped until the end of the
407 minute.
408 In addition, you can specify the maximum number of simultaneous
409 invocations of each service from a single IP address by appending a
410 .Dq /
411 followed by the number to the maximum number of outstanding child
412 processes.
413 Once the maximum is reached, further connections from this
414 IP address will be dropped.
415 .Pp
416 The
417 .Em user
418 entry should contain the user name of the user as whom the server
419 should run.
420 This allows for servers to be given less permission
421 than root.
422 The optional
423 .Em group
424 part separated by
425 .Dq \&:
426 allows a group name other
427 than the default group for this user to be specified.
428 The optional
429 .Em login-class
430 part separated by
431 .Dq /
432 allows specification of a login class other
433 than the default
434 .Dq daemon
435 login class.
436 .Pp
437 The
438 .Em server-program
439 entry should contain the pathname of the program which is to be
440 executed by
441 .Nm
442 when a request is found on its socket.
443 If
444 .Nm
445 provides this service internally, this entry should
446 be
447 .Dq internal .
448 .Pp
449 The
450 .Em server-program-arguments
451 entry lists the arguments to be passed to the
452 .Em server-program ,
453 starting with argv[0], which usually is the name of
454 the program.
455 If the service is provided internally, the
456 .Em service-name
457 of the service (and any arguments to it) or the word
458 .Dq internal
459 should take the place of this entry.
460 .Pp
461 Currently, the only internal service to take arguments is
462 .Dq auth .
463 Without options, the service will always return
464 .Dq ERROR\ : HIDDEN-USER .
465 The available arguments to this service that alter its behavior are:
466 .Bl -tag -width indent
467 .It Fl d Ar fallback
468 Provide a
469 .Ar fallback
470 username.
471 If the real
472 .Dq auth
473 service is enabled
474 (with the
475 .Fl r
476 option discussed below),
477 return this username instead of an error
478 when lookups fail
479 for either socket credentials or the username.
480 If the real
481 .Dq auth
482 service is disabled,
483 return this username for every request.
484 This is primarily useful when running this service on a NAT machine.
485 .It Fl g
486 Instead of returning
487 the user's name to the ident requester,
488 report a
489 username made up of random alphanumeric characters,
490 e.g.\&
491 .Dq c0c993 .
492 The
493 .Fl g
494 flag overrides not only the user names,
495 but also any fallback name,
496 .Pa .fakeid
497 or
498 .Pa .noident
499 files.
500 .It Fl t Xo
501 .Ar sec Ns Op . Ns Ar usec
502 .Xc
503 Specify a timeout for the service.
504 The default timeout is 10.0 seconds.
505 .It Fl r
506 Offer a real
507 .Dq auth
508 service, as per RFC 1413.
509 All the remaining flags apply only in this case.
510 .It Fl i
511 Return numeric user IDs instead of usernames.
512 .It Fl f
513 If the file
514 .Pa .fakeid
515 exists in the home directory of the identified user, report the username
516 found in that file instead of the real username.
517 If the username found in
518 .Pa .fakeid
519 is that of an existing user,
520 then the real username is reported.
521 If the
522 .Fl i
523 flag is also given then the username in
524 .Pa .fakeid
525 is checked against existing user IDs instead.
526 .It Fl F
527 same as
528 .Fl f
529 but without the restriction that the username in
530 .Pa .fakeid
531 must not match an existing user.
532 .It Fl n
533 If the file
534 .Pa .noident
535 exists in the home directory of the identified user, return
536 .Dq ERROR\ : HIDDEN-USER .
537 This overrides any
538 .Pa fakeid
539 file which might exist.
540 .It Fl o Ar osname
541 Use
542 .Ar osname
543 instead of the name of the system as reported by
544 .Xr uname 3 .
545 .El
546 .Pp
547 The
548 .Nm
549 utility also provides several other
550 .Dq trivial
551 services internally by use of
552 routines within itself.
553 These services are
554 .Dq echo ,
555 .Dq discard ,
556 .Dq chargen
557 (character generator),
558 .Dq daytime
559 (human readable time), and
560 .Dq time
561 (machine readable time, in the form of the number of seconds since
562 midnight, January 1, 1900).
563 All of these services are available in
564 both TCP and UDP versions; the UDP versions will refuse service if the
565 request specifies a reply port corresponding to any internal service.
566 (This is done as a defense against looping attacks; the remote IP address
567 is logged.)
568 For details of these services, consult the
569 appropriate
570 .Tn RFC
571 document.
572 .Pp
573 The TCPMUX-demultiplexing service is also implemented as an internal service.
574 For any TCPMUX-based service to function, the following line must be included
575 in
576 .Pa inetd.conf :
577 .Bd -literal -offset indent
578 tcpmux  stream  tcp     nowait  root    internal
579 .Ed
580 .Pp
581 When given the
582 .Fl l
583 option
584 .Nm
585 will log an entry to syslog each time a connection is accepted, noting the
586 service selected and the IP-number of the remote requester if available.
587 Unless otherwise specified in the configuration file,
588 and in the absence of the
589 .Fl W
590 and
591 .Fl w
592 options,
593 .Nm
594 will log to the
595 .Dq daemon
596 facility.
597 .Pp
598 The
599 .Nm
600 utility rereads its configuration file when it receives a hangup signal,
601 .Dv SIGHUP .
602 Services may be added, deleted or modified when the configuration file
603 is reread.
604 Except when started in debugging mode,
605 or configured otherwise with the
606 .Fl p
607 option,
608 .Nm
609 records its process ID in the file
610 .Pa /var/run/inetd.pid
611 to assist in reconfiguration.
612 .Sh IMPLEMENTATION NOTES
613 .Ss TCP Wrappers
614 When given the
615 .Fl w
616 option,
617 .Nm
618 will wrap all services specified as
619 .Dq stream nowait
620 or
621 .Dq dgram
622 except for
623 .Dq internal
624 services.
625 If the
626 .Fl W
627 option is given, such
628 .Dq internal
629 services will be wrapped.
630 If both options are given, wrapping for both
631 internal and external services will be enabled.
632 Either wrapping option
633 will cause failed connections to be logged to the
634 .Dq auth
635 syslog facility.
636 Adding the
637 .Fl l
638 flag to the wrapping options will include successful connections in the
639 logging to the
640 .Dq auth
641 facility.
642 .Pp
643 Note that
644 .Nm
645 only wraps requests for a
646 .Dq wait
647 service while no servers are available to service requests.
648 Once a
649 connection to such a service has been allowed,
650 .Nm
651 has no control
652 over subsequent connections to the service until no more servers
653 are left listening for connection requests.
654 .Pp
655 When wrapping is enabled, the
656 .Pa tcpd
657 daemon is not required, as that functionality is builtin.
658 For more information on TCP Wrappers, see the relevant documentation
659 .Pq Xr hosts_access 5 .
660 When reading that document, keep in mind that
661 .Dq internal
662 services have no associated daemon name.
663 Therefore, the service name
664 as specified in
665 .Pa inetd.conf
666 should be used as the daemon name for
667 .Dq internal
668 services.
669 .Ss TCPMUX
670 .Tn RFC 1078
671 describes the TCPMUX protocol:
672 ``A TCP client connects to a foreign host on TCP port 1.
673 It sends the
674 service name followed by a carriage-return line-feed <CRLF>.
675 The
676 service name is never case sensitive.
677 The server replies with a
678 single character indicating positive (+) or negative (\-)
679 acknowledgment, immediately followed by an optional message of
680 explanation, terminated with a <CRLF>.
681 If the reply was positive,
682 the selected protocol begins; otherwise the connection is closed.''
683 The program is passed the TCP connection as file descriptors 0 and 1.
684 .Pp
685 If the TCPMUX service name begins with a
686 .Dq + ,
687 .Nm
688 returns the positive reply for the program.
689 This allows you to invoke programs that use stdin/stdout
690 without putting any special server code in them.
691 .Pp
692 The special service name
693 .Dq help
694 causes
695 .Nm
696 to list the TCPMUX services which are enabled in
697 .Pa inetd.conf .
698 .Ss IPsec
699 The implementation includes a tiny hack
700 to support IPsec policy settings for each socket.
701 A special form of comment line, starting with
702 .Dq Li #@ ,
703 is interpreted as a policy specifier.
704 Everything after the
705 .Dq Li #@
706 will be used as an IPsec policy string,
707 as described in
708 .Xr ipsec_set_policy 3 .
709 Each
710 policy specifier is applied to all the following lines in
711 .Pa inetd.conf
712 until the next policy specifier.
713 An empty policy specifier resets the IPsec policy.
714 .Pp
715 If an invalid IPsec policy specifier appears in
716 .Pa inetd.conf ,
717 .Nm
718 will provide an error message via the
719 .Xr syslog 3
720 interface and abort execution.
721 .Ss Ux Domain Sockets
722 In addition to running services on IP sockets,
723 .Nm
724 can also manage
725 .Ux
726 domain sockets.
727 To do this you specify a
728 .Em protocol
729 of
730 .Dq unix
731 and specify the
732 .Ux
733 domain socket as the
734 .Em service-name .
735 The
736 .Em service-type
737 may be
738 .Dq stream
739 or
740 .Dq dgram .
741 The specification of the socket must be
742 an absolute path name,
743 optionally prefixed by an owner and mode
744 of the form
745 .Em :user:group:mode: .
746 The specification:
747 .Pp
748 .Dl ":news:daemon:220:/var/run/sock"
749 .Pp
750 creates a socket owned
751 by user
752 .Dq news
753 in group
754 .Dq daemon
755 with permissions allowing only that user and group to connect.
756 The default owner is the user that
757 .Nm
758 is running as.
759 The default mode only allows the socket's owner to connect.
760 .Pp
761 .Sy WARNING :
762 while creating a
763 .Ux
764 domain socket,
765 .Nm
766 must change the ownership and permissions on the socket.
767 This can only be done securely if
768 the directory in which the socket is created
769 is writable only by root.
770 Do
771 .Em NOT
772 use
773 .Nm
774 to create sockets in world writable directories
775 such as
776 .Pa /tmp ;
777 use
778 .Pa /var/run
779 or a similar directory instead.
780 .Pp
781 Internal services may be run on
782 .Ux
783 domain sockets, in the usual way.
784 In this case
785 the name of the internal service
786 is determined using
787 the last component of the socket's pathname.
788 For example, specifying a socket named
789 .Pa /var/run/chargen
790 would invoke the
791 .Dq chargen
792 service when a connection is received on that socket.
793 .Sh "FILES"
794 .Bl -tag -width /var/run/inetd.pid -compact
795 .It Pa /etc/inetd.conf
796 configuration file
797 .It Pa /etc/netconfig
798 network configuration data base
799 .It Pa /etc/rpc
800 translation of service names to RPC program numbers
801 .It Pa /etc/services
802 translation of service names to port numbers
803 .It Pa /var/run/inetd.pid
804 the pid of the currently running
805 .Nm
806 .El
807 .Sh "EXAMPLES"
808 Here are several example service entries for the various types of services:
809 .Bd -literal
810 ftp          stream  tcp   nowait root  /usr/libexec/ftpd        ftpd -l
811 ntalk        dgram   udp   wait   root  /usr/libexec/ntalkd      ntalkd
812 telnet       stream  tcp6  nowait root  /usr/libexec/telnetd  telnetd
813 shell        stream  tcp46  nowait root  /usr/libexec/rshd rshd
814 tcpmux/+date stream  tcp   nowait guest /bin/date                date
815 tcpmux/phonebook stream tcp nowait guest /usr/local/bin/phonebook phonebook
816 rstatd/1-3   dgram   rpc/udp wait root  /usr/libexec/rpc.rstatd  rpc.rstatd
817 /var/run/echo stream unix  nowait root  internal
818 #@ ipsec ah/require
819 chargen      stream  tcp   nowait root  internal
820 #@
821 .Ed
822 .Sh "ERROR MESSAGES"
823 The
824 .Nm
825 server
826 logs error messages using
827 .Xr syslog 3 .
828 Important error messages and their explanations are:
829 .Pp
830 .Bl -ohang -compact
831 .It Xo
832 .Ar service Ns / Ns Ar protocol
833 .No "server failing (looping), service terminated."
834 .Xc
835 The number of requests for the specified service in the past minute
836 exceeded the limit.
837 The limit exists to prevent a broken program
838 or a malicious user from swamping the system.
839 This message may occur for several reasons:
840 .Bl -enum -offset indent
841 .It
842 There are many hosts requesting the service within a short time period.
843 .It
844 A broken client program is requesting the service too frequently.
845 .It
846 A malicious user is running a program to invoke the service in
847 a denial-of-service attack.
848 .It
849 The invoked service program has an error that causes clients
850 to retry quickly.
851 .El
852 .Pp
853 Use the
854 .Fl R Ar rate
855 option,
856 as described above, to change the rate limit.
857 Once the limit is reached, the service will be
858 reenabled automatically in 10 minutes.
859 .Pp
860 .It Xo
861 .Ar service Ns / Ns Ar protocol :
862 .No \&No such user
863 .Ar user ,
864 .No service ignored
865 .Xc
866 .It Xo
867 .Ar service Ns / Ns Ar protocol :
868 .No getpwnam :
869 .Ar user :
870 .No \&No such user
871 .Xc
872 No entry for
873 .Ar user
874 exists in the
875 .Xr passwd 5
876 database.
877 The first message
878 occurs when
879 .Nm
880 (re)reads the configuration file.
881 The second message occurs when the
882 service is invoked.
883 .Pp
884 .It Xo
885 .Ar service :
886 .No can't set uid
887 .Ar uid
888 .Xc
889 .It Xo
890 .Ar service :
891 .No can't set gid
892 .Ar gid
893 .Xc
894 The user or group ID for the entry's
895 .Ar user
896 field is invalid.
897 .Pp
898 .It "setsockopt(SO_PRIVSTATE): Operation not supported"
899 The
900 .Nm
901 utility attempted to renounce the privileged state associated with a
902 socket but was unable to.
903 .Pp
904 .It Xo unknown
905 .Ar rpc/udp
906 or
907 .Ar rpc/tcp
908 .Xc
909 No entry was found for either
910 .Ar udp
911 or
912 .Ar tcp
913 in the
914 .Xr netconfig 5
915 database.
916 .Pp
917 .It Xo unknown
918 .Ar rpc/udp6
919 or
920 .Ar rpc/tcp6
921 .Xc
922 No entry was found for either
923 .Ar udp6
924 or
925 .Ar tcp6
926 in the
927 .Xr netconfig 5
928 database.
929 .El
930 .Sh SEE ALSO
931 .Xr ipsec_set_policy 3 ,
932 .Xr hosts_access 5 ,
933 .Xr hosts_options 5 ,
934 .Xr login.conf 5 ,
935 .Xr netconfig 5 ,
936 .Xr passwd 5 ,
937 .Xr rpc 5 ,
938 .Xr services 5 ,
939 .Xr comsat 8 ,
940 .Xr fingerd 8 ,
941 .Xr ftpd 8 ,
942 .Xr rlogind 8 ,
943 .Xr rpcbind 8 ,
944 .Xr rshd 8 ,
945 .Xr talkd 8 ,
946 .Xr telnetd 8 ,
947 .Xr tftpd 8
948 .Rs
949 .%A Michael C. St. Johns
950 .%T Identification Protocol
951 .%O RFC1413
952 .Re
953 .Sh HISTORY
954 The
955 .Nm
956 utility appeared in
957 .Bx 4.3 .
958 TCPMUX is based on code and documentation by Mark Lottor.
959 Support for
960 .Tn "ONC RPC"
961 based services is modeled after that
962 provided by
963 .Tn SunOS
964 4.1.
965 The IPsec hack was contributed by the KAME project in 1999.
966 The
967 .Fx
968 TCP Wrappers support first appeared in
969 .Fx 3.2 .