Solved

Linux and inetd

Posted on 2014-03-18
4
273 Views
Last Modified: 2014-03-19
In general terms, what is inetd, and what does it have to do with ports on the system taht an application can use
0
Comment
Question by:Anthony Lucia
4 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 39938342
inetd is a super daemon which listens on all ports configured in /etc/inetd.conf (first column).
When a connection attempt is made to one of these ports inetd starts the application which is also configured in /etc/inetd.conf (2nd and subsequent columns).
inetd is started at boot time.

There is a more recent version of inetd called xinetd. The configuration file (with a different format) is /etc/xinetd.conf.

See "man inetd" and "man xinetd"
0
 
LVL 48

Expert Comment

by:Tintin
ID: 39938350
inetd listens on whatever ports a service uses that is defined in inetd.conf and launches the defined program.
0
 
LVL 26

Expert Comment

by:skullnobrains
ID: 39938434
inetd listens on a series of ports and takes care of the corresponding network operations in behalf of other programs


when a new TCP connection arrives on a specific port, it accepts the connection, and starts an instance of the program associated with that port to handle the corresponding client (remote user)

incoming data on the child socket is sent to the standard input of the program, and any output from the program is send over that same socket


udp (or raw) is handled in a similar way without the "accept" step. there is support for spawning a new instance for evry new packet (or "session") or just hand over any new packet to a single instance


there are several goals :
- the program does not need to implement network operation
- the program does not need to run when there is no connected client
- the program can work with privileged ports while running with non-root privileges
- plenty of additional features such as generic timeouts and monitoring, access control by ip or time period need to be implemented a single time and configured using the same syntax for all demons using inetd

btw, not many programs use inetd (or xinetd) anymore

you'll find tools such as faucet (comes with netpipes) that also take care of network operations on behalf of other programs, with different features
0
 
LVL 13

Expert Comment

by:Daniel Helgenberger
ID: 39939313
If I may add, with systemd arriving in all major linux distros inetd and xinetd will be finally obsolete. Systemd itself can listen on a port and start the corresponding service. It can so so with any daemon listening on a network port.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now