• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Understanding /etc/xinetd.d directory under Linux

by admin

xinetd daemon

The xinetd daemon is a TCP wrapped super service which controls access to a subset of popular network services including FTP, IMAP, and telnet. It also provides service-specific configuration options for access control, enhanced logging, binding, redirection, and resource utilization control.

When a client host attempts to connect to a network service controlled by xinetd , the super service receives the request and checks for any TCP wrappers access control rules. If access is allowed, xinetd verifies that the connection is allowed under its own access rules for that service and that the service is not consuming more than its allotted amount of resources or in breach of any defined rules. It then starts an instance of the requested service and passes control of the connection to it. Once the connection is established, xinetd does not interfere further with communication between the client host and the server.

The /etc/xinetd.d/ Directory

The files in the /etc/xinetd.d/ directory contains the configuration files for each service managed by xinetd and the names of the files correlate to the service. As with xinetd.conf, these files are read only when the xinetd service is started. For any changes to take effect, the administrator must restart the xinetd service.

# ls -lrt /etc/xinetd.d/
total 60
-rw-r--r--. 1 root root  332 Mar 28  2014 rsync
-rw-------  1 root root 1150 Dec 16  2015 time-stream
-rw-------  1 root root 1149 Dec 16  2015 time-dgram
-rw-------  1 root root 1212 Dec 16  2015 tcpmux-server
-rw-------  1 root root 1150 Dec 16  2015 echo-stream
-rw-------  1 root root 1148 Dec 16  2015 echo-dgram
-rw-------  1 root root 1159 Dec 16  2015 discard-stream
-rw-------  1 root root 1157 Dec 16  2015 discard-dgram
-rw-------  1 root root 1159 Dec 16  2015 daytime-stream
-rw-------  1 root root 1157 Dec 16  2015 daytime-dgram
-rw-------  1 root root 1159 Dec 16  2015 chargen-stream
-rw-------  1 root root 1157 Dec 16  2015 chargen-dgram
-rw-------. 1 root root  429 Aug 22 00:56 rsh
-rw-------. 1 root root  376 Aug 22 00:56 rlogin
-rw-------. 1 root root  359 Aug 22 00:56 rexec

The format of files in the /etc/xinetd.d/ directory use the same conventions as /etc/xinetd.conf. The primary reason being the configuration for each service is stored in a separate file is to make customization easier and less likely to effect other services.

To gain an understanding of how these files are structured, consider the /etc/xinetd.d/rsync file:

# cat /etc/xinetd.d/rsync 
# default: off
# description: The rsync server is a good addition to an ftp server, as it \
#	allows crc checksumming etc.
service rsync
{
	disable	= yes
	flags		= IPv6
	socket_type     = stream
	wait            = no
	user            = root
	server          = /usr/bin/rsync
	server_args     = --daemon
	log_on_failure  += USERID
}

These lines control various aspects of the rsync service:

  • service – Defines the service name, usually one listed in the /etc/services file.
  • disable – Defines whether or not the service is active.
  • flags – Sets any of a number of attributes for the connection.
  • socket_type – Sets the network socket type to stream.
  • wait – Defines whether the service is single-threaded (yes) or multi-threaded (no).
  • user – Defines what user ID the process process will run under.
  • server – Defines the binary executable to be launched.
  • server_args – Defines arguments if any to be passed to binary executable to be launched.
  • log_on_failure – Defines logging parameters for log_on_failure in addition to those already defined in xinetd.conf.
Understanding /etc/xinetd.conf file in Linux

Filed Under: CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. as: command not found
  2. How To Configure SNMP Daemons: snmpd and snmptrapd on CentOS/RHEL 5,6 and 7
  3. md5sum: command not found
  4. ipcs Command Examples in Linux
  5. Firewalld Command line Reference (Cheat Sheet)
  6. What causes iptables to load every time after a reboot even when it’s completely turned off
  7. What is Soft Links and Hard Links in Linux File System
  8. How to Configure YUM to connect to Oracle Public Repository in Oracle Enterprise Linux
  9. legit: command not found
  10. Change default kernel (boot with old kernel) – CentOS/RHEL/OEL 7

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright