Network Daemons  «Prev 

etc/inetd. conf Example

Which information is contained within the etc/inetd.conf file in Linux ? The /etc/inetd.conf file in Linux contains a list of services that inetd (the internet super server) will start when it receives a request. Each service is defined on a separate line, with the following fields:
  1. Service name: The name of the service. This must be a valid service name, as defined in the /etc/services file.
  2. Protocol: The protocol that the service uses. This can be either TCP or UDP.
  3. Endpoint: The port number that the service listens on.
  4. Program: The path to the program that implements the service.
  5. Arguments: Any arguments that should be passed to the program when it is started.

For example, the following line defines a service called ftp that listens on port 21 and uses the program /usr/sbin/ftpd:
ftp stream tcp nodelay /usr/sbin/ftpd
When inetd receives a request for the ftp service, it will start the /usr/sbin/ftpd program and pass it the port number 21 as an argument. The ftpd program will then listen on port 21 for incoming connections.
Seven elements described in etc/inetd.conf
Seven elements described in etc/inetd.conf
examine some sample lines from /etc/inetd.conf
  1. The name of the service that this line controls. This must be mentioned in /etc/services.
  2. The socket type. The most common possibilities are stream or dgram. The stream type is used with tcp in the next field, the dgram type with UDP.
  3. Specifies whether this is a TCP or UDP service.
  4. Wait status. Wait means run this service as an iterative server (wait for one server to finish before starting another). Nowait means run it as a concurrent server (fork a server process, then go right back to listening on the port).
  5. The user ID that will own the server process started by inetd.
  6. The path name of the server process inetd will start.
  7. Arguments. Any arguments to the server process started by inetd.

/etc/inetd.conf file

The /etc/inetd.conf file is the default configuration file for the inetd (super-server) daemon. As shipped, this file describes all currently supported QNX Neutrino TCP/IP daemons and some nonstandard pidin services. Unless you want to add or remove daemon definitions, you don't need to modify this file. The file must have an entry in each of its fields, with each field separated by a tab or a space. Comments are denoted by a pound sign (#) at the beginning of a line. The fields in the configuration file are:

[addr:]service-name | service-name/version
server program arguments