Linux Xinetd Network services

Welcome to the World of Linux Server Management, Windows Server Management, Kernel Programming, Ethical Hacking, Cloud Solutions, Vmware Vsphere ESXi, Xen Servers, Server hardening, Server administration etc.,

The service, xinetd, is a service designed to provide the same functionality as inetd, but with better configuration options and better security. It provides the same services as inetd, so you will not need to run inetd with this service and can substitute this service for inetd. This service is easy to install and run. It is meant as a replacement for inetd, but can be run at the same time inetd is being run. If you decide to run both inetd and xinetd, but you should not run the same services, such as telnet or ftp, on both inetd and xinetd at the same time. Xinetd will support the hosts.allow and hosts.deny features using the tcp wrapper daemon, the same as inetd does.

Obtaining xinetd

It is very easy to obtain, compile, and install xinetd. You may obtain FAQ information from: and complete documentation with source and binaries may be obtained from Also there is a very good xinetd tutorial which describes installation and configuration (yes, better than this documentation) at It is written for users running Linux on a MacIntosh, but it applies very well to xinetd and Linux in general.

Compilation and installation

Download the code to a location like “/usr/local/xinetd” then enter the directory you downloaded xinetd to. Follow the following procedure to unpack a source tar file, compile, and install the package:

  1. Type “tar xvzf xinetd-2_1_8_9p3_tar.gz” to unpack the file.
  2. Type “cd xinetd-″ to enter the directory the files were unpacked to.
  3. Read the README and INSTALL files with the commands “less README” and “less “INSTALL”.
  4. Type “./configure — with-libwrap –with-loadavg”. Some documentation recommends not using the –with-libwrap option since xinit supports its own method of providing the same capabilities of hosts.allow and hosts.deny.
  5. Type “make”.
  6. Type “make install”. This will install the man pages, xinetd.conf, xinet.log, xinetd, and itox. These files will be accessible by typing “man” followed by the name of the file such as “man xinetd”. It will also install the binary programs, xinetd, itox, and
    1. At this point, you may not have ready access to these programs unless the directory /usr/local/sbin is in your system path. You can find out by issuing the command “env” and looking at the value of your path variable. If the directory is named in the path variable, you are set. If not, you will need to add it to your system path.
    2. If you are only going to require these commands while logged in as root (which is likely), you can edit the .bash_profile file in the root directory (/root/.bash_profile). This assumes you are using the bash shell, otherwise edit the appropriate file for the shell you are running. Add “:/usr/local/bin” to the statement that begins with “PATH”. If no statement starting with “PATH” exists, add the statement “PATH=$PATH:/usr/local/bin”.
    3. If you want this path added for all users, you may add the statements as described above to the /etc/profile file.
  7. The xinetd documentation says to issue the < /etc/inetd.conf > /tmp/xinetd.conf

    But I recommend using the command: < /etc/inetd.conf > /etc/xinetd.conf

    This will create a configuration file for xinetd from your original inetd.conf file.

  8. You now need to start the service. The easy way to do this is to modify the /etc/rc.d/init.d/inet file and replace all occurrences of inetd by xinetd. Since xinetd is installed to /usr/local/sbin rather than /usr/sbin, you will need to account for this in your file modifications or copy xinetd to /usr/sbin.
  9. If you have a problem getting the service to run right consider the following pitfalls:
    • If you converted your inetd.conf file to xinetd.conf, and were running with tcp wrappers in inetd, and did not compile tcp wrapper support into xinetd with the option –with-libwrap, you will need to either compile the option in or modify your configuration file so tcp wrappers are no longer used. this can generally be done by moving the server arguments to the server value, and the server arguments will be set to what would have been on the server command line or the value -1. For instance the entry:


      The entry:

    • You may need to add the line “groups = yes” to each service. See the xinetd.conf man page.
Content Protection by

Posted by:

Juno David Antony K
Juno David is the founder of Server Management 24x7 community and owner of this blog. He has been into the IT industry for more than 5 years with hands on experience on most of the leading technologies / domains. Juno David is a very energetic, dynamic and vibrant professional. He is part of the core management team at AssistanZ Networks ( He joined AssistanZ way back in 2012 as Manager - Quality Assurance, later on taking over the additional responsibilities of Team Operations & Business Development too. He has excellent analysis / troubleshooting skills. He has deep experience in systems and communications and is always focused to get clients satisfaction. Very positive attitude towards work.

Let us Know Your Comments and Suggestions !

Loading Facebook Comments ...
Loading Disqus Comments ...

No Trackbacks.

Related articles

Subscribe to the FSF

Support software freedom!

Get the new monthly newsletter-
The Free Software supporter.

cPanel Certified Tech

cPU Badge

Support FOSS !

Support freedom

Like us on Facebook !

Back to Top