/etc/inetd.conf listar dessa servrar och dess vanliga portar. Kommandot inetd lyssnar på dem alla; när den upptäcker en anslutning till en sådan port exekverar den motsvarande serverprogram.
/etc/inetd.conf beskriver en server med flera fält (separerade av mellanslag):
/etc/services).
stream för en TCP-anslutning, dgram för UDP-datagram.
tcp, tcp6, udp, or udp6.
wait eller nowait, för att berätta för inetd huruvida det ska vänta eller inte på att processer avslutas innan det accepterar nya anslutningar. För TCP-anslutningar, som är multiplexa, kan du oftast använda nowait. För program som svarar över UDP kan du använda nowait endast om servern är kapabel att hantera flera anslutningar samtidigt. Du kan sätta ett suffix på detta fält med en punkt, följt av det högsta antalet anslutningar tillåtna per minut (standardgränsen är 256).
user.group syntax.
argv[0] i C).
Exempel 9.1. Utdrag från /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.