You are on page 1of 3

# $Id: dtelnetd.txt,v 1.

11 99/10/11 13:50:09 dan Exp $ -------------------------------------dtelnetd - Deterministic telnet Server -------------------------------------dtelnetd is a telnet server which allows you to explicitly establish a deterministic mapping between TCP ports and host system pty slave nodes. This is useful in situations where applications are dependent on such fixed mappings and when it is desirable to associate remote physical terminal connections with specific pty devices. -------------------------------------------Requirements and System Specific Information -------------------------------------------In order to use the dtelnetd server, your host system must be configured to emulate BSD-style ptys which adhere to the BSD naming convention (see step 2 under "Configuring dtelnetd" below). 1) Motorola System V/88 Release 4.0 This SVR4 based OS has a STREAMS-based pty subsystem which can be configured to emulate BSD-style ptys (called BCS pseudo-terminals). This is accomplished by adding the following line to the /stand/system configuration file: INCLUDE:BCSPTS The system must then be rebooted for changes to take effect. -------------------Configuring dtelnetd -------------------Configuring the dtelnetd server is four-step process: 1) Add network service identifiers in /etc/services. Each pty slave mapping requires its own seperate service definition in the /etc/services file. These definitions have the following format: <service name> <TCP port>/tcp An example of three definitions, along with suggested values is: dtd-9000 dtd-9001 dtd-9002 etc... 9000/tcp 9001/tcp 9002/tcp

The service names will be used in step 2 to specify the port mapping. NOTE: On Sun-based system using YP/NIS/NIS+, you will

On most systems.x SunOS 5.2 <service name> stream tcp nowait root /usr/etc/inet/dtelnetd dtelnetd -p <pty slave> NOVELL UnixWare 2.2 implementations) keep this file in /usr/etc.need to repopulate the NIS databases in order to make the new service definitions take effect. The name of this pty can then be obtained using ttyname() or other equivalent methods once the user is logged in. This name must be a valid BSD-style pty node of the following format: /dev/tty[p-za-l][0-9a-f] Any connections to the specified port will be made over the specified slave pty.0 DIGITAL UNIX (Formerly DEC OSF/1) AIX 4.dtelnetd -p <pty slave> SCO SYSTEM V R3 <service name> stream tcp nowait NOLUID /etc/dtelnetd dtelnetd -p <pty slave> HP-UX Version 9 <service name> stream tcp nowait root /etc/dtelnetd dtelnetd -p <pty slave> The -p is necessary to provide the name of the slave device.conf to establish port to pty mapping.conf entries use the services defined in step 1 (Motorola System V/88 R40): .x) <service name> stream tcp nowait root /usr/sbin/in. This process is different depending on which resolution service you are using. however some systems (notably Motorola SVR3. this file is found in /etc.dtelnetd in. <pty slave> corresponds to the name of the slave-side pty node which will be mapped to this particular port. These entries have one of the following formats. Refer to you Sun documention for information on how to propogate the service definitions into the appropriate system databases. Each of the above service identifiers requires a corresponding entry in the inetd. depending on your system type (on one line): MOTOROLA SYSTEM V/88 R4. but any other standard telnetd options may be added as necessary.x <service name> stream tcp nowait root /usr/sbin/dtelnetd dtelnetd -p <pty slave> MOTOROLA SYSTEM V/88 R3.conf file in order to have inetd listen for connections on those ports. <service name> corresponds to the service port definition from step 1 (above). The following examples of the inetd.x (Solaris 2. 2) Add definitions to inetd.

This directory is the one specified in the inetd. Activating the new services through inetd. Before the changes made to the above files become effective. Find the appropriate directory for your system and place the file there. add the '-c' option to the end of the dtelnetd configuration line in the inetd. Please note that the '-c' option and its associated arguments must be the LAST option on inetd's command line..conf file above. To use this feature. inetd does not support quoting or other shell-related features.dtd-9000 stream tcp nowait /usr/sbin/dtelnetd dtd-9001 stream tcp nowait /usr/sbin/dtelnetd dtd-9002 stream tcp nowait /usr/sbin/dtelnetd etc. =============================== EOF ================================= . This can be done as follows: kill -1 <inetd's pid> 4) ---------------------Using Command-Override ---------------------By default. inetd must be restarted. This is usually accomplished by sending a SIGHUP to the inetd processes (which will then be automatically respawned). Furthermore.. This default command can be overriden using the '-c' Command-Override option. 3) root dtelnetd -p /dev/ttyp0 root dtelnetd -p /dev/ttyp1 root dtelnetd -p /dev/ttyp2 Place the dtelnetd server binary in the appropriate directory.conf file. as in the following example: dtd-9000 stream tcp nowait root /usr/sbin/dtelnetd dtelnetd -p /dev/ttyp0 -c mylogin ttyp0 arg2 arg3 This will execute the command "mylogin ttyp0 arg2 arg2" instead of the standard login command. the dtelnetd daemon will spawn the command "login" whenever it receives a new connection request.