Product SiteDocumentation Site

9.6. Il super-server inetd

Inetd (spesso chiamato «Internet super-server») è un server di server. Esegue a richiesta i server usati raramente, in modo che debbano essere eseguiti continuamente.
Il file /etc/inetd.conf elenca questi server con le rispettive porte. Il comando inetd rimane in ascolto, quando rileva una connessione verso una qualsiasi di queste porte, esegue il programma server corrispondente.
Ogni riga significativa del file /etc/inetd.conf descrive un server attraverso sette campi (separati da spazi):
The following example illustrates some use-cases after installing talkd, nullidentd (ident-server), and fingerd:

Esempio 9.1. Estratto dal file /etc/inetd.conf

#:BSD: Shell, login, exec and talk are BSD protocols.
talk   dgram   udp     wait    nobody.tty   /usr/sbin/in.talkd      in.talkd
ntalk  dgram   udp     wait    nobody.tty   /usr/sbin/in.ntalkd     in.ntalkd

#:INFO: Info services
ident  stream  tcp     nowait  nobody       /usr/sbin/nullidentd    nullidentd
finger stream  tcp     nowait  nobody       /usr/sbin/tcpd          /usr/sbin/in.fingerd
The tcpd program is frequently used in the /etc/inetd.conf file. It allows limiting incoming connections by applying access control rules, documented in the hosts_access(5) manual page, and which are configured in the /etc/hosts.allow and /etc/hosts.deny files. Once it has been determined that the connection is authorized, tcpd executes the real server (like in.fingerd in our example). It is worth noting that tcpd relies on the name under which it was invoked (that is the first argument, argv[0]) to identify the real program to run. So you should not start the arguments list with tcpd but with the program that must be wrapped.