Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Linux and inetd

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

721 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