Next Previous Contents

7. The super-servers

7.1 inetd

Introduction

Some services are supplied by one single daemon. This daemon listens on several ports and starts the server when a connection is requested. This saves on memory and processor usage, but is ofcourse slower, since the server is started after the connection request is received.

Configuration

The default server for this super-server functionality is called inetd and has /etc/inetd.conf as it's configuration file. An example file might look like this:


# See "man 8 inetd" for more information. 
# 
# If you make changes to this file, either reboot your machine
# or send the inetd a HUP signal with "/sbin/init.d/inetd reload"
# or by hand: 
# Do a "ps x" as root and look up the pid of inetd. Then do a 
# "kill -HUP <pid of inetd>". 
# The inetd will re-read this file whenever it gets that signal. 
# 
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> 
#
# ftp stream tcp nowait root /usr/sbin/tcpd wu.ftpd -a 
# ftp stream tcp nowait root /usr/sbin/tcpd proftpd 
ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd

To make inetd a bit more safer, one could supply an ip-address before a service:


192.168.1.1:telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd

This means that only telnet connections coming to ip-address 192.168.1.1 are allowed. More interfaces can be supplied by using a comma seperated list.


Next Previous Contents