/etc/inetd.conf memuat daftar server tersebut dan nomor port biasa mereka. Perintah inetd mendengarkan semua dari mereka; ketika mendeteksi koneksi ke salah satu port tersebut, itu mengeksekusi program server yang sesuai.
/etc/inetd.conf menggambarkan sebuah server melalui tujuh ruas (yang dipisah dengan spasi):
/etc/services).
stream untuk koneksi TCP, dgram untuk datagram UDP.
tcp, tcp6, udp, or udp6.
wait atau nowait, untuk memberitahu inetd apakah itu harus menunggu atau tidak untuk akhir dari proses diluncurkan sebelum menerima koneksi lain. Untuk koneksi TCP, yang mudah dimultiplekskan, Anda dapat biasanya menggunakan nowait. Untuk program yang merespon melalui UDP, Anda harus menggunakan nowait hanya jika server mampu mengelola beberapa koneksi secara paralel. Anda dapat menambahkan akhiran pada ruas ini dengan titik dua, diikuti oleh jumlah maksimum koneksi resmi per menit (batas default adalah 256).
user.group syntax.
argv[0] dalam C).
Contoh 9.1. Kutipan dari /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.