Solved

Linux and inetd

Posted on 2014-03-18
4
291 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 27

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
lunix and unix command 21 155
plsql job on oracle 18 109
Is Fedora an appropriate distro for the environment. 7 115
Bitcoin mining - Is it possible? 6 103
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Fine Tune your automatic Updates for Ubuntu / Debian
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

751 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