Xinetd Suggestion

Jim Gifford lfs at jg555.com
Tue Dec 14 10:31:12 PST 2004


A notice a lot of things are going to the .d directories. I have noticed 
the xinetd does have it yet. So here is a simple way to do it

Create a directory /etc/xinetd.d
mkdir /etc/xinetd.d

Create xinetd.conf

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

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

# All Program data is stored at
#
includedir /etc/xinetd.d
EOF

Then in /etc/xinetd.d, you can create separate files for services
Here are a few examples,

cat >  /etc/xinetd.d/fam << "EOF"
# Service FAM - File Alteration Monitor
#
service fam
{
                disable         = no
                type            = RPC UNLISTED
                socket_type     = stream
                user            = root
                wait            = yes
                server          = /usr/sbin/famd
                protocol        = tcp
                rpc_version     = 2
                rpc_number      = 391002
}
EOF

cat >  /etc/xinetd.d/proftp << "EOF
# Service ftp - FTP Server
#
service ftp
{
                disable         = no
                socket_type     = stream
                user            = root
                wait            = no
                server          = /usr/sbin/in.proftpd
                protocol        = tcp
                flags           = REUSE
}
EOF

cat >  /etc/xinetd.d/ssh << "EOF
# Service ssh - Secure Shell
#
service ssh
{
                disable         = no
                socket_type     = stream
                user            = root
                wait            = no
                server          = /usr/sbin/sshd
                server_args     = -i
                protocol        = tcp
                nice            = 10
                log_on_success  = USERID PID HOST EXIT DURATION
}
EOF

-- 
------
jim at linuxfromscratch.org
lfs at jg555.com

LFS User # 2577
Registered Linux User # 299986

FWD: 275410
IPKall: 360-968-1517




More information about the blfs-dev mailing list