Howto: configure xinetd service under Linux or UNIX systems

www.l‮‬autturi.com
Howto: configure xinetd service under Linux or UNIX systems

The xinetd (Extended Internet Services Daemon) is a powerful and flexible daemon that can be used to run Internet services on a Linux or UNIX system. It is designed to be more efficient and secure than the older inetd daemon, and it provides additional features such as access control and service logging.

To configure a service to be run by xinetd, you will need to create a configuration file for the service in the /etc/xinetd.d directory. The configuration file should have a name that corresponds to the name of the service, and it should contain at least the following settings:

service name
{
    port        = port number
    socket_type = type
    protocol    = tcp
    wait        = yes
    user        = user name
    group       = group name
    server      = path to server program
    server_args = arguments for server program
}
  • name is the name of the service.
  • port is the network port that the service listens on.
  • type is the type of socket used by the service (usually stream for TCP services or dgram for UDP services).
  • protocol is the protocol used by the service (usually tcp or udp).
  • wait specifies whether xinetd should wait for the service to terminate before accepting new connections.
  • user and group specify the user and group that the service should run as.
  • server is the path to the program that runs the service.
  • server_args are the arguments to pass to the server program.

Once you have created the configuration file, you will need to tell xinetd to reload its configuration. You can do this by sending the xinetd daemon a HUP signal, or by restarting the xinetd service.

killall -HUP xinetd

or

service xinetd restart

You can then test the service by connecting to it using a client program. For example, if you have configured an ftp service on port 21, you can use an ftp client to connect to the service and test it.

ftp localhost
Created Time:2017-10-29 22:08:48  Author:lautturi