Next Previous Contents

10. xinetd

As of Redhat 7.x, many people have asked how to implement the virtual services into their system. This is quite straight forward, as explained in the email by Rodrigo B. Pereira:

As for xinetd, it's all pretty simple, just a matter of adaptation to the
new organization of things. In this case (RH 7.0), every service is
configured on a separate file, under /etc/xinetd.d, but you can also use
just one file, just a matter of editing /etc/xinetd.conf. HoweverI think
it's very nice this way.

Let's take this telnet example:

# default: on
# description: The telnet server serves telnet sessions; it uses \
#       unencrypted username/password pairs for authentication.
service telnet
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/local/bin/virtuald
        server_args     = /home/virtual/conf.telnet /usr/sbin/in.telnetd
        log_on_failure  += USERID
}

The key point here is server_args. The 'server' line should always point
to the absolute path of virtuald. The 'server_args' line consists of the
cvnf.service file, followed by the absolute path of the real service
daemon. This sure looks much nicer than on inetd.conf.

Every "real" server arguments, are passed along with the daemon abs. path.
For example, with wu-ftpd, the server_args line would look like this:

server_args             = /home/virtual/conf.ftp /usr/sbin/in.ftpd -l -a

Resuming:        server = /path/to/virtuald
                 server_args = /path/to/conf/service/conf.service
path.to.real.daemon/read.daemon any.daemon.args

After configuring, just type this "service xinetd restart" to activate
changes. Or "/etc/rc.d/init.d/xinetd restart", if for some weird reason
service isn't available.


Next Previous Contents