Linux FTP and Xinetd

Back       

An alternative to inetd is the Extended Internet Services Daemon(xinetd).   xinetd is configured in the /etc/xinetd.conf file, which provides the same information to xinetd as inetd.conf provides to inetd.   The name of the transport protocol is defined using the protocol attribute, for example; protocol = tcp.


  ex.: 


  $ cat /etc/xinetd.conf

  #

  # simple configuration file

  # for xinetd

  # some defaults, and include

  # /etc/xinetd.d/


  defaults

  {

     instances   = 60

     log_type   = SYSLOG authpriv

     log_on_success  = HOST PID

     log_on_failure   = HOST

     cps   = 25 30

  }


  includedir  /etc/ xinetd.d



Note

 

instances 

   This specifies the maximum number of daemons providing any one type of service that can be running simultaneously.   

   is set to a numeric value or to the keyword UNLIMITED 

log_type 

   tell's or defines where messages will be logged.

    • FILE pathname, this settings tells xinetd to log activity to the file identified by pathname 
    • SYSLOG syslog_facility, tell's xinetd to use the standard syslogd daemon to log activity.   
    • syslog_facility is defined in /etc/syslog.conf.syslog_level 

log_on_success 

   defines the information that is logged when a successful connection is made to a local service.

log_on_failure 

   defines the information that is logged when an attempt to connect to a local service is unsuccessful.   

   Logs the address of the remote system(HOST) that attempted the connection.

cps 

   this sets connectins-per-second limits for the services.   The first value is the maximum number of connection for any service that will be accepted in

   a single second.   If that number is exceeded, xinetd will stop accepting connections for that servcie, and will wait the number of seconds specified

   by the second number before accepting no more than 25 connections to any one service in a single second, and to wait 30 seconds if more than 25

   connection attempts are made before accepting more connections for that service.


A listing of the /etc/xinetd.d directory shows the xinetd configuration files on our sample Red Hat system and as follows:


  $ ls /etc/xinetd.d