1994-05-26 05:23:31 +00:00
|
|
|
.\" Copyright (c) 1985, 1991, 1993, 1994
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
2017-02-28 23:42:47 +00:00
|
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
1994-05-26 05:23:31 +00:00
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1994-09-11 10:48:02 +00:00
|
|
|
.\" from: @(#)inetd.8 8.3 (Berkeley) 4/13/94
|
1999-08-28 01:35:59 +00:00
|
|
|
.\" $FreeBSD$
|
1994-05-26 05:23:31 +00:00
|
|
|
.\"
|
2022-09-29 16:55:17 +00:00
|
|
|
.Dd September 29, 2022
|
1994-05-26 05:23:31 +00:00
|
|
|
.Dt INETD 8
|
2001-07-10 15:12:08 +00:00
|
|
|
.Os
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm inetd
|
|
|
|
.Nd internet
|
|
|
|
.Dq super-server
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2021-12-06 20:56:42 +00:00
|
|
|
.Op Fl dlWw
|
|
|
|
.Op Fl a Ar address
|
1998-02-24 21:55:14 +00:00
|
|
|
.Op Fl C Ar rate
|
2021-12-06 20:56:42 +00:00
|
|
|
.Op Fl c Ar maximum
|
1996-08-09 22:20:24 +00:00
|
|
|
.Op Fl p Ar filename
|
1998-02-24 21:55:14 +00:00
|
|
|
.Op Fl R Ar rate
|
2002-08-07 17:03:14 +00:00
|
|
|
.Op Fl s Ar maximum
|
2021-12-06 20:56:42 +00:00
|
|
|
.Op Ar configuration_file
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility should be run at boot time by
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pa /etc/rc
|
|
|
|
(see
|
|
|
|
.Xr rc 8 ) .
|
|
|
|
It then listens for connections on certain
|
2004-07-02 23:13:00 +00:00
|
|
|
internet sockets.
|
|
|
|
When a connection is found on one
|
1994-05-26 05:23:31 +00:00
|
|
|
of its sockets, it decides what service the socket
|
|
|
|
corresponds to, and invokes a program to service the request.
|
|
|
|
The server program is invoked with the service socket
|
|
|
|
as its standard input, output and error descriptors.
|
|
|
|
After the program is
|
|
|
|
finished,
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
continues to listen on the socket (except in some cases which
|
2004-07-02 23:13:00 +00:00
|
|
|
will be described below).
|
|
|
|
Essentially,
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
allows running one daemon to invoke several others,
|
|
|
|
reducing load on the system.
|
|
|
|
.Pp
|
1997-09-19 06:27:30 +00:00
|
|
|
The following options are available:
|
|
|
|
.Bl -tag -width indent
|
2021-12-06 20:56:42 +00:00
|
|
|
.It Fl a Ar address
|
2000-10-29 13:49:18 +00:00
|
|
|
Specify one specific IP address to bind to.
|
2000-01-28 10:21:19 +00:00
|
|
|
Alternatively, a hostname can be specified,
|
|
|
|
in which case the IPv4 or IPv6 address
|
|
|
|
which corresponds to that hostname is used.
|
|
|
|
Usually a hostname is specified when
|
|
|
|
.Nm
|
|
|
|
is run inside a
|
2000-01-25 14:52:10 +00:00
|
|
|
.Xr jail 8 ,
|
2006-02-04 22:17:38 +00:00
|
|
|
in which case the hostname corresponds to that of the
|
2000-01-28 10:21:19 +00:00
|
|
|
.Xr jail 8
|
|
|
|
environment.
|
|
|
|
.Pp
|
2006-02-04 22:17:38 +00:00
|
|
|
When the hostname specification is used
|
2000-01-28 10:21:19 +00:00
|
|
|
and both IPv4 and IPv6 bindings are desired,
|
|
|
|
one entry with the appropriate
|
|
|
|
.Em protocol
|
|
|
|
type for each binding
|
|
|
|
is required for each service in
|
|
|
|
.Pa /etc/inetd.conf .
|
2000-01-25 14:52:10 +00:00
|
|
|
For example,
|
2000-01-28 10:21:19 +00:00
|
|
|
a TCP-based service would need two entries,
|
|
|
|
one using
|
|
|
|
.Dq tcp4
|
|
|
|
for the
|
|
|
|
.Em protocol
|
|
|
|
and the other using
|
|
|
|
.Dq tcp6 .
|
|
|
|
See the explanation of the
|
|
|
|
.Pa /etc/inetd.conf
|
|
|
|
.Em protocol
|
|
|
|
field below.
|
2021-12-06 20:56:42 +00:00
|
|
|
.It Fl C Ar rate
|
|
|
|
Specify the default maximum number of times a service can be invoked
|
|
|
|
from a single IP address in one minute; the default is unlimited.
|
|
|
|
May be overridden on a per-service basis with the
|
|
|
|
"max-connections-per-ip-per-minute" parameter.
|
|
|
|
.It Fl c Ar maximum
|
|
|
|
Specify the default maximum number of
|
|
|
|
simultaneous invocations of each service;
|
|
|
|
the default is unlimited.
|
|
|
|
May be overridden on a per-service basis with the "max-child"
|
|
|
|
parameter.
|
|
|
|
.It Fl d
|
|
|
|
Turn on debugging.
|
|
|
|
.It Fl l
|
|
|
|
Turn on logging of successful connections.
|
1996-08-09 22:20:24 +00:00
|
|
|
.It Fl p
|
|
|
|
Specify an alternate file in which to store the process ID.
|
2021-12-06 20:56:42 +00:00
|
|
|
.It Fl R Ar rate
|
|
|
|
Specify the maximum number of times a service can be invoked
|
|
|
|
in one minute; the default is 256.
|
|
|
|
A rate of 0 allows an unlimited number of invocations.
|
|
|
|
.It Fl s Ar maximum
|
|
|
|
Specify the default maximum number of
|
|
|
|
simultaneous invocations of each service from a single IP address;
|
|
|
|
the default is unlimited.
|
|
|
|
May be overridden on a per-service basis with the "max-child-per-ip"
|
|
|
|
parameter.
|
|
|
|
.It Fl W
|
|
|
|
Turn on TCP Wrapping for internal services which are built in to
|
|
|
|
.Nm .
|
|
|
|
.It Fl w
|
|
|
|
Turn on TCP Wrapping for external services.
|
|
|
|
See the
|
|
|
|
.Sx "IMPLEMENTATION NOTES"
|
|
|
|
section for more information on TCP Wrappers support.
|
1994-05-26 05:23:31 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Upon execution,
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
reads its configuration information from a configuration
|
|
|
|
file which, by default, is
|
|
|
|
.Pa /etc/inetd.conf .
|
|
|
|
There must be an entry for each field of the configuration
|
|
|
|
file, with entries for each field separated by a tab or
|
2004-07-02 23:13:00 +00:00
|
|
|
a space.
|
|
|
|
Comments are denoted by a
|
1999-06-21 11:43:13 +00:00
|
|
|
.Dq #
|
|
|
|
at the beginning
|
2004-07-02 23:13:00 +00:00
|
|
|
of a line.
|
|
|
|
There must be an entry for each field.
|
|
|
|
The
|
1994-05-26 05:23:31 +00:00
|
|
|
fields of the configuration file are as follows:
|
|
|
|
.Pp
|
|
|
|
.Bd -unfilled -offset indent -compact
|
2006-02-04 22:17:38 +00:00
|
|
|
service-name
|
|
|
|
socket-type
|
1994-05-26 05:23:31 +00:00
|
|
|
protocol
|
2002-08-07 17:03:14 +00:00
|
|
|
{wait|nowait}[/max-child[/max-connections-per-ip-per-minute[/max-child-per-ip]]]
|
1997-10-28 13:46:52 +00:00
|
|
|
user[:group][/login-class]
|
2006-02-04 22:17:38 +00:00
|
|
|
server-program
|
|
|
|
server-program-arguments
|
1994-05-26 05:23:31 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
1996-02-07 17:15:01 +00:00
|
|
|
To specify an
|
2021-12-06 20:45:26 +00:00
|
|
|
ONC RPC-based
|
1996-02-07 17:15:01 +00:00
|
|
|
service, the entry would contain these fields:
|
1994-09-11 10:48:02 +00:00
|
|
|
.Pp
|
|
|
|
.Bd -unfilled -offset indent -compact
|
2006-02-04 22:17:38 +00:00
|
|
|
service-name/version
|
|
|
|
socket-type
|
1994-09-11 10:48:02 +00:00
|
|
|
rpc/protocol
|
2008-01-12 21:09:48 +00:00
|
|
|
{wait|nowait}[/max-child[/max-connections-per-ip-per-minute[/max-child-per-ip]]]
|
1997-10-28 13:46:52 +00:00
|
|
|
user[:group][/login-class]
|
2006-02-04 22:17:38 +00:00
|
|
|
server-program
|
|
|
|
server-program-arguments
|
1994-09-11 10:48:02 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
2001-07-15 08:06:20 +00:00
|
|
|
There are two types of services that
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
can start: standard and TCPMUX.
|
|
|
|
A standard service has a well-known port assigned to it;
|
|
|
|
it may be a service that implements an official Internet standard or is a
|
2001-08-14 10:01:54 +00:00
|
|
|
.Bx Ns -specific
|
|
|
|
service.
|
2001-07-15 08:06:20 +00:00
|
|
|
As described in
|
2021-12-06 20:45:26 +00:00
|
|
|
RFC 1078,
|
2001-07-15 08:06:20 +00:00
|
|
|
TCPMUX services are nonstandard services that do not have a
|
1994-05-26 05:23:31 +00:00
|
|
|
well-known port assigned to them.
|
|
|
|
They are invoked from
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
when a program connects to the
|
|
|
|
.Dq tcpmux
|
|
|
|
well-known port and specifies
|
2001-07-15 08:06:20 +00:00
|
|
|
the service name.
|
1994-05-26 05:23:31 +00:00
|
|
|
This feature is useful for adding locally-developed servers.
|
1998-04-13 15:05:14 +00:00
|
|
|
TCPMUX requests are only accepted when the multiplexor service itself
|
|
|
|
is enabled, above and beyond and specific TCPMUX-based servers; see the
|
|
|
|
discussion of internal services below.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Em service-name
|
|
|
|
entry is the name of a valid service in
|
|
|
|
the file
|
2001-06-16 18:54:54 +00:00
|
|
|
.Pa /etc/services ,
|
|
|
|
or the specification of a
|
|
|
|
.Ux
|
|
|
|
domain socket (see below).
|
1994-05-26 05:23:31 +00:00
|
|
|
For
|
|
|
|
.Dq internal
|
|
|
|
services (discussed below), the service
|
|
|
|
name
|
1999-07-02 16:21:13 +00:00
|
|
|
should
|
1994-05-26 05:23:31 +00:00
|
|
|
be the official name of the service (that is, the first entry in
|
|
|
|
.Pa /etc/services ) .
|
1996-02-07 17:15:01 +00:00
|
|
|
When used to specify an
|
2021-12-06 20:45:26 +00:00
|
|
|
ONC RPC-based
|
2006-02-04 22:17:38 +00:00
|
|
|
service, this field is a valid RPC service name listed in
|
1994-09-11 10:48:02 +00:00
|
|
|
the file
|
2001-07-15 08:06:20 +00:00
|
|
|
.Pa /etc/rpc .
|
|
|
|
The part on the right of the
|
1994-09-11 10:48:02 +00:00
|
|
|
.Dq /
|
2000-02-29 17:36:44 +00:00
|
|
|
is the RPC version number.
|
|
|
|
This
|
1994-09-11 10:48:02 +00:00
|
|
|
can simply be a single numeric argument or a range of versions.
|
2001-07-15 08:06:20 +00:00
|
|
|
A range is bounded by the low version to the high version -
|
1994-09-11 10:48:02 +00:00
|
|
|
.Dq rusers/1-3 .
|
1994-05-26 05:23:31 +00:00
|
|
|
For TCPMUX services, the value of the
|
|
|
|
.Em service-name
|
|
|
|
field consists of the string
|
|
|
|
.Dq tcpmux
|
|
|
|
followed by a slash and the
|
2001-07-15 08:06:20 +00:00
|
|
|
locally-chosen service name.
|
|
|
|
The service names listed in
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pa /etc/services
|
2001-07-15 08:06:20 +00:00
|
|
|
and the name
|
1994-05-26 05:23:31 +00:00
|
|
|
.Dq help
|
|
|
|
are reserved.
|
|
|
|
Try to choose unique names for your TCPMUX services by prefixing them with
|
|
|
|
your organization's name and suffixing them with a version number.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Em socket-type
|
|
|
|
should be one of
|
|
|
|
.Dq stream ,
|
|
|
|
.Dq dgram ,
|
|
|
|
.Dq raw ,
|
|
|
|
.Dq rdm ,
|
|
|
|
or
|
|
|
|
.Dq seqpacket ,
|
|
|
|
depending on whether the socket is a stream, datagram, raw,
|
|
|
|
reliably delivered message, or sequenced packet socket.
|
2001-07-15 08:06:20 +00:00
|
|
|
TCPMUX services must use
|
1994-05-26 05:23:31 +00:00
|
|
|
.Dq stream .
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Em protocol
|
2001-06-16 18:54:54 +00:00
|
|
|
must be a valid protocol or
|
|
|
|
.Dq unix .
|
2001-01-22 23:11:02 +00:00
|
|
|
Examples are
|
1994-05-26 05:23:31 +00:00
|
|
|
.Dq tcp
|
|
|
|
or
|
2000-01-28 10:21:19 +00:00
|
|
|
.Dq udp ,
|
|
|
|
both of which imply IPv4 for backward compatibility.
|
2000-01-25 14:52:10 +00:00
|
|
|
The names
|
2000-01-28 10:21:19 +00:00
|
|
|
.Dq tcp4
|
|
|
|
and
|
2000-01-25 14:52:10 +00:00
|
|
|
.Dq udp4
|
2000-01-28 10:21:19 +00:00
|
|
|
specify IPv4 only.
|
2000-01-25 14:52:10 +00:00
|
|
|
The names
|
2000-01-28 10:21:19 +00:00
|
|
|
.Dq tcp6
|
|
|
|
and
|
2000-01-25 14:52:10 +00:00
|
|
|
.Dq udp6
|
2000-01-28 10:21:19 +00:00
|
|
|
specify IPv6 only.
|
2000-01-25 14:52:10 +00:00
|
|
|
The names
|
2000-01-28 10:21:19 +00:00
|
|
|
.Dq tcp46
|
|
|
|
and
|
2000-01-25 14:52:10 +00:00
|
|
|
.Dq udp46
|
2001-12-11 13:14:48 +00:00
|
|
|
specify that the entry accepts both IPv4 and IPv6 connections
|
2000-01-28 10:21:19 +00:00
|
|
|
via a wildcard
|
|
|
|
.Dv AF_INET6
|
|
|
|
socket.
|
|
|
|
Rpc based services
|
2001-07-15 08:06:20 +00:00
|
|
|
are specified with the
|
1994-09-11 10:48:02 +00:00
|
|
|
.Dq rpc/tcp
|
2001-07-15 08:06:20 +00:00
|
|
|
or
|
|
|
|
.Dq rpc/udp
|
1994-09-11 10:48:02 +00:00
|
|
|
service type.
|
2002-07-15 19:09:33 +00:00
|
|
|
One can use specify IPv4 and/or IPv6 with the 4, 6 or 46 suffix, for example
|
|
|
|
.Dq rpc/tcp6
|
|
|
|
or
|
|
|
|
.Dq rpc/udp46 .
|
2001-07-15 08:06:20 +00:00
|
|
|
TCPMUX services must use
|
2000-01-28 10:21:19 +00:00
|
|
|
.Dq tcp ,
|
|
|
|
.Dq tcp4 ,
|
|
|
|
.Dq tcp6
|
|
|
|
or
|
|
|
|
.Dq tcp46 .
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Em wait/nowait
|
1997-09-19 06:27:30 +00:00
|
|
|
entry specifies whether the server that is invoked by
|
|
|
|
.Nm
|
|
|
|
will take over
|
1994-05-26 05:23:31 +00:00
|
|
|
the socket associated with the service access point, and thus whether
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
should wait for the server to exit before listening for new service
|
|
|
|
requests.
|
|
|
|
Datagram servers must use
|
|
|
|
.Dq wait ,
|
|
|
|
as they are always invoked with the original datagram socket bound
|
|
|
|
to the specified service address.
|
|
|
|
These servers must read at least one datagram from the socket
|
|
|
|
before exiting.
|
|
|
|
If a datagram server connects
|
|
|
|
to its peer, freeing the socket so
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
2000-03-22 16:07:32 +00:00
|
|
|
can receive further messages on the socket, it is said to be
|
1994-05-26 05:23:31 +00:00
|
|
|
a
|
|
|
|
.Dq multi-threaded
|
|
|
|
server;
|
|
|
|
it should read one datagram from the socket and create a new socket
|
|
|
|
connected to the peer.
|
|
|
|
It should fork, and the parent should then exit
|
|
|
|
to allow
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
to check for new service requests to spawn new servers.
|
|
|
|
Datagram servers which process all incoming datagrams
|
|
|
|
on a socket and eventually time out are said to be
|
|
|
|
.Dq single-threaded .
|
2003-06-08 14:06:45 +00:00
|
|
|
The
|
2006-02-04 22:17:38 +00:00
|
|
|
.Xr comsat 8
|
1994-05-26 05:23:31 +00:00
|
|
|
and
|
|
|
|
.Xr talkd 8
|
2006-02-04 22:17:38 +00:00
|
|
|
utilities are examples of the latter type of
|
1994-05-26 05:23:31 +00:00
|
|
|
datagram server.
|
2003-06-08 14:06:45 +00:00
|
|
|
The
|
|
|
|
.Xr tftpd 8
|
|
|
|
utility is an example of a multi-threaded datagram server.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
|
|
|
Servers using stream sockets generally are multi-threaded and
|
|
|
|
use the
|
|
|
|
.Dq nowait
|
|
|
|
entry.
|
|
|
|
Connection requests for these services are accepted by
|
2002-08-13 16:07:28 +00:00
|
|
|
.Nm ,
|
1994-05-26 05:23:31 +00:00
|
|
|
and the server is given only the newly-accepted socket connected
|
|
|
|
to a client of the service.
|
|
|
|
Most stream-based services operate in this manner.
|
|
|
|
Stream-based servers that use
|
|
|
|
.Dq wait
|
|
|
|
are started with the listening service socket, and must accept
|
|
|
|
at least one connection request before exiting.
|
|
|
|
Such a server would normally accept and process incoming connection
|
|
|
|
requests until a timeout.
|
2001-07-15 08:06:20 +00:00
|
|
|
TCPMUX services must use
|
1994-05-26 05:23:31 +00:00
|
|
|
.Dq nowait .
|
|
|
|
.Pp
|
1999-06-21 11:43:13 +00:00
|
|
|
The maximum number of outstanding child processes (or
|
|
|
|
.Dq threads )
|
|
|
|
for a
|
|
|
|
.Dq nowait
|
|
|
|
service may be explicitly specified by appending a
|
|
|
|
.Dq /
|
|
|
|
followed by the number to the
|
|
|
|
.Dq nowait
|
2000-02-29 17:36:44 +00:00
|
|
|
keyword.
|
|
|
|
Normally
|
|
|
|
(or if a value of zero is specified) there is no maximum.
|
|
|
|
Otherwise,
|
1996-11-10 21:12:44 +00:00
|
|
|
once the maximum is reached, further connection attempts will be
|
2000-02-29 17:36:44 +00:00
|
|
|
queued up until an existing child process exits.
|
|
|
|
This also works
|
1999-06-21 11:43:13 +00:00
|
|
|
in the case of
|
|
|
|
.Dq wait
|
|
|
|
mode, although a value other than one (the
|
1996-11-10 21:12:44 +00:00
|
|
|
default) might not make sense in some cases.
|
1997-10-29 21:49:04 +00:00
|
|
|
You can also specify the maximum number of connections per minute
|
|
|
|
for a given IP address by appending
|
1999-06-21 11:43:13 +00:00
|
|
|
a
|
|
|
|
.Dq /
|
|
|
|
followed by the number to the maximum number of
|
2000-02-29 17:36:44 +00:00
|
|
|
outstanding child processes.
|
|
|
|
Once the maximum is reached, further
|
1998-06-10 12:34:27 +00:00
|
|
|
connections from this IP address will be dropped until the end of the
|
1997-10-29 21:49:04 +00:00
|
|
|
minute.
|
2002-08-07 17:03:14 +00:00
|
|
|
In addition, you can specify the maximum number of simultaneous
|
|
|
|
invocations of each service from a single IP address by appending a
|
|
|
|
.Dq /
|
|
|
|
followed by the number to the maximum number of outstanding child
|
2004-07-02 23:13:00 +00:00
|
|
|
processes.
|
|
|
|
Once the maximum is reached, further connections from this
|
2002-08-07 17:03:14 +00:00
|
|
|
IP address will be dropped.
|
1996-11-10 21:12:44 +00:00
|
|
|
.Pp
|
1994-05-26 05:23:31 +00:00
|
|
|
The
|
|
|
|
.Em user
|
|
|
|
entry should contain the user name of the user as whom the server
|
2004-07-02 23:13:00 +00:00
|
|
|
should run.
|
|
|
|
This allows for servers to be given less permission
|
1997-10-28 13:46:52 +00:00
|
|
|
than root.
|
2006-02-04 22:17:38 +00:00
|
|
|
The optional
|
1997-10-28 13:46:52 +00:00
|
|
|
.Em group
|
1999-06-21 11:43:13 +00:00
|
|
|
part separated by
|
1999-07-11 08:32:24 +00:00
|
|
|
.Dq \&:
|
2006-02-04 22:17:38 +00:00
|
|
|
allows a group name other
|
|
|
|
than the default group for this user to be specified.
|
|
|
|
The optional
|
1997-10-27 22:03:47 +00:00
|
|
|
.Em login-class
|
1999-06-21 11:43:13 +00:00
|
|
|
part separated by
|
|
|
|
.Dq /
|
2006-02-04 22:17:38 +00:00
|
|
|
allows specification of a login class other
|
|
|
|
than the default
|
1999-06-21 11:43:13 +00:00
|
|
|
.Dq daemon
|
|
|
|
login class.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Em server-program
|
|
|
|
entry should contain the pathname of the program which is to be
|
|
|
|
executed by
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
2004-07-02 23:13:00 +00:00
|
|
|
when a request is found on its socket.
|
|
|
|
If
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
provides this service internally, this entry should
|
|
|
|
be
|
|
|
|
.Dq internal .
|
|
|
|
.Pp
|
|
|
|
The
|
2006-02-04 22:17:38 +00:00
|
|
|
.Em server-program-arguments
|
|
|
|
entry lists the arguments to be passed to the
|
|
|
|
.Em server-program ,
|
|
|
|
starting with argv[0], which usually is the name of
|
2004-07-02 23:13:00 +00:00
|
|
|
the program.
|
|
|
|
If the service is provided internally, the
|
1999-07-16 15:41:14 +00:00
|
|
|
.Em service-name
|
|
|
|
of the service (and any arguments to it) or the word
|
1994-05-26 05:23:31 +00:00
|
|
|
.Dq internal
|
|
|
|
should take the place of this entry.
|
|
|
|
.Pp
|
1999-07-16 15:41:14 +00:00
|
|
|
Currently, the only internal service to take arguments is
|
|
|
|
.Dq auth .
|
|
|
|
Without options, the service will always return
|
1999-07-24 17:11:50 +00:00
|
|
|
.Dq ERROR\ : HIDDEN-USER .
|
2000-01-19 22:03:12 +00:00
|
|
|
The available arguments to this service that alter its behavior are:
|
1999-07-16 15:41:14 +00:00
|
|
|
.Bl -tag -width indent
|
2000-01-19 22:03:12 +00:00
|
|
|
.It Fl d Ar fallback
|
2000-04-26 10:40:35 +00:00
|
|
|
Provide a
|
2000-01-19 22:03:12 +00:00
|
|
|
.Ar fallback
|
2000-04-26 10:40:35 +00:00
|
|
|
username.
|
|
|
|
If the real
|
|
|
|
.Dq auth
|
|
|
|
service is enabled
|
|
|
|
(with the
|
|
|
|
.Fl r
|
|
|
|
option discussed below),
|
|
|
|
return this username instead of an error
|
2002-04-16 09:56:28 +00:00
|
|
|
when lookups fail
|
2000-04-26 10:40:35 +00:00
|
|
|
for either socket credentials or the username.
|
|
|
|
If the real
|
|
|
|
.Dq auth
|
|
|
|
service is disabled,
|
|
|
|
return this username for every request.
|
2000-03-28 01:10:35 +00:00
|
|
|
This is primarily useful when running this service on a NAT machine.
|
2021-12-06 20:56:42 +00:00
|
|
|
.It Fl F
|
|
|
|
Same as
|
|
|
|
.Fl f
|
|
|
|
but without the restriction that the username in
|
|
|
|
.Pa .fakeid
|
|
|
|
must not match an existing user.
|
|
|
|
.It Fl f
|
|
|
|
If the file
|
|
|
|
.Pa .fakeid
|
|
|
|
exists in the home directory of the identified user, report the username
|
|
|
|
found in that file instead of the real username.
|
|
|
|
If the username found in
|
|
|
|
.Pa .fakeid
|
|
|
|
is that of an existing user,
|
|
|
|
then the real username is reported.
|
|
|
|
If the
|
|
|
|
.Fl i
|
|
|
|
flag is also given then the username in
|
|
|
|
.Pa .fakeid
|
|
|
|
is checked against existing user IDs instead.
|
2001-06-04 11:43:29 +00:00
|
|
|
.It Fl g
|
|
|
|
Instead of returning
|
|
|
|
the user's name to the ident requester,
|
|
|
|
report a
|
|
|
|
username made up of random alphanumeric characters,
|
2021-12-06 20:45:26 +00:00
|
|
|
e.g.,
|
2001-06-04 11:43:29 +00:00
|
|
|
.Dq c0c993 .
|
|
|
|
The
|
|
|
|
.Fl g
|
|
|
|
flag overrides not only the user names,
|
|
|
|
but also any fallback name,
|
|
|
|
.Pa .fakeid
|
|
|
|
or
|
|
|
|
.Pa .noident
|
|
|
|
files.
|
|
|
|
.It Fl i
|
|
|
|
Return numeric user IDs instead of usernames.
|
1999-07-24 17:11:50 +00:00
|
|
|
.It Fl n
|
|
|
|
If the file
|
|
|
|
.Pa .noident
|
|
|
|
exists in the home directory of the identified user, return
|
|
|
|
.Dq ERROR\ : HIDDEN-USER .
|
2001-06-04 11:43:29 +00:00
|
|
|
This overrides any
|
|
|
|
.Pa fakeid
|
|
|
|
file which might exist.
|
1999-07-23 15:49:34 +00:00
|
|
|
.It Fl o Ar osname
|
|
|
|
Use
|
|
|
|
.Ar osname
|
2000-01-19 22:03:12 +00:00
|
|
|
instead of the name of the system as reported by
|
1999-07-23 15:49:34 +00:00
|
|
|
.Xr uname 3 .
|
2021-12-06 20:56:42 +00:00
|
|
|
.It Fl r
|
|
|
|
Offer a real
|
|
|
|
.Dq auth
|
|
|
|
service, as per RFC 1413.
|
|
|
|
All the remaining flags apply only in this case.
|
|
|
|
.It Fl t Xo
|
|
|
|
.Ar sec Ns Op Cm \&. Ns Ar usec
|
|
|
|
.Xc
|
|
|
|
Specify a timeout for the service.
|
|
|
|
The default timeout is 10.0 seconds.
|
1999-07-16 15:41:14 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
1994-05-26 05:23:31 +00:00
|
|
|
The
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility also provides several other
|
1994-05-26 05:23:31 +00:00
|
|
|
.Dq trivial
|
|
|
|
services internally by use of
|
2004-07-02 23:13:00 +00:00
|
|
|
routines within itself.
|
|
|
|
These services are
|
1994-05-26 05:23:31 +00:00
|
|
|
.Dq echo ,
|
|
|
|
.Dq discard ,
|
|
|
|
.Dq chargen
|
|
|
|
(character generator),
|
|
|
|
.Dq daytime
|
|
|
|
(human readable time), and
|
|
|
|
.Dq time
|
1994-12-21 19:08:45 +00:00
|
|
|
(machine readable time, in the form of the number of seconds since
|
2004-07-02 23:13:00 +00:00
|
|
|
midnight, January 1, 1900).
|
|
|
|
All of these services are available in
|
1994-12-21 19:08:45 +00:00
|
|
|
both TCP and UDP versions; the UDP versions will refuse service if the
|
|
|
|
request specifies a reply port corresponding to any internal service.
|
|
|
|
(This is done as a defense against looping attacks; the remote IP address
|
|
|
|
is logged.)
|
|
|
|
For details of these services, consult the
|
|
|
|
appropriate
|
2021-12-06 20:45:26 +00:00
|
|
|
RFC
|
1994-12-21 19:08:45 +00:00
|
|
|
document.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
1998-04-13 15:05:14 +00:00
|
|
|
The TCPMUX-demultiplexing service is also implemented as an internal service.
|
|
|
|
For any TCPMUX-based service to function, the following line must be included
|
|
|
|
in
|
|
|
|
.Pa inetd.conf :
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
tcpmux stream tcp nowait root internal
|
|
|
|
.Ed
|
|
|
|
.Pp
|
1994-09-11 11:16:32 +00:00
|
|
|
When given the
|
|
|
|
.Fl l
|
|
|
|
option
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
1999-06-30 23:36:39 +00:00
|
|
|
will log an entry to syslog each time a connection is accepted, noting the
|
2001-05-26 14:33:47 +00:00
|
|
|
service selected and the IP-number of the remote requester if available.
|
2000-03-01 08:20:17 +00:00
|
|
|
Unless otherwise specified in the configuration file,
|
|
|
|
and in the absence of the
|
|
|
|
.Fl W
|
|
|
|
and
|
|
|
|
.Fl w
|
|
|
|
options,
|
|
|
|
.Nm
|
|
|
|
will log to the
|
2004-02-29 15:49:26 +00:00
|
|
|
.Dq daemon
|
2000-03-01 08:20:17 +00:00
|
|
|
facility.
|
1994-09-11 11:16:32 +00:00
|
|
|
.Pp
|
1994-05-26 05:23:31 +00:00
|
|
|
The
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility rereads its configuration file when it receives a hangup signal,
|
1994-05-26 05:23:31 +00:00
|
|
|
.Dv SIGHUP .
|
|
|
|
Services may be added, deleted or modified when the configuration file
|
|
|
|
is reread.
|
1995-10-12 16:43:27 +00:00
|
|
|
Except when started in debugging mode,
|
2006-02-04 22:17:38 +00:00
|
|
|
or configured otherwise with the
|
|
|
|
.Fl p
|
|
|
|
option,
|
1995-10-12 16:43:27 +00:00
|
|
|
.Nm
|
|
|
|
records its process ID in the file
|
|
|
|
.Pa /var/run/inetd.pid
|
|
|
|
to assist in reconfiguration.
|
1999-06-17 09:16:08 +00:00
|
|
|
.Sh IMPLEMENTATION NOTES
|
2001-06-16 18:54:54 +00:00
|
|
|
.Ss TCP Wrappers
|
1999-06-27 18:05:34 +00:00
|
|
|
When given the
|
|
|
|
.Fl w
|
|
|
|
option,
|
|
|
|
.Nm
|
|
|
|
will wrap all services specified as
|
1999-06-30 23:36:39 +00:00
|
|
|
.Dq stream nowait
|
|
|
|
or
|
|
|
|
.Dq dgram
|
2001-07-15 08:06:20 +00:00
|
|
|
except for
|
1999-06-27 18:05:34 +00:00
|
|
|
.Dq internal
|
2000-02-29 17:36:44 +00:00
|
|
|
services.
|
|
|
|
If the
|
1999-07-09 11:19:01 +00:00
|
|
|
.Fl W
|
|
|
|
option is given, such
|
1999-06-27 18:05:34 +00:00
|
|
|
.Dq internal
|
2000-02-29 17:36:44 +00:00
|
|
|
services will be wrapped.
|
|
|
|
If both options are given, wrapping for both
|
1999-07-09 11:19:01 +00:00
|
|
|
internal and external services will be enabled.
|
2000-03-01 08:20:17 +00:00
|
|
|
Either wrapping option
|
|
|
|
will cause failed connections to be logged to the
|
|
|
|
.Dq auth
|
|
|
|
syslog facility.
|
|
|
|
Adding the
|
1999-06-30 23:36:39 +00:00
|
|
|
.Fl l
|
2000-03-01 08:20:17 +00:00
|
|
|
flag to the wrapping options will include successful connections in the
|
|
|
|
logging to the
|
|
|
|
.Dq auth
|
|
|
|
facility.
|
1999-06-30 23:36:39 +00:00
|
|
|
.Pp
|
|
|
|
Note that
|
|
|
|
.Nm
|
|
|
|
only wraps requests for a
|
|
|
|
.Dq wait
|
2000-02-29 17:36:44 +00:00
|
|
|
service while no servers are available to service requests.
|
|
|
|
Once a
|
2001-07-05 07:37:33 +00:00
|
|
|
connection to such a service has been allowed,
|
|
|
|
.Nm
|
|
|
|
has no control
|
1999-06-30 23:36:39 +00:00
|
|
|
over subsequent connections to the service until no more servers
|
|
|
|
are left listening for connection requests.
|
|
|
|
.Pp
|
1999-06-27 18:05:34 +00:00
|
|
|
When wrapping is enabled, the
|
1999-03-28 10:50:30 +00:00
|
|
|
.Pa tcpd
|
1999-06-17 09:16:08 +00:00
|
|
|
daemon is not required, as that functionality is builtin.
|
2001-07-03 21:22:09 +00:00
|
|
|
For more information on TCP Wrappers, see the relevant documentation
|
|
|
|
.Pq Xr hosts_access 5 .
|
1999-07-02 15:58:32 +00:00
|
|
|
When reading that document, keep in mind that
|
|
|
|
.Dq internal
|
2000-02-29 17:36:44 +00:00
|
|
|
services have no associated daemon name.
|
|
|
|
Therefore, the service name
|
1999-07-02 15:58:32 +00:00
|
|
|
as specified in
|
|
|
|
.Pa inetd.conf
|
|
|
|
should be used as the daemon name for
|
|
|
|
.Dq internal
|
|
|
|
services.
|
2000-01-28 10:21:19 +00:00
|
|
|
.Ss TCPMUX
|
2021-12-06 20:45:26 +00:00
|
|
|
RFC 1078
|
1994-05-26 05:23:31 +00:00
|
|
|
describes the TCPMUX protocol:
|
2004-07-02 23:13:00 +00:00
|
|
|
``A TCP client connects to a foreign host on TCP port 1.
|
|
|
|
It sends the
|
|
|
|
service name followed by a carriage-return line-feed <CRLF>.
|
|
|
|
The
|
|
|
|
service name is never case sensitive.
|
|
|
|
The server replies with a
|
1994-05-26 05:23:31 +00:00
|
|
|
single character indicating positive (+) or negative (\-)
|
|
|
|
acknowledgment, immediately followed by an optional message of
|
2004-07-02 23:13:00 +00:00
|
|
|
explanation, terminated with a <CRLF>.
|
|
|
|
If the reply was positive,
|
1994-05-26 05:23:31 +00:00
|
|
|
the selected protocol begins; otherwise the connection is closed.''
|
|
|
|
The program is passed the TCP connection as file descriptors 0 and 1.
|
|
|
|
.Pp
|
1999-06-21 11:43:13 +00:00
|
|
|
If the TCPMUX service name begins with a
|
|
|
|
.Dq + ,
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
returns the positive reply for the program.
|
|
|
|
This allows you to invoke programs that use stdin/stdout
|
|
|
|
without putting any special server code in them.
|
|
|
|
.Pp
|
|
|
|
The special service name
|
|
|
|
.Dq help
|
|
|
|
causes
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
2006-02-04 22:17:38 +00:00
|
|
|
to list the TCPMUX services which are enabled in
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pa inetd.conf .
|
2000-01-28 10:21:19 +00:00
|
|
|
.Ss IPsec
|
|
|
|
The implementation includes a tiny hack
|
|
|
|
to support IPsec policy settings for each socket.
|
2000-01-25 14:52:10 +00:00
|
|
|
A special form of comment line, starting with
|
2000-01-28 10:21:19 +00:00
|
|
|
.Dq Li #@ ,
|
|
|
|
is interpreted as a policy specifier.
|
|
|
|
Everything after the
|
|
|
|
.Dq Li #@
|
|
|
|
will be used as an IPsec policy string,
|
2000-01-25 14:52:10 +00:00
|
|
|
as described in
|
|
|
|
.Xr ipsec_set_policy 3 .
|
2000-01-28 10:21:19 +00:00
|
|
|
Each
|
|
|
|
policy specifier is applied to all the following lines in
|
|
|
|
.Pa inetd.conf
|
|
|
|
until the next policy specifier.
|
2000-08-03 15:33:39 +00:00
|
|
|
An empty policy specifier resets the IPsec policy.
|
2000-01-25 14:52:10 +00:00
|
|
|
.Pp
|
2000-01-28 10:21:19 +00:00
|
|
|
If an invalid IPsec policy specifier appears in
|
2000-01-25 14:52:10 +00:00
|
|
|
.Pa inetd.conf ,
|
|
|
|
.Nm
|
2000-01-28 10:21:19 +00:00
|
|
|
will provide an error message via the
|
|
|
|
.Xr syslog 3
|
|
|
|
interface and abort execution.
|
2001-06-16 18:54:54 +00:00
|
|
|
.Ss Ux Domain Sockets
|
|
|
|
In addition to running services on IP sockets,
|
|
|
|
.Nm
|
2001-07-15 08:06:20 +00:00
|
|
|
can also manage
|
2001-06-16 18:54:54 +00:00
|
|
|
.Ux
|
|
|
|
domain sockets.
|
|
|
|
To do this you specify a
|
|
|
|
.Em protocol
|
|
|
|
of
|
|
|
|
.Dq unix
|
2001-07-05 07:37:33 +00:00
|
|
|
and specify the
|
|
|
|
.Ux
|
|
|
|
domain socket as the
|
2001-06-16 18:54:54 +00:00
|
|
|
.Em service-name .
|
|
|
|
The
|
|
|
|
.Em service-type
|
|
|
|
may be
|
|
|
|
.Dq stream
|
|
|
|
or
|
|
|
|
.Dq dgram .
|
|
|
|
The specification of the socket must be
|
|
|
|
an absolute path name,
|
|
|
|
optionally prefixed by an owner and mode
|
|
|
|
of the form
|
2021-12-06 20:45:26 +00:00
|
|
|
.Em ":user:group:mode\&:" .
|
2001-06-16 18:54:54 +00:00
|
|
|
The specification:
|
2001-07-05 07:37:33 +00:00
|
|
|
.Pp
|
|
|
|
.Dl ":news:daemon:220:/var/run/sock"
|
|
|
|
.Pp
|
2001-06-16 18:54:54 +00:00
|
|
|
creates a socket owned
|
2001-07-05 07:37:33 +00:00
|
|
|
by user
|
|
|
|
.Dq news
|
|
|
|
in group
|
|
|
|
.Dq daemon
|
2001-06-16 18:54:54 +00:00
|
|
|
with permissions allowing only that user and group to connect.
|
2001-07-05 07:37:33 +00:00
|
|
|
The default owner is the user that
|
|
|
|
.Nm
|
|
|
|
is running as.
|
2001-06-16 18:54:54 +00:00
|
|
|
The default mode only allows the socket's owner to connect.
|
|
|
|
.Pp
|
2001-07-05 07:37:33 +00:00
|
|
|
.Sy WARNING :
|
2006-02-04 22:17:38 +00:00
|
|
|
while creating a
|
2001-06-16 18:54:54 +00:00
|
|
|
.Ux
|
2001-07-05 07:37:33 +00:00
|
|
|
domain socket,
|
2001-06-16 18:54:54 +00:00
|
|
|
.Nm
|
|
|
|
must change the ownership and permissions on the socket.
|
|
|
|
This can only be done securely if
|
|
|
|
the directory in which the socket is created
|
|
|
|
is writable only by root.
|
|
|
|
Do
|
2001-07-05 07:37:33 +00:00
|
|
|
.Em NOT
|
2001-06-16 18:54:54 +00:00
|
|
|
use
|
|
|
|
.Nm
|
2006-02-04 22:17:38 +00:00
|
|
|
to create sockets in world writable directories
|
2001-06-16 18:54:54 +00:00
|
|
|
such as
|
2006-02-04 22:17:38 +00:00
|
|
|
.Pa /tmp ;
|
|
|
|
use
|
2001-06-16 18:54:54 +00:00
|
|
|
.Pa /var/run
|
2006-02-04 22:17:38 +00:00
|
|
|
or a similar directory instead.
|
2001-06-16 18:54:54 +00:00
|
|
|
.Pp
|
|
|
|
Internal services may be run on
|
|
|
|
.Ux
|
|
|
|
domain sockets, in the usual way.
|
|
|
|
In this case
|
|
|
|
the name of the internal service
|
|
|
|
is determined using
|
|
|
|
the last component of the socket's pathname.
|
2006-02-04 22:17:38 +00:00
|
|
|
For example, specifying a socket named
|
|
|
|
.Pa /var/run/chargen
|
|
|
|
would invoke the
|
|
|
|
.Dq chargen
|
|
|
|
service when a connection is received on that socket.
|
1995-10-12 16:43:27 +00:00
|
|
|
.Sh "FILES"
|
|
|
|
.Bl -tag -width /var/run/inetd.pid -compact
|
|
|
|
.It Pa /etc/inetd.conf
|
2000-01-23 20:17:41 +00:00
|
|
|
configuration file
|
2005-12-30 13:16:15 +00:00
|
|
|
.It Pa /etc/netconfig
|
|
|
|
network configuration data base
|
1995-10-12 16:43:27 +00:00
|
|
|
.It Pa /etc/rpc
|
2000-01-23 20:17:41 +00:00
|
|
|
translation of service names to RPC program numbers
|
1995-10-12 16:43:27 +00:00
|
|
|
.It Pa /etc/services
|
2000-01-23 20:17:41 +00:00
|
|
|
translation of service names to port numbers
|
1995-10-12 16:43:27 +00:00
|
|
|
.It Pa /var/run/inetd.pid
|
|
|
|
the pid of the currently running
|
2000-01-23 20:17:41 +00:00
|
|
|
.Nm
|
1995-10-12 16:43:27 +00:00
|
|
|
.El
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh "EXAMPLES"
|
inetd: Add examples from manual page and other sources
The manual page lists a bunch of examples, some of which already exist
in this file. Since it's both easier to remember when all examples are
listed in the same location, move examples so they get installed into
/etc/inetd.conf
This also means users won't have to copy-paste, but can simply
uncomment one or more services to use them.
As such, it also becomes necessary to remove the examples from the
manual page, so instead add a note explaining where the previous
examples as well as others may be found.
Cross-references, including to ports, have also been added where
applicable.
The rsync example has lived in the bug tracker for too long,
considering how useful it can situationally be, for example when
backup jobs on client devices are run through periodic(8) weekly.
The microsoft-ds entry is necessary for Windows 10 compatibility
(this can be confirmed with packet capturing, as it is not readily
documented at time of writing).
While here, remove two examples for which compatible daemons could not
be found in ports.
Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver)
PR: 122037
Reviewed by: kevans, brueffer, lwhsu, yuripv
Differential Revision: https://reviews.freebsd.org/D28882
2021-02-26 19:05:46 +00:00
|
|
|
Examples for a variety of services are available in
|
|
|
|
.Pa /etc/inetd.conf .
|
|
|
|
.Pp
|
|
|
|
It includes examples for
|
|
|
|
.Nm bootpd ,
|
|
|
|
.Nm comsat ,
|
|
|
|
.Nm cvs ,
|
2021-12-06 20:45:26 +00:00
|
|
|
.Nm date ,
|
inetd: Add examples from manual page and other sources
The manual page lists a bunch of examples, some of which already exist
in this file. Since it's both easier to remember when all examples are
listed in the same location, move examples so they get installed into
/etc/inetd.conf
This also means users won't have to copy-paste, but can simply
uncomment one or more services to use them.
As such, it also becomes necessary to remove the examples from the
manual page, so instead add a note explaining where the previous
examples as well as others may be found.
Cross-references, including to ports, have also been added where
applicable.
The rsync example has lived in the bug tracker for too long,
considering how useful it can situationally be, for example when
backup jobs on client devices are run through periodic(8) weekly.
The microsoft-ds entry is necessary for Windows 10 compatibility
(this can be confirmed with packet capturing, as it is not readily
documented at time of writing).
While here, remove two examples for which compatible daemons could not
be found in ports.
Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver)
PR: 122037
Reviewed by: kevans, brueffer, lwhsu, yuripv
Differential Revision: https://reviews.freebsd.org/D28882
2021-02-26 19:05:46 +00:00
|
|
|
.Nm fingerd ,
|
|
|
|
.Nm ftpd ,
|
|
|
|
.Nm imapd ,
|
|
|
|
.Nm nc ,
|
|
|
|
.Nm nmbd ,
|
|
|
|
.Nm nntpd ,
|
|
|
|
.Nm rlogind ,
|
|
|
|
.Nm rpc.rquotad ,
|
|
|
|
.Nm rpc.rusersd ,
|
|
|
|
.Nm rpc.rwalld ,
|
|
|
|
.Nm rpc.statd ,
|
|
|
|
.Nm rpc.sprayd ,
|
|
|
|
.Nm rshd ,
|
|
|
|
.Nm prometheus_sysctl_exporter ,
|
|
|
|
.Nm smtpd ,
|
|
|
|
.Nm smbd ,
|
|
|
|
.Nm swat
|
|
|
|
.Nm talkd ,
|
|
|
|
.Nm telnetd ,
|
|
|
|
.Nm tftpd ,
|
|
|
|
.Nm uucpd .
|
|
|
|
.Pp
|
|
|
|
The internal services provided by
|
|
|
|
.Nm
|
|
|
|
for daytime, time, echo, discard and chargen are also
|
|
|
|
included, as well as chargen for
|
|
|
|
.Nm ipsec
|
|
|
|
Authentication Headers
|
|
|
|
.Pp
|
|
|
|
Examples for handling auth requests via
|
|
|
|
.Nm identd ,
|
2022-04-19 14:48:55 +00:00
|
|
|
are similarly included.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh "ERROR MESSAGES"
|
|
|
|
The
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
server
|
|
|
|
logs error messages using
|
|
|
|
.Xr syslog 3 .
|
|
|
|
Important error messages and their explanations are:
|
1996-02-07 17:15:01 +00:00
|
|
|
.Pp
|
|
|
|
.Bl -ohang -compact
|
|
|
|
.It Xo
|
|
|
|
.Ar service Ns / Ns Ar protocol
|
2000-12-27 15:30:30 +00:00
|
|
|
.No "server failing (looping), service terminated."
|
1996-02-07 17:15:01 +00:00
|
|
|
.Xc
|
1994-05-26 05:23:31 +00:00
|
|
|
The number of requests for the specified service in the past minute
|
2000-02-29 17:36:44 +00:00
|
|
|
exceeded the limit.
|
|
|
|
The limit exists to prevent a broken program
|
1994-05-26 05:23:31 +00:00
|
|
|
or a malicious user from swamping the system.
|
|
|
|
This message may occur for several reasons:
|
1996-02-07 17:15:01 +00:00
|
|
|
.Bl -enum -offset indent
|
|
|
|
.It
|
|
|
|
There are many hosts requesting the service within a short time period.
|
|
|
|
.It
|
|
|
|
A broken client program is requesting the service too frequently.
|
|
|
|
.It
|
|
|
|
A malicious user is running a program to invoke the service in
|
|
|
|
a denial-of-service attack.
|
|
|
|
.It
|
|
|
|
The invoked service program has an error that causes clients
|
1994-05-26 05:23:31 +00:00
|
|
|
to retry quickly.
|
1996-02-07 17:15:01 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
1994-05-26 05:23:31 +00:00
|
|
|
Use the
|
1996-02-07 17:15:01 +00:00
|
|
|
.Fl R Ar rate
|
1994-05-26 05:23:31 +00:00
|
|
|
option,
|
|
|
|
as described above, to change the rate limit.
|
|
|
|
Once the limit is reached, the service will be
|
|
|
|
reenabled automatically in 10 minutes.
|
1996-02-07 17:15:01 +00:00
|
|
|
.Pp
|
|
|
|
.It Xo
|
|
|
|
.Ar service Ns / Ns Ar protocol :
|
|
|
|
.No \&No such user
|
|
|
|
.Ar user ,
|
|
|
|
.No service ignored
|
|
|
|
.Xc
|
|
|
|
.It Xo
|
|
|
|
.Ar service Ns / Ns Ar protocol :
|
|
|
|
.No getpwnam :
|
|
|
|
.Ar user :
|
|
|
|
.No \&No such user
|
|
|
|
.Xc
|
2001-07-15 08:06:20 +00:00
|
|
|
No entry for
|
1996-02-07 17:15:01 +00:00
|
|
|
.Ar user
|
2001-07-15 08:06:20 +00:00
|
|
|
exists in the
|
1996-02-07 17:15:01 +00:00
|
|
|
.Xr passwd 5
|
2000-02-29 17:36:44 +00:00
|
|
|
database.
|
|
|
|
The first message
|
1994-05-26 05:23:31 +00:00
|
|
|
occurs when
|
1997-09-19 06:27:30 +00:00
|
|
|
.Nm
|
2000-02-29 17:36:44 +00:00
|
|
|
(re)reads the configuration file.
|
|
|
|
The second message occurs when the
|
1994-05-26 05:23:31 +00:00
|
|
|
service is invoked.
|
1996-02-07 17:15:01 +00:00
|
|
|
.Pp
|
|
|
|
.It Xo
|
|
|
|
.Ar service :
|
|
|
|
.No can't set uid
|
|
|
|
.Ar uid
|
|
|
|
.Xc
|
|
|
|
.It Xo
|
|
|
|
.Ar service :
|
|
|
|
.No can't set gid
|
|
|
|
.Ar gid
|
|
|
|
.Xc
|
2001-07-15 08:06:20 +00:00
|
|
|
The user or group ID for the entry's
|
1996-02-07 17:15:01 +00:00
|
|
|
.Ar user
|
|
|
|
field is invalid.
|
|
|
|
.Pp
|
|
|
|
.It "setsockopt(SO_PRIVSTATE): Operation not supported"
|
|
|
|
The
|
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility attempted to renounce the privileged state associated with a
|
1996-02-07 17:15:01 +00:00
|
|
|
socket but was unable to.
|
2005-12-30 13:16:15 +00:00
|
|
|
.Pp
|
|
|
|
.It Xo unknown
|
|
|
|
.Ar rpc/udp
|
|
|
|
or
|
|
|
|
.Ar rpc/tcp
|
|
|
|
.Xc
|
|
|
|
No entry was found for either
|
|
|
|
.Ar udp
|
|
|
|
or
|
|
|
|
.Ar tcp
|
|
|
|
in the
|
|
|
|
.Xr netconfig 5
|
|
|
|
database.
|
|
|
|
.Pp
|
|
|
|
.It Xo unknown
|
|
|
|
.Ar rpc/udp6
|
|
|
|
or
|
|
|
|
.Ar rpc/tcp6
|
|
|
|
.Xc
|
|
|
|
No entry was found for either
|
|
|
|
.Ar udp6
|
|
|
|
or
|
|
|
|
.Ar tcp6
|
|
|
|
in the
|
|
|
|
.Xr netconfig 5
|
|
|
|
database.
|
1996-02-07 17:15:01 +00:00
|
|
|
.El
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh SEE ALSO
|
inetd: Add examples from manual page and other sources
The manual page lists a bunch of examples, some of which already exist
in this file. Since it's both easier to remember when all examples are
listed in the same location, move examples so they get installed into
/etc/inetd.conf
This also means users won't have to copy-paste, but can simply
uncomment one or more services to use them.
As such, it also becomes necessary to remove the examples from the
manual page, so instead add a note explaining where the previous
examples as well as others may be found.
Cross-references, including to ports, have also been added where
applicable.
The rsync example has lived in the bug tracker for too long,
considering how useful it can situationally be, for example when
backup jobs on client devices are run through periodic(8) weekly.
The microsoft-ds entry is necessary for Windows 10 compatibility
(this can be confirmed with packet capturing, as it is not readily
documented at time of writing).
While here, remove two examples for which compatible daemons could not
be found in ports.
Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver)
PR: 122037
Reviewed by: kevans, brueffer, lwhsu, yuripv
Differential Revision: https://reviews.freebsd.org/D28882
2021-02-26 19:05:46 +00:00
|
|
|
.Xr cvs 1 Pq Pa ports/devel/opencvs ,
|
|
|
|
.Xr date 1 ,
|
2020-05-13 02:17:27 +00:00
|
|
|
.Xr nc 1 ,
|
2001-07-05 07:37:33 +00:00
|
|
|
.Xr ipsec_set_policy 3 ,
|
inetd: Add examples from manual page and other sources
The manual page lists a bunch of examples, some of which already exist
in this file. Since it's both easier to remember when all examples are
listed in the same location, move examples so they get installed into
/etc/inetd.conf
This also means users won't have to copy-paste, but can simply
uncomment one or more services to use them.
As such, it also becomes necessary to remove the examples from the
manual page, so instead add a note explaining where the previous
examples as well as others may be found.
Cross-references, including to ports, have also been added where
applicable.
The rsync example has lived in the bug tracker for too long,
considering how useful it can situationally be, for example when
backup jobs on client devices are run through periodic(8) weekly.
The microsoft-ds entry is necessary for Windows 10 compatibility
(this can be confirmed with packet capturing, as it is not readily
documented at time of writing).
While here, remove two examples for which compatible daemons could not
be found in ports.
Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver)
PR: 122037
Reviewed by: kevans, brueffer, lwhsu, yuripv
Differential Revision: https://reviews.freebsd.org/D28882
2021-02-26 19:05:46 +00:00
|
|
|
.Xr ipsec 4 ,
|
1999-05-01 22:03:00 +00:00
|
|
|
.Xr hosts_access 5 ,
|
|
|
|
.Xr hosts_options 5 ,
|
1997-10-27 22:03:47 +00:00
|
|
|
.Xr login.conf 5 ,
|
2005-12-30 13:16:15 +00:00
|
|
|
.Xr netconfig 5 ,
|
1996-02-07 17:15:01 +00:00
|
|
|
.Xr passwd 5 ,
|
1995-10-12 16:43:27 +00:00
|
|
|
.Xr rpc 5 ,
|
|
|
|
.Xr services 5 ,
|
inetd: Add examples from manual page and other sources
The manual page lists a bunch of examples, some of which already exist
in this file. Since it's both easier to remember when all examples are
listed in the same location, move examples so they get installed into
/etc/inetd.conf
This also means users won't have to copy-paste, but can simply
uncomment one or more services to use them.
As such, it also becomes necessary to remove the examples from the
manual page, so instead add a note explaining where the previous
examples as well as others may be found.
Cross-references, including to ports, have also been added where
applicable.
The rsync example has lived in the bug tracker for too long,
considering how useful it can situationally be, for example when
backup jobs on client devices are run through periodic(8) weekly.
The microsoft-ds entry is necessary for Windows 10 compatibility
(this can be confirmed with packet capturing, as it is not readily
documented at time of writing).
While here, remove two examples for which compatible daemons could not
be found in ports.
Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver)
PR: 122037
Reviewed by: kevans, brueffer, lwhsu, yuripv
Differential Revision: https://reviews.freebsd.org/D28882
2021-02-26 19:05:46 +00:00
|
|
|
.Xr bootpd 8 ,
|
1994-05-26 05:23:31 +00:00
|
|
|
.Xr comsat 8 ,
|
|
|
|
.Xr fingerd 8 ,
|
|
|
|
.Xr ftpd 8 ,
|
inetd: Add examples from manual page and other sources
The manual page lists a bunch of examples, some of which already exist
in this file. Since it's both easier to remember when all examples are
listed in the same location, move examples so they get installed into
/etc/inetd.conf
This also means users won't have to copy-paste, but can simply
uncomment one or more services to use them.
As such, it also becomes necessary to remove the examples from the
manual page, so instead add a note explaining where the previous
examples as well as others may be found.
Cross-references, including to ports, have also been added where
applicable.
The rsync example has lived in the bug tracker for too long,
considering how useful it can situationally be, for example when
backup jobs on client devices are run through periodic(8) weekly.
The microsoft-ds entry is necessary for Windows 10 compatibility
(this can be confirmed with packet capturing, as it is not readily
documented at time of writing).
While here, remove two examples for which compatible daemons could not
be found in ports.
Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver)
PR: 122037
Reviewed by: kevans, brueffer, lwhsu, yuripv
Differential Revision: https://reviews.freebsd.org/D28882
2021-02-26 19:05:46 +00:00
|
|
|
.Xr imapd 8 Pq Pa ports/mail/courier-imap ,
|
|
|
|
.Xr nmbd 8 Pq Pa ports/net/samba412 ,
|
1994-05-26 05:23:31 +00:00
|
|
|
.Xr rlogind 8 ,
|
inetd: Add examples from manual page and other sources
The manual page lists a bunch of examples, some of which already exist
in this file. Since it's both easier to remember when all examples are
listed in the same location, move examples so they get installed into
/etc/inetd.conf
This also means users won't have to copy-paste, but can simply
uncomment one or more services to use them.
As such, it also becomes necessary to remove the examples from the
manual page, so instead add a note explaining where the previous
examples as well as others may be found.
Cross-references, including to ports, have also been added where
applicable.
The rsync example has lived in the bug tracker for too long,
considering how useful it can situationally be, for example when
backup jobs on client devices are run through periodic(8) weekly.
The microsoft-ds entry is necessary for Windows 10 compatibility
(this can be confirmed with packet capturing, as it is not readily
documented at time of writing).
While here, remove two examples for which compatible daemons could not
be found in ports.
Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver)
PR: 122037
Reviewed by: kevans, brueffer, lwhsu, yuripv
Differential Revision: https://reviews.freebsd.org/D28882
2021-02-26 19:05:46 +00:00
|
|
|
.Xr rpc.rquotad 8 ,
|
|
|
|
.Xr rpc.rusersd 8 ,
|
|
|
|
.Xr rpc.rwalld 8 ,
|
|
|
|
.Xr rpc.statd 8 ,
|
1994-05-26 05:23:31 +00:00
|
|
|
.Xr rshd 8 ,
|
inetd: Add examples from manual page and other sources
The manual page lists a bunch of examples, some of which already exist
in this file. Since it's both easier to remember when all examples are
listed in the same location, move examples so they get installed into
/etc/inetd.conf
This also means users won't have to copy-paste, but can simply
uncomment one or more services to use them.
As such, it also becomes necessary to remove the examples from the
manual page, so instead add a note explaining where the previous
examples as well as others may be found.
Cross-references, including to ports, have also been added where
applicable.
The rsync example has lived in the bug tracker for too long,
considering how useful it can situationally be, for example when
backup jobs on client devices are run through periodic(8) weekly.
The microsoft-ds entry is necessary for Windows 10 compatibility
(this can be confirmed with packet capturing, as it is not readily
documented at time of writing).
While here, remove two examples for which compatible daemons could not
be found in ports.
Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver)
PR: 122037
Reviewed by: kevans, brueffer, lwhsu, yuripv
Differential Revision: https://reviews.freebsd.org/D28882
2021-02-26 19:05:46 +00:00
|
|
|
.Xr prometheus_sysctl_exporter 8 ,
|
|
|
|
.Xr smbd 8 Pq Pa ports/net/samba412 ,
|
2006-02-04 22:17:38 +00:00
|
|
|
.Xr talkd 8 ,
|
2022-09-29 16:55:17 +00:00
|
|
|
.Xr telnetd 8 Pq Pa ports/net/freebsd-telnetd ,
|
inetd: Add examples from manual page and other sources
The manual page lists a bunch of examples, some of which already exist
in this file. Since it's both easier to remember when all examples are
listed in the same location, move examples so they get installed into
/etc/inetd.conf
This also means users won't have to copy-paste, but can simply
uncomment one or more services to use them.
As such, it also becomes necessary to remove the examples from the
manual page, so instead add a note explaining where the previous
examples as well as others may be found.
Cross-references, including to ports, have also been added where
applicable.
The rsync example has lived in the bug tracker for too long,
considering how useful it can situationally be, for example when
backup jobs on client devices are run through periodic(8) weekly.
The microsoft-ds entry is necessary for Windows 10 compatibility
(this can be confirmed with packet capturing, as it is not readily
documented at time of writing).
While here, remove two examples for which compatible daemons could not
be found in ports.
Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver)
PR: 122037
Reviewed by: kevans, brueffer, lwhsu, yuripv
Differential Revision: https://reviews.freebsd.org/D28882
2021-02-26 19:05:46 +00:00
|
|
|
.Xr tftpd 8 ,
|
|
|
|
.Xr uucpd 8 Pq Pa ports/net/freebsd-uucp
|
1999-07-16 15:41:14 +00:00
|
|
|
.Rs
|
|
|
|
.%A Michael C. St. Johns
|
|
|
|
.%T Identification Protocol
|
|
|
|
.%O RFC1413
|
|
|
|
.Re
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility appeared in
|
1994-05-26 05:23:31 +00:00
|
|
|
.Bx 4.3 .
|
|
|
|
TCPMUX is based on code and documentation by Mark Lottor.
|
1994-09-11 10:48:02 +00:00
|
|
|
Support for
|
2021-12-06 20:45:26 +00:00
|
|
|
ONC RPC-based services is modeled after that
|
1994-09-11 10:48:02 +00:00
|
|
|
provided by
|
2021-12-06 20:45:26 +00:00
|
|
|
SunOS
|
1995-10-12 16:43:27 +00:00
|
|
|
4.1.
|
2000-01-28 10:21:19 +00:00
|
|
|
The IPsec hack was contributed by the KAME project in 1999.
|
1999-05-01 22:03:00 +00:00
|
|
|
The
|
2000-01-28 10:21:19 +00:00
|
|
|
.Fx
|
2001-07-15 08:06:20 +00:00
|
|
|
TCP Wrappers support first appeared in
|
1999-05-01 22:03:00 +00:00
|
|
|
.Fx 3.2 .
|