The inetd configuration file [ Configuring and Managing MPE/iX Internet Services ] MPE/iX 5.5 Documentation
Configuring and Managing MPE/iX Internet Services
The inetd configuration file
The Internet daemon accesses the configuration data it needs by reading
the file /etc/inetd.conf in the POSIX name space. When you install or
update to version C.55.00 of MPE/iX, you receive a sample configuration
file that you can use as a template for your own inetd configuration file
if you don't already have one. This process involves two steps:
creating the actual file in the MPE name space and creating a symbolic
link that points from the POSIX file /etc/inetd.conf to the MPE file.
The steps to create and link the file is explained later in this section.
The reasons Hewlett-Packard recommends symbolic linking is explained in
"Linking the configuration files" in Chapter 1.
The Internet daemon reads its configuration file on three occasions:
* when inetd is started during normal system startup
* when inetd is started following a network shutdown as opposed to a
system shutdown
* when you instruct an executing inetd to reread the configuration
file after you have made changes to it that you wish to put into
effect
Creating and linking the inetd configuration file
You may already have a configuration file for inetd installed on your
system. If you know that you have such a file, and it is accessible by
the POSIX file name /etc/inetd.conf you may skip these steps.
If not, follow the steps below to create the file and link to it. If you
have such a file, but are unsure whether or not it is linked, perform
step 2 only.
1. Create your own configuration file by using the COPY command to
rename the sample file. Enter:
:COPY INCNFSMP.NET.SYS TO INETDCNF.NET.SYS
2. Create a symbolic link from /etc/inetd.conf in the POSIX name
space to INETDCNF.NET.SYS. Enter:
:NEWLINK /etc/inetd.conf, INETDCNF.NET.SYS
3. Check the security provisions of the file and change them, if
necessary. Hewlett-Packard recommends that only MANAGER.SYS has
write access to INETDCNF.NET.SYS, and write and purge access to
/etc/inetd.conf.
Adding new services to the inetd configuration
There are two steps required to add a new service to the suite of
Internet Services offered on your system. First you enter a line of
information for the specific service to the inetd configuration file.
Then you have inetd reread its configuration file, which is sometimes
called reconfiguring the Internet daemon. In the unlikely event that
inetd is not running when you edit the configuration file, you will
invoke the new configuration by starting inetd. Starting inetd is
explained later in this chapter.
To edit the inetd configuration file, do the following:
1. Open the configuration file with a text editor. You may edit the
/etc/inetd.conf file from the POSIX shell or the INETDCNF.NET.SYS
file from MPE/iX, whichever you prefer. Both file names should
point to the same file.
The contents will resemble the figure below.
_________________________________________________________________________________
| |
| |
| ###################################################################### |
| # |
| # sample inetd configuration file |
| # |
| # For information on how to configure this file refer to the Configuring |
| # and Managing Internet Services manual |
| # |
| # Note: The entries cannot be preceded by a blank space. Blank lines |
| # and lines beginning with a pound sign(#) are ignored. |
| # |
| ###################################################################### |
| # |
| # Internet server configuration database |
| # |
| echo stream tcp nowait MANAGER.SYS internal |
| echo dgram udp nowait MANAGER.SYS internal |
| daytime stream tcp nowait MANAGER.SYS internal |
| daytime dgram udp nowait MANAGER.SYS internal |
| time stream tcp nowait MANAGER.SYS internal |
| time dgram udp nowait MANAGER.SYS internal |
| discard stream tcp nowait MANAGER.SYS internal |
| discard dgram udp nowait MANAGER.SYS internal |
| chargen stream tcp nowait MANAGER.SYS internal |
| chargen dgram udp nowait MANAGER.SYS internal |
| #telnet stream tcp nowait MANAGER.SYS internal |
| #bootps dgram udp wait MANAGER.SYS /SYS/NET/BOOTPD bootpd |
| #tftp dgram udp wait USER.TFTP /SYS/NET/TFTPD tftpd |
| # |
| |
_________________________________________________________________________________
2. Each of the services that run under inetd must have an entry in
the configuration file. For example, the entry for the tftp
program in INETDCNF.NET.SYS looks like this:
tftp dgram udp wait NET.SYS /SYS/NET/TFTPD tftpd
For the service that you are installing, check the file to see if
it has the correct entry. (Each chapter in the remainder of this
manual has this information. The meaning of the individual fields
in an entry are explained later in this chapter.) If not, enter
the line now using the "Editing tips" section, next, as a
guideline.
3. Save the file and exit the editor program.
4. Signal inetd to reread the configuration file by entering the
following command at the CI prompt:
:INETD.NET.SYS -c
Or you may enter this command from the POSIX shell:
$/etc/inetd -c
Editing tips.
When you are editing the inetd configuration file, keep in mind these
points:
* If you find the line, but it has been "commented out" (that is,
preceded by a pound sign,#), the service has not yet been enabled.
To enable it, simply delete the pound sign and any spaces that
precede the service name.
* If you need to type the line into the file:
* use only lower case characters
* enter the service name in the first column without any
leading spaces
* separate the individual fields on the line with any number
of blanks or tab characters to improve readability
Fields in an inetd configuration file entry.
Each entry in the inetd configuration file conforms to a common format in
which each of the fields has a specific purpose. For example, the entry
for TFTP looks like this:
tftp dgram udp wait NET.SYS /SYS/NET/TFTPD tftpd
Reading an entry from left to right, these fields are:
Field Purpose
service name The name of the service in the services file.
socket type Either stream if the socket is a stream socket, or
dgram if the socket is a datagram socket. For more
information about types of sockets, read "What inetd
does" at the beginning of this chapter.
protocol A valid protocol name, either tcp or udp, as entered
in the protocols file.
wait state One of two states, wait or nowait, that applies only
to datagram sockets. The wait entry instructs inetd
to execute only one datagram server for the specified
socket at any one time. This is a single-threaded
datagram server. The nowait entry instructs inetd to
execute a datagram server for a specified socket
whenever a datagram arrives, which frees the socket
so that inetd can receive further datagrams. This is
a multi-threaded datagram server.
user The identification of the user when the server is
running.
server program The absolute path of the program that inetd executes
when it receives a connection request.
arguments Arguments to the server program, beginning with
argument zero, which is the name of the program.
MPE/iX 5.5 Documentation