System Administration Guide: IP Services

inetd Internet Services Daemon

An IPv6–enabled server is a server that can handle IPv4 or IPv6 addresses. The server uses the same protocol that the corresponding client uses. The /etc/inet/inetd.conf file contains the list of servers that inetd(1M) invokes when this daemon receives an Internet request over a socket. Each socket-based Internet server entry is composed of a single line that uses the following syntax:


service_name socket_type proto flags user server_pathname args

See the inetd.conf(4) man page for a description of the possible values for each field. In the Solaris operating environment, to specify a service as IPv6-enabled in the /etc/inet/inetd.conf file, you must specify the proto field as tcp6 or udp6. If the service is IPv4-only, the proto field must be specified as tcp or udp. By specifying a proto value of tcp6 or udp6 for a service, inetd passes the specific daemon an AF_INET6 socket.

The following entry in the inetd.conf file depicts a udp server (myserver) that can communicate with both IPv4 and IPv6 client applications.


Example 16–3 Server Communicating With Both IPv4 and IPv6 Client Applications


myserver   dgram   udp6	wait	root	/usr/sbin/myserver	myserver

An IPv6–enabled server can inherit an AF_INET (IPv4 only) or an AF_INET6 (IPv6 and IPv4) socket from inetd. The proto value for the service is specified as either tcp6 (udp6) or tcp (udp). For these types of servers, you can also specify two inetd.conf entries. You can specify proto as tcp. You can also specify proto as tcp6.


Note –

Because AF_INET6 sockets work with either the IPv4 or IPv6 protocols, specifying a proto value of tcp6 (udp6) is sufficient.


See Programming Interfaces Guide for details on writing various types of IPv6–enabled servers.

All servers that are provided with Solaris software require only one inetd entry that specifies proto as tcp6 or udp6. However, the remote shell server (shell) and the remote execution server (exec) must have an entry for both the tcp and tcp6 proto values. The following example shows the inetd entries for rlogin, telnet, shell, and exec.


Example 16–4 inetd.conf Entries for Servers Provided With Solaris Software


login stream	tcp6 nowait root  /usr/sbin/in.rlogind  in.rlogind
telnet stream	tcp6 nowait root /usr/sbin/in.telnetd in.telnetd
shell	stream	tcp	nowait	root	/usr/sbin/in.rshd	in.rshd
shell	stream	tcp6	nowait	root	/usr/sbin/in.rshd	in.rshd
exec	stream	tcp	nowait	root	/usr/sbin/in.rexecd	in.rexecd
exec	stream	tcp6	nowait	root	/usr/sbin/in.rexecd	in.rexecd

TCP Wrappers are a public domain utility that is used to monitor and to filter incoming requests for various network services, such as telnet. If you specify TCP Wrappers as the server_pathname for any of these services, you must ensure that TCP Wrappers are IPv6 capable. Otherwise, you must specify proto as tcp or udp for those services that are being used with TCP Wrappers.

In addition, if you replace a Solaris utility with another implementation, you must verify if the implementation of that service supports IPv6. If the implementation does not support IPv6, then you must specify the proto value as either tcp or udp.


Note –

If you specify proto as tcp or udp only, the service uses only IPv4. You need to specify proto as tcp6 or udp6 to enable either IPv4 or IPv6 connections. If the service does not support IPv6, then do not specify tcp6 or udp6.


See IPv6 extensions to the Socket API in Programming Interfaces Guide for more details on writing IPv6 enabled servers that use sockets.