Configuring Various Network Services Using Xinetd in Linux RHEL5
Configuring Various Network Services Using Xinetd in Linux RHEL5
o
o
o
o
o
o
o
o
o
o
o
o
o
o
o
As a system administrator, you will most likely need to provide your users with network and Internet
services. These services may include FTP, HTTP, or Telnet.
Although some software packages like Apache provide a single service (HTTP), there is also a master service
called xinetd that can run multiple services at the same time.
It is also a widely used service in the real world, particularly when it comes to automating the installation of
Red Hat. There are really only a few things that you need to know to be able to use the xinetd service. This
package doesnt always come installed by default, so first lets install it.
Aside from this master config file, a single directory (/etc/xinetd.d) contains individual config files for each
service you would like xinetd to run.
As an example, lets set up a TFTP server, which can be used to back up config files for Cisco switches or to
deliver data to clients during a PXE boot process (also known as a network installation).
# cat /etc/xinetd.d/tftp
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = yes
per_source = 11
cps = 100 2
flags = IPv4
}
Here, you can see the basics, such as which protocol it uses, whether the service is disabled, and what
arguments are passed to the service during startup. For this example, all the defaults work fine. You may be
wondering why I suggest leaving the service disabled if you want to use it. Services that are controlled by
xinetd can be enabled in the config file when you enable them during the boot process.
Step 5. Enable the TFTP server to start when the system boots:
# chkconfig tftp on
Step 7. At this point, you should also enable the xinetd service itself
to start on system boot:
# chkconfig xinetd on
Step 10. To get the service up and running without a system reboot,
just adjust any config file options youd like and restart the xinetd
service:
# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
Step 11. Verify that the xinetd service is now running on the system
and listening on UDP port 69 for connections: