Inetd listens for connections on certain sockets. When a connection is found on one of its sockets, it decides what service the socket corresponds to, and invokes a program to service the request. The server program is invoked with the service socket as its standard input, output and error descriptors.
Essentially, inetd allows running one daemon to invoke several others, reducing load on the system.
Load was the keyword in my case, I was able to make positive tests with inetd.
For example proftpd: if a new connection will be found, service will be started. Proftpd don’t runs all the time.
apt-get install inetutils-inetd
Proftpd configuration /etc/proftpd/proftpd.conf:
ServerName "192.168.3.11" ServerType inetd
Example inetd configuration for SSH and FTP service:
1 2 3
/etc/inetd.conf ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/proftpd -c /etc/proftpd/proftpd.conf ssh stream tcp nowait root /usr/sbin/sshd sshd -i
Leave a Reply