inetd – 来自维基百科,
inetd(Internet服务守护程序)是许多提供Internet服务的Unix系统上的超级服务器守护程序.对于每个已配置的服务,它将侦听来自连接客户端的请求.通过生成运行适当可执行文件的进程来提供请求,但是诸如echo之类的简单服务由inetd本身提供.根据请求运行的外部可执行文件可以是单线程或多线程.首先出现在4.3BSD [1]中,它通常位于/usr/sbin / inetd.
请告知什么是服务 – 回声?
>如何禁用或启用此服务?@H_502_7@>如果我们禁用echo服务,那么它将影响哪个进程/其他进程?
thx的建议
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 – 此grep命令的结果为空:
grep echo /etc/inetd.conf
来自维基百科,(回声协议)
Inetd实现[编辑]在类UNIX操作系统上,一个echo服务器内置在inetd守护进程中.默认情况下,通常不启用echo服务.可以通过将以下行添加到文件/etc/inetd.conf并告诉inetd重新加载其配置来启用它:
echo stream tcp nowait root internal echo dgram udp wait root internal
解决方法
回声服务是一种可以追溯到早期互联网的服务,当链接不可靠时,有一种方法可以检查您发送的内容是否被另一端接收和理解.所以echo是一种服务,只需发送回发送给它的任何内容:
[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
在现代互联网中通常不需要它,并且任何服务都不应该依赖它.我们不能肯定地说,但你不太可能通过禁用它来引起自己的问题.
如果它没有运行,您将看到尝试连接到没有侦听器的未过滤端口的标准输出:
[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
还有UDP回送服务,可以使用例如netcat以类似的方式进行测试.
为避免疑问,虽然禁用echo服务可能是安全的,但inetd也是如此,如果运行几乎肯定对您需要的服务负责.不要尝试通过禁用inetd来禁用echo.