xinetd-2.3.15

Introduction to xinetd

xinetd is the eXtended InterNET services daemon, a secure replacement for inetd.

This package is known to build and work properly using an LFS-7.4 platform.

Package Information

xinetd Dependencies

Required

libtirpc-0.2.3

Optional

tcpwrappers (deprecated)

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/xinetd

Installation of xinetd

Install xinetd by running the following commands:

sed -i -e "/^LIBS/s/-lpset/& -ltirpc/" xinetd/Makefile.in       &&
sed -i -e "/register unsigned count/s/register//" xinetd/itox.c &&

./configure --prefix=/usr --with-loadavg                        &&
make

This package does not come with a test suite.

Now, as the root user:

make install

Command Explanations

sed ... xinetd/Makefile.in: Ensure the program links against the libtirpc library.

sed ... xinetd/itox.c: Fix some compiler warnings.

Configuring xinetd

Config Files

/etc/xinetd.conf and /etc/xinetd.d/*

Configuration Information

Ensure the path to all daemons is /usr/sbin, rather than the default path of /usr/bin, and install the xinetd configuration files by running the following commands as the root user:

cat > /etc/xinetd.conf << "EOF"
# Begin /etc/xinetd
# Configuration file for xinetd

defaults
{
      instances       = 60
      log_type        = SYSLOG daemon
      log_on_success  = HOST PID USERID
      log_on_failure  = HOST USERID
      cps             = 25 30
}

# All service files are stored in the /etc/xinetd.d directory

includedir /etc/xinetd.d

# End /etc/xinetd
EOF

All of the following files have the statement, "disable = yes". To activate any of the services, this statement will need to be changed to "disable = no".

[Note]

Note

The following files are listed to demonstrate several xinetd applications. In many cases, these applications are not needed. Some classic applications are considered security risks. For example, telnet, rlogin, rexec, and rsh transmit unencrypted usernames and passwords over the network and can be easily replaced with a more secure alternative: ssh.

install -v -d -m755 /etc/xinetd.d &&

cat > /etc/xinetd.d/systat << "EOF" &&
# Begin /etc/xinetd.d/systat

service systat
{
   disable           = yes
   socket_type       = stream
   wait              = no
   user              = nobody
   server            = /usr/bin/ps
   server_args       = -auwwx
   only_from         = 128.138.209.0
   log_on_success    = HOST
}

# End /etc/xinetd.d/systat
EOF

cat > /etc/xinetd.d/echo << "EOF" &&
# Begin /etc/xinetd.d/echo

service echo
{
   disable     = yes
   type        = INTERNAL
   id          = echo-stream
   socket_type = stream
   protocol    = tcp
   user        = root
   wait        = no
}

service echo
{
   disable     = yes
   type        = INTERNAL
   id          = echo-dgram
   socket_type = dgram
   protocol    = udp
   user        = root
   wait        = yes
}

# End /etc/xinetd.d/echo
EOF

cat > /etc/xinetd.d/chargen << "EOF" &&
# Begin /etc/xinetd.d/chargen

service chargen
{
   disable        = yes
   type           = INTERNAL
   id             = chargen-stream
   socket_type    = stream
   protocol       = tcp
   user           = root
   wait           = no
}

service chargen
{
   disable        = yes
   type           = INTERNAL
   id             = chargen-dgram
   socket_type    = dgram
   protocol       = udp
   user           = root
   wait           = yes
}

# End /etc/xinetd.d/chargen
EOF

cat > /etc/xinetd.d/daytime << "EOF" &&
# Begin /etc/xinetd.d/daytime

service daytime
{
   disable        = yes
   type           = INTERNAL
   id             = daytime-stream
   socket_type    = stream
   protocol       = tcp
   user           = root
   wait           = no
}

service daytime
{
   disable        = yes
   type           = INTERNAL
   id             = daytime-dgram
   socket_type    = dgram
   protocol       = udp
   user           = root
   wait           = yes
}

# End /etc/xinetd.d/daytime
EOF

cat > /etc/xinetd.d/time << "EOF" &&
# Begin /etc/xinetd.d/time

service time
{
   disable        = yes
   type           = INTERNAL
   id             = time-stream
   socket_type    = stream
   protocol       = tcp
   user           = root
   wait           = no
}

service time
{
   disable        = yes
   type           = INTERNAL
   id             = time-dgram
   socket_type    = dgram
   protocol       = udp
   user           = root
   wait           = yes
}

# End /etc/xinetd.d/time
EOF

The format of the /etc/xinetd.conf is documented in the xinetd.conf.5 man page. Further information can be found at http://www.xinetd.org.

Boot Script

As the root user, install the /etc/rc.d/init.d/xinetd init script included in the blfs-bootscripts-20130908 package.

make install-xinetd

As the root user, use the new boot script to start xinetd:

/etc/rc.d/init.d/xinetd start

Check the /var/log/daemon.log to ensure the appropriate services are started. If no services are enabled, the program will not start without the -stayalive option.

Contents

Installed Programs: itox, xconv.pl, and xinetd
Installed Libraries: None
Installed Directories: /etc/xinetd.d/

Short Descriptions

itox

is a utility used for converting inetd.conf files to xinetd.conf format.

xconv.pl

is a Perl script used for converting inetd.conf files to xinetd.conf format, similar to itox.

xinetd

is the Internet services daemon.

Last updated on 2013-09-06 10:46:32 -0700