|System Administration Commands||inetd(1M)
| ||inetd - Internet services daemon
| ||inetd [-d] [-s] [-t] [ -r count interval] [configuration-file]
inetd is the server process for the Internet standard services. It usually starts up at system boot time. The configuration-file lists
the services that inetd is to provide. If no configuration-file is given on the command line, inetd reads the configuration information from the /etc/inetd.conf file. If /etc/inetd.conf is not present, inetd reads the configuration information from /etc/inet/inetd.conf. See inetd.conf(4) for more information on the format of this
inetd listens for service requests on the TCP or UDP ports associated with each of the services listed in the configuration file. When a request arrives, inetd executes the server program associated with the service.
A service can be configured to have "wait" wait-status, in which case, inetd waits for the server process to exit before starting a second server process. RPC services can also be started by inetd.
inetd provides a number of simple Internet services internally. These include echo, discard, chargen (character generator), daytime (human-readable time), and time (machine-readable
time, in the form of the number of seconds since midnight, January 1, 1900).
inetd reads the configuration-file and the default settings in /etc/default/inetd once when it starts up and rereads them again whenever it receives a hangup signal, SIGHUP. New services
can be activated and existing services can be deleted or modified by editing the configuration-file and then sending inetd a SIGHUP signal.
After it receives the SIGHUP signal, inetd reads the configuration-file and, for each service listed, attempts to bind() to that service's port. The attempt might fail if another standalone
server or "wait" wait-status server started by inetd is already listening on the same port. Such a server has to be killed before inetd can bind to the service's port. inetd defers implementing a newly read configuration for a service whose port
is busy and periodically attempts to start listening, after logging an error on console. The retry interval is currently 10 minutes.
If you want a "wait" wait-status server that is started by inetd to be controlled by that daemon following a kill and restart of inetd, you must do one of the following:
- Kill the server before restarting inetd.
- Restart inetd, kill the server, and wait till the retry interval elapses. After this time, inetd attempts to restart the server upon the next request for service.
The /etc/default/inetd file contains the following default parameter settings. See FILES.
- Specifies whether incoming TCP connections are traced. The value ENABLE_CONNECTION_LOGGING=YES is equivalent to the -t command-line option. The default value for ENABLE_CONNECTION_LOGGING is NO.
- Specifies the TCP wrappers facility will be used to control access to TCP services. The value YES enables checking. The default value for ENABLE_TCPWRAPPERS is NO. If
the ENABLE_TCPWRAPPERS parameter is turned on, then all "streams, nowait" services will be automatically wrapped by the TCP wrappers facility. The stability level of the TCP wrappers facility and its configuration files is External. As the TCP wrappers facility is not controlled
by Sun, intrarelease incompatibilities are not uncommon. See attributes(5).
For more information about configuring TCP wrappers, you can refer to the following man pages, which are delivered as part of Solaris at /usr/sfw/man: tcpd(1m), hosts_access(5).
- Runs inetd in the foreground and enables debugging output.
- Allows you to run inetd ``stand-alone'' outside the Service Access Facility (SAF). If the -s option is omitted, inetd will attempt to contact the service access controller
(SAC) and will exit if SAC is not already running. See sac(1M).
- Instructs inetd to trace the incoming connections for all of its TCP services. It does this by logging the client's IP address and TCP port number, along with the name
of the service, using the syslog(3C) facility. "Wait" wait-status services cannot be traced. When tracing is enabled, inetd uses
the syslog facility code ``daemon'' and ``notice'' priority level. See FILES.
- Allows inetd to detect and then suspend ``broken'' wait services servers and connectionless datagram services servers, for example, UDP and RPC/CLTS. Without
this detection, a buggy server that fails before consuming the service request is continuously restarted and taxes system resources too much. The -r flag has the form:
count and interval are decimal numbers that represent the maximum count of invocations per interval of seconds a service can be started before the service is considered ``broken.''
After being considered ``broken,'' a server is suspended for ten minutes. After ten minutes, inetd again enables service, trusting the server to operate correctly.
If the -r flag is not specified, inetd considers -r40 60 to be specified.
- Lists the services inetd is to provide.
inetd does not return an exit status.
- Contains default settings. inetd reads the configuration-file and the default settings in /etc/default/inetd once when it starts up and rereads them again
whenever it receives a hangup signal, SIGHUP. You can override some of the settings by command-line options.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE
in.ftpd(1M), in.rexecd(1M), in.rshd(1M), in.tftpd(1M), sac(1M), syslog(3C), inetd.conf(4), attributes(5)
Postel, Jon. RFC 862: Echo Protocol. Network Information Center, SRI International, Menlo Park, CA, May 1983.
Postel, Jon. RFC 863: Discard Protocol. Network Information Center, SRI International, Menlo Park, CA, May 1983.
Postel, Jon. RFC 864: Character Generator Protocol. Network Information Center, SRI International, Menlo Park, CA, May 1983.
Postel, Jon. RFC 867: Daytime Protocol. Network Information Center, SRI International, Menlo Park, CA, May 1983.
Postel, Jon, and Ken Harrenstien. RFC 868: Time Protocol. Network Information Center, SRI International, Menlo Park, CA, May 1983.
The following man pages are delivered as part of the SUNWtcpd package: tcpd(1m), hosts_access(4)
Do not configure udp services as nowait. This can cause a race condition where the inetd program selects on the socket and the server program reads from the socket. Many server programs will fork and performance will be severely compromised.
If you kill and restart inetd, be aware that any environment variables in your shell are inherited by a shell for an incoming telnet session. For example, if you have USER=root in your environment, a user who connects to your machine with telnet inherits USER=root.
For RPC services, inetd listens on all the transports, not only tcp and udp, as specified for each service in the inetd.conf(4) file.