XINETD - Extended Internet Daemon
April 16, 2017
I was recently looking into ways to provide ssh access inside linux network namespaces and came across xinetd. So I decided to dig more into it. Noting it down here so that I can refer it back.
It’s basically a daemon that listens for network requests and services them by spawning more processes.
The master configuration for xinetd lives in
/etc/xinetd.conf. Each service managed
by xinetd has a configuration file in
Each network service is listed in
/etc/services that xinetd could potentially manage.
Let’s look at an example from one of the services in
/etc/xinetd.d/ to see how it works:
An echo service
This was a default service that was present on my RHEL6 box. There were lots of settings in this file which were basically commented. Most of them were self explanatory, so I have omitted them for brevity.
echo service simply provides an echo service (duh). But what port does it listen to?
The port can be checked in
/etc/services file, search for echo in file, and on my machine
it had an entry that looked like this:
The connection will fail, if you try to connect to this port, since the disabled is set to yes in the above configuration file.
Let’s enable the service by setting
disable = no in
In addition, you’d need to restart the xinetd service.
Now again, let’s try to connect to service.
You can use xinetd to run your own network service and have full control. I have some ideas which I’ll document if they work.