Linux   Linux – cannot found / missing inetd.conf

Trying to configure a new inetd service needed for my Icinga (see Linux – Create custom inetd service), but i have not been able to find the inetd.conf file.
It seems inetd is not installed by default in the last Debian versions (mine is 9 – stretch).

Luckily, it is packetized in the inetutils-inetd

# apt-get install inetutils-inetd
ls -l /etc/inetd.conf
-rw-r--r-- 1 root root 1128 Nov 24 09:25 /etc/inetd.conf
root@debian:~# /etc/init.d/inetutils-inetd restart
[ ok ] Restarting inetutils-inetd (via systemctl): inetutils-inetd.service.

Update: Tried to configure a service that runs a bash script but no way to make it work

root@debian:~# tail -1 /etc/inetd.conf
remote-commands stream  tcp     nowait  root    /root/SCRIPTS/

root@debian:~# cat /etc/services | grep remote-commands
remote-commands 3335/tcp                        # Remote commands

root@debian:~# ls -l /root/SCRIPTS/
-rwxr-xr-x 1 root root 162 Dec  7 09:44 /root/SCRIPTS/

After trying to connect to the service…

root@debian:~# /etc/init.d/inetutils-inetd status
● inetutils-inetd.service - LSB: inetd sysv init script
Loaded: loaded (/etc/init.d/inetutils-inetd; generated; vendor preset: enabled)
Active: active (running) since Thu 2017-12-07 09:39:13 CET; 6min ago
Docs: man:systemd-sysv-generator(8)
Process: 8869 ExecStop=/etc/init.d/inetutils-inetd stop (code=exited, status=0/SUCCESS)
Process: 8874 ExecStart=/etc/init.d/inetutils-inetd start (code=exited, status=0/SUCCESS)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/inetutils-inetd.service
└─8882 /usr/sbin/inetutils-inetd

Dec 07 09:39:13 debian systemd[1]: Stopped LSB: inetd sysv init script.
Dec 07 09:39:13 debian systemd[1]: Starting LSB: inetd sysv init script...
Dec 07 09:39:13 debian inetutils-inetd[8874]: Starting internet superserver: inetd.
Dec 07 09:39:13 debian systemd[1]: Started LSB: inetd sysv init script.
Dec 07 09:45:49 debian inetd[12955]: cannot execute /root/SCRIPTS/ Bad address

I have not yet been able to solve the problem…
Anyway I have found another simple way to configure a simple tcp daemon listening. Wait for my post 😉


Leave a Reply

Your email address will not be published. Required fields are marked *