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