Related Topics:
 • System Files...
 


 The Inetd.conf File


Why Do You Need This File?

If you've been around UNIX or Linux for a while, you probably know all about the daemon inetd, the inetd.conf file and its companion, the services file. Working together they manage incoming requests for a wide variety of services. Instead of running countless server daemons in the background, inetd spawns processes on demand as they are needed which saves the system from the overload of constant polling. It is a very efficient way of managing requests on a server.

When you are running the AX25 Utilities, it is often very convenient to be able to telnet to the LinuxNode locally and login as a user. Usually the LinuxNode, or node which has been configured in the node.conf file, has its own network-related services that you can take advantage of all in one place, such as listing the link status, the ports, the users on the system, and other custom "calls" that you may configure into the node.conf file. The "node" is the human "interface" to the Utilities.

On my desktop system, I access the node by using this command:

  • telnet . 2001
where the "." stands for localhost. On the SuSE machine, I can't get away with the dot, I have to specifiy "localhost," i.e., telnet localhost 2001. The 2001 number is a port that I have chosen to access this service, the node.



Setting Up the Inetd.conf File for the LinuxNode

First you need to make a backup copy of the inetd.conf file, calling it anything you want, but inetd.conf.copy is a good start. This is a very crucial system file and you don't want to accidently corrupt it. So take the few extra seconds to make the backup. It can be located in /etc or in /tmp.

Now edit the inetd.conf file with your favorite editor. I use vi, but any text editor will do just fine. The inetd.conf file is located in /etc. Below is an excerpt from my inetd.conf file:

Excerpt from the /etc/inetd.conf File

# These are standard services.
#
ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  wu.ftpd
telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  in.telnetd
node    stream  tcp     nowait  root    /usr/sbin/node  node
listen  stream  tcp     nowait  root    /usr/bin/listen listen -a -c -r -t

Insert the line that begins with node. I just happened to place it after the telnet service, but it could go nearly anywhere in the standard services group. Make sure you use the tab key to separate the data fields. When you are finished, close the file, and issue a sighup on the pid for the inetd daemon. This will cause the daemon to re-read the inetd.conf file. The command looks like this:
  • kill -HUP <pid_of_inetd>
where pid_of_inetd is found by running ps ax and noting the PID for inetd in the listing.

The last step is to edit the /etc/services file. Again you might want to make a copy of this one too. The left most column lists the names of the services. The middle lists the port numbers and service type. And the right most column is usually a description of the service. Look at this file carefully, especially the port numbers. You need to find a number that is above 1024 that is not in use. I just happened to choose 2001, named after a famous science fiction movie. On my SuSE machine, I had to search much harder to find a reasonable number (4 digits). Here is the line that you should insert in numerical order based on the port number:

node             2001/tcp                     # LinuxNode
Again, use the tab key to obtain the spacing between fields. Close the file as usual.

You now should be able to reach your own node from the console! :)



(Courtesy KBNorton Computer Services)