/etc/inetd.conf llista aquests servidors i els seus ports habituals. L'ordre inetd escolta en tots aquests ports; quan detecta una connexió a qualsevol port d'aquest tipus, executa el corresponent programa de servidor.
/etc/inetd.conf descriu un servidor a través de set camps (separats per espais):
/etc/services).
stream per a connexió TCP, dgram per a datagrames UDP.
tcp, tcp6, udp, or udp6.
wait o nowait, per indicar a inetd si ha d'esperar que acabi o no el procés iniciat abans d'acceptar una altra connexió. Per a les connexions TCP, fàcilment multiplexable, normalment es pot utilitzar nowait. Per als programes que responen sobre UDP, hauríeu d'utilitzar nowait només si el servidor és capaç de gestionar diverses connexions en paral·lel. Podeu afixar aquest camp amb un punt, seguit pel nombre màxim de connexions autoritzades per minut (el límit per defecte és 256).
user.group syntax.
argv[0] en C).
Exemple 9.1. Extracte de /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
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.