What is inetd

W

Inetd is a super-server daemon found on many UNIX systems. It first appeared on BSD version 4.3 and is usually located in /usr/sbin/inetd.

Before discussing the inetd process, I want to explain that in Linux and Unix, the processes running in the background are called daemons. In popular culture, a daemon is a spirit that influences the character or personality.

Coming back to inetd, at first – well, at least at the beginning of Unix – all the daemons started at the time of loading and rolled up continuously.
As you might imagine, this means that unused processes have used resources and have exhausted performance. This was obviously an inefficient business method. As systems accumulated more and more services, it became apparent that something different should be done.

As a result, a Berkeley programmer decided that it would be better to create a daemon to control all the other daemons, a kind of super daemon. Thus, he created inetd, or internet daemon.
Inetd always runs in the background and then decides when to start and stop other daemons. So if a call enters port 21 for FTP services, inetd starts the FTP daemon.
When a call enters port 80 for HTTP services, inetd starts HTTP services and so on. In this way, inetd conserves resources and improves the overall performance of the system.

Inetd – all Linux distributions, include a central utility for network services controlled by the inetd process. This super server acts as a clearinghouse or a central management point for all internet services running on the server. When it was found that most network administrators use inetd and TCP wrappers, another daemon-xinetd-has been created that provides the facilities of both applications. TCP Wrappers – interfaces between inetd and the server application itself and adds an access control layer to a feature present in inetd. The application receives and examines each connection request and, on the basis of a set of criteria, decides whether to accept or reject it. Xinetd was developed to address some of the inetd security vulnerabilities and was adopted fairly quickly by Linux, Red Hat, and SUSE distributions. Debian and Ubuntu, which are the core distributions for Kali and BackTrack, were originally left with the older inetd. But Kali now switched to a newer version of inetd, called openbsd-inetd. We can make our Linux system safer by setting default values ​​to the openbsd-inetd.conf file. For example, if the system were used only for FTP services, it would be not only inefficient to execute any other service but also less secure.

We could also change openbsd-inetd.conf to just start FTP services as needed and nothing else. If we only want this system to be accessible to a list of IP addresses or just an internal network, we can configure that access in openbsd-inetd.conf. Often called super-server, inetd monitors connections on a number of TCP or UDP ports often used for Internet services such as FTP, POP3, or telnet. When the operating system receives a TCP or UDP packet on a specific port, inetd starts the appropriate server program.

For services that are not expected to generate too much traffic, this boot method uses computer memory more efficiently, as the service is run only if necessary. Furthermore, server applications do not need to include networking code, inetd redirects the socket to stdin, stdout, and stderr.

About the author

Ilias spiros
By Ilias spiros

Recent Posts

Archives

Categories