Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Linux and inetd

Posted on 2014-03-18
4
Medium Priority
?
294 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Fine Tune your automatic Updates for Ubuntu / Debian
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

972 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