4

inetd - From Wikipedia,

inetd (internet service daemon) is a super-server daemon on many Unix systems that provides Internet services. For each configured service, it listens for requests from connecting clients. Requests are served by spawning a process which runs the appropriate executable, but simple services such as echo are served by inetd itself. External executables, which are run on request, can be single- or multi-threaded. First appearing in 4.3BSD [1], it is generally located at /usr/sbin/inetd.

please advice what is the service - echo ?

  1. how to disable or enable this service ?
  2. if we disable the echo service then on what process/other it will be affect ?

thx for the advice

 tail -20  /etc/inetd.conf 
 # Legacy configuration file for inetd(1M).  See inetd.conf(4).
 #
 # This file is no longer directly used to configure inetd.
 # The Solaris services which were formerly configured using this file
 # are now configured in the Service Management Facility (see smf(5))
 # using inetadm(1M).
 #
 # Any records remaining in this file after installation or upgrade,
 # or later created by installing additional software, must be converted
 # to smf(5) services and imported into the smf repository using
 # inetconv(1M), otherwise the service will not be available.  Once
 # a service has been converted using inetconv, further changes made to
 # its entry here are not reflected in the service.
 #
 #
 # CacheFS daemon.  Provided only as a basis for conversion by inetconv(1M).
 #
 100235/1 tli rpc/ticotsord wait root /usr/lib/fs/cachefs/cachefsd cachefsd
 # TFTPD - tftp server (primarily used for booting)
 #tftp   dgram   udp6    wait    root    /usr/sbin/in.tftpd      in.tftpd -s /tftpboot

remark - the results of this grep command is empty:

 grep echo /etc/inetd.conf

From Wikipedia, ( Echo protocol )

Inetd implementation[edit]On UNIX-like operating systems an echo server is built into the inetd daemon. The echo service is usually not enabled by default. It may be enabled by adding the following lines to the file /etc/inetd.conf and telling inetd to reload its configuration:

echo   stream  tcp     nowait  root    internal
echo   dgram   udp     wait    root    internal

1 Answers1

5

The echo service is a service that dates back to the early internet, when links were unreliable, and it was useful to have a way of checking that what you were sending was received and understood by the other end. So echo is a service that simply sends back whatever was sent to it:

[me@lory ~]$ telnet localhost echo
Trying ::1...
Connected to localhost.
Escape character is '^]'.
asdf
asdf
please echo this
please echo this
it is for testing
it is for testing
^]
telnet> quit

It isn't generally needed in the modern internet, and no service should be relying on it. We can't say for sure, but it is unlikely that you will cause yourself problems by disabling it.

If it's not running, you'll see the standard output for trying to connect to an unfiltered port with no listener:

[me@lory ~]$ telnet localhost echo
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

There's a UDP echo service as well, which can likely be tested in an analagous way using eg netcat.

For the avoidance of doubt, whilst disabling the echo service is probably safe, the same is not true for inetd, which if running is almost certainly responsible for services you need. Do not try to disable echo by disabling inetd.

MadHatter
  • 81,580