5. /etc/services and other files

You probably don't need to configure these files. They have to be correct, otherwise things won't work, but the standard configurations (from recent distributions) are all pre-configured.

5.1 /etc/services - PORTS
5.2 /etc/inetd - DAEMONS
5.3 Others - PERMISSION


/etc/services - PORTS

/etc/services lists the TCP and UDP port numbers used by different services. Sendmail for example, will be listening on port 25 because it requested the smtp port by name, which when looked-up by the software becomes port-25

... many other lines ...

smtp            25/tcp          mail
finger          79/tcp
www             80/tcp          http    # WorldWideWeb HTTP
www             80/udp                  # HyperText Transfer Protocol

Since sendmail does use /etc/services, when I want to reboot my machine without starting sendmail, I simply edit /etc/services, and set the smtp line to 2525. Then it listens on the wrong port, and doesn't receive (or bounce) any email. The sender simply gets a service not available, and retries later.


/etc/inetd - DAEMONS

You might have to edit /etc/inetd to switch between daemons that are always running, and daemons that get started (by inetd) on the first request over the network. RTFM inetd(8) tcpd(8)

finger  stream  tcp     nowait  daemon  /usr/sbin/tcpd  /usr/sbin/in.fingerd
systat  stream  tcp     nowait  guest   /usr/sbin/tcpd  /usr/bin/ps     -auwwx
netstat stream  tcp     nowait  guest   /usr/sbin/tcpd  /bin/netstat    -f inet

For example, the finger line, means that on my system, ther isn't a finger daemon running all the time, but if you call me on that port (as listed in /etc/services), inetd will start up in.fingerd for that connection. That saves memory and gives a slightly faster boot-up time.

/etc/inetd also contains "wrappers", that can be used to log every connect to your box, and authenticate who the remote caller is.



After inetd, individual services have their own permission control and configuration files, such as:

There are several of these, but you probably don't have to do anything just yet, as the defaults are usually reasonable. At least not until you notice that that particular service isn't running as you expected.

Though of course you have to go through the list, to see what your system is and isn't doing.