About Xinetd

Xinetd stands for the extended Internet services daemon. It is an open source super server daemon and it runs on many Unix like systems. Xinetd can manage Internet based connectivity and performs the same function as inetd (Internet daemon). It is used to start programs that provide Internet services. Xinetd is also referred as a super server.  Instead of having such servers started at system initialization time, and be dormant until a connection request arrives. It is the only daemon process started and it listens on all service ports for the services listed in its configuration file. It will start the appropriate server if any request comes. Xinetd act as a super-server to provide features such as access control, logging, and provides many advantages. It conserves resources, running daemons only when needed also it offers an additional layer of security. Xinetd can turn virtually any script or program into a service.

 

The services listed in configuration file of xinetd can be separated into two groups.

1) Multi-threaded: It is listed in the first group and it requires the forking of a new server process for each new connection request. The connection is handled by the new server. Xinetd keeps listening for new requests so that it can spawn new servers.

2) Single-threaded: This is listed in the second group and this includes services for which the service daemon is responsible for handling all new connection requests. The xinetd will stop handling new requests for them until the server dies. The services in this single-threaded group are usually datagram-based.

 

Xinetd installation

1) Download the file

# wget https://archlinux.pkgs.org/rolling/archlinux-core-x86_64/xinetd-2.3.15-5-x86_64.pkg.tar.xz.htmlhttp://www.xinetd.org/xinetd-2.3.14.tar.gz

2) Extract files

# tar -xf xinetd-2.3.14.tar.gz

3)  # cd xinetd-2.3.14

4)  # ./configure

5) # make

6) # make install

7) To edit the configuration file open file

# vi /etc/xinetd.conf

8) To restart xinetd service

# /etc/init.d/xinetd restart

9) To stop xinetd service

# /etc/init.d/xinetd stop

10) To start xinetd service

# /etc/init.d/xinetd start

11) To check status

# /etc/init.d/xinetd status

 

/etc/xinetd.conf file parameters

instances: It specifies the maximum number of services that xinetd can invoke at the same time.

log_type: This parameter sets xinetd to use the SYSLOG authpriv facility.

log_on_success: It specifies the logging information when a connection is successful.

log_on_failure: This parameter specifies the logging information when a connection fails. HOST and USERID are the typical values included in this parameter.

cps: It controls the rate of incoming connections.

includedir: It specifies the directory that xinetd must read for specific configurations.

 

Options of xinetd

d: This option enables debug mode and produces a lot of debugging output, and it makes it possible to use a debugger on xinetd.

-syslog syslog_facility: It enables syslog logging of xinetd-produced messages using the specified syslog facility. It is ineffective in debug mode since all relevant messages are sent to the terminal.

-filelog logfile: Xinetd-produced messages will be placed in the specified file and this messages are always appended to the file. If the file does not exist, it will be created. All the relevant messages are sent to the terminal so this option is ineffective in debug mode since.

-f config_file: It determines the file that xinetd uses for configuration. The default file is /etc/xinetd.conf.

-pidfile pid_file: This is used to add process ID to the file. This option is also ineffective in debug mode.

-dontfork: It tells xinetd to stay in the foreground rather than detaching itself, to support being run from init or daemon tools.

-limit proc_limit: This option places a limit on the number of concurrently running processes that can be started by xinetd and the main purpose is to prevent process table overflows.

-logprocs limit: This option is used to place a limit on the number of concurrently running servers for remote use rid acquisition.

-version: This option allows xinetd to print out its version information.

-inetd_compat: This causes xinetd to read /etc/inetd.conf in addition to the standard xinetd config files. /etc/inetd.conf is read after the standard xinetd config files.

-cc interval: It instructs xinetd to perform periodic consistency checks on its internal state every interval seconds.

 

If you need any further assistance please contact our support department.

Was this answer helpful? 0 Users Found This Useful (0 Votes)