Create new xinetd services in Fedora


Linux daemon xinetd is a useful tool for setting up remote service. As an example, we here introduce how to create a new xinetd service binding to a specific port number in Fedora.

1. Create a new xinetd service foo:
# vi /etc/xinet.d/foo
service foo
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/foo
instances = 20
port = port_no
}

2. Start xinetd daemon:
# /etc/init.d/xinetd start

3. Verify if xinetd daemon is running:
# /etc/init.d/xinetd status

4. Enable foo service:
# chkconfig foo on

5. Verify if foo service is enabled:
# chkconfig --list | grep foo

6. Verify if foo service port is listening:
# lsof -i | grep foo
Or # netstat -tulanp | grep ":port_no"
Or # netstat -anp | grep ":port_no"

7. On another host, connect to remote ECHO port via telnet
# telnet 'host' 'port_no'

Free Web Hosting