FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 03-11-2009, 09:25 AM
Goswin von Brederlow
 
Default best practice for updating inetd.conf with a user-chosen port?

Eric Cooper <ecc@cmu.edu> writes:

> What is the best way to register a daemon under inetd with a
> user-chosen port? (I am packaging a daemon that is run by inetd, but
> does not have a standard port number.)
>
> Currently I am prompting the user for the port via debconf, grepping
> /etc/inetd.conf to make sure it's not already there, and then calling
> update-inetd. Is there a better way, or an existing package that
> does something similar?
>
> --
> Eric Cooper e c c @ c m u . e d u

This has bugged me too. Is anything speaking against changing inetd to
accept an /etc/inetd.conf.d/ directory where packages can just dump a
file containing their own entries? That way one (as admin) could also
easily customise the line and wouldn't get complains from update-inetd
on every package upgrade.

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-11-2009, 02:56 PM
"Giacomo A. Catenazzi"
 
Default best practice for updating inetd.conf with a user-chosen port?

Eric Cooper <ecc@cmu.edu> writes:


What is the best way to register a daemon under inetd with a
user-chosen port? (I am packaging a daemon that is run by inetd, but
does not have a standard port number.)

Currently I am prompting the user for the port via debconf, grepping
/etc/inetd.conf to make sure it's not already there, and then calling
update-inetd. Is there a better way, or an existing package that
does something similar?


grepping is not enough. There are also full deamons.

BTW I don't like the idea of "user chosen port", and I would really
like that every used port is also listed in /etc/services.

BTW it should be the contrary: the user choose a port in /etc/services,
and the program look in services to find the port number (by calling
getservbyname(3)). inetd use /etc/services, so new question:
how to had new services in /etc/services database?

ciao
cate


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-11-2009, 08:14 PM
Adeodato Simó
 
Default best practice for updating inetd.conf with a user-chosen port?

* Giacomo A. Catenazzi [Wed, 11 Mar 2009 16:56:20 +0100]:

> how to had new services in /etc/services database?

By filing a bug like #353835 (against netbase).

--
- Are you sure we're good?
- Always.
-- Rory and Lorelai


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-12-2009, 09:00 AM
"Francesco P. Lovergine"
 
Default best practice for updating inetd.conf with a user-chosen port?

On Wed, Mar 11, 2009 at 04:56:20PM +0100, Giacomo A. Catenazzi wrote:
> how to had new services in /etc/services database?
>
> ciao
> cate

Asking netbase maintainer(s)? Just read /etc/services about that.

--
Francesco P. Lovergine


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-12-2009, 10:02 AM
"Giacomo A. Catenazzi"
 
Default best practice for updating inetd.conf with a user-chosen port?

Francesco P. Lovergine wrote:

On Wed, Mar 11, 2009 at 04:56:20PM +0100, Giacomo A. Catenazzi wrote:

how to had new services in /etc/services database?


Asking netbase maintainer(s)? Just read /etc/services about that.


Hmm. Reading your and dato answers, it seems I wrote wrongly my mail.

The question (still in subject) was how to have admin-chosen
ports for some services. The first proposal was to dynamically change
port in inetd configuration.

I proposed to move the dynamic port in the "/etc/services" level, not
necessary modifying such file, but in a way accessible to getservbyname(3).

But now I'm not sure about:
- if it is a good thing to have admin choosed ports
- if /etc/services level is the right thing to do.

ciao
cate




--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-12-2009, 12:13 PM
Holger Levsen
 
Default best practice for updating inetd.conf with a user-chosen port?

Hi,

On Donnerstag, 12. März 2009, Giacomo A. Catenazzi wrote:
> But now I'm not sure about:
> - if it is a good thing to have admin choosed ports

I dont think so and I guess I'm not alone and thats why there is no best
practice to do that. The only (typo of) package where I can think off where
this is sensible as default, is one which sets up a hidden service.

What kind of daemon are you packaging?


regards,
Holger
 
Old 03-12-2009, 01:39 PM
Eric Cooper
 
Default best practice for updating inetd.conf with a user-chosen port?

On Thu, Mar 12, 2009 at 02:13:12PM +0100, Holger Levsen wrote:
> On Donnerstag, 12. März 2009, Giacomo A. Catenazzi wrote:
> > But now I'm not sure about:
> > - if it is a good thing to have admin choosed ports
>
> I dont think so and I guess I'm not alone and thats why there is no best
> practice to do that. The only (typo of) package where I can think off where
> this is sensible as default, is one which sets up a hidden service.
>
> What kind of daemon are you packaging?

I'm packaging approx, which for compatibility with apt-proxy defaults
to port 9999 (not in /etc/services). That was fine when approx, like
apt-proxy, was run as a standalone daemon from an initscript. But I
just changed it to run (only) from inetd, hence this thread.

Regarding the other thread in -devel about the future of inetd: in my
case I found it very sensible to jettison all the code for opening
sockets, binding ports, handling IPv6, handling tcp-wrappers,
daemonizing processes, etc. and punt it to inetd. Since apt clients
keep their connections open for many multiple, the performance hit is
negligible.

--
Eric Cooper e c c @ c m u . e d u


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-12-2009, 06:36 PM
Russ Allbery
 
Default best practice for updating inetd.conf with a user-chosen port?

Eric Cooper <ecc@cmu.edu> writes:

> Regarding the other thread in -devel about the future of inetd: in my
> case I found it very sensible to jettison all the code for opening
> sockets, binding ports, handling IPv6, handling tcp-wrappers,
> daemonizing processes, etc. and punt it to inetd. Since apt clients
> keep their connections open for many multiple, the performance hit is
> negligible.

Yeah, I disagree with the idea that inetd is a bad choice for new
programs. Writing a standalone daemon requires a fair bit of networking
knowledge and work, particularly if you also want to support IPv6, and
inetd can already do all that for you.

--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-12-2009, 06:56 PM
Goswin von Brederlow
 
Default best practice for updating inetd.conf with a user-chosen port?

"Giacomo A. Catenazzi" <cate@debian.org> writes:

> Francesco P. Lovergine wrote:
>> On Wed, Mar 11, 2009 at 04:56:20PM +0100, Giacomo A. Catenazzi wrote:
>>> how to had new services in /etc/services database?
>>>
>> Asking netbase maintainer(s)? Just read /etc/services about that.
>
> Hmm. Reading your and dato answers, it seems I wrote wrongly my mail.
>
> The question (still in subject) was how to have admin-chosen
> ports for some services. The first proposal was to dynamically change
> port in inetd configuration.
>
> I proposed to move the dynamic port in the "/etc/services" level, not
> necessary modifying such file, but in a way accessible to getservbyname(3).
>
> But now I'm not sure about:
> - if it is a good thing to have admin choosed ports

Many people run services on non standard ports to avoid password and
vulnerability scanners. The kind that repedatly tries to lock into
your sshd with stupid user/pass combos.

> - if /etc/services level is the right thing to do.
>
> ciao
> cate

I don't think you can do this through /etc/services. Say I want my
proftpd to run on port 2121 so I change ftp to 2121. Now suddenly
applications would look for ftp.debian.org on port 2121.

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-13-2009, 06:38 AM
Holger Levsen
 
Default best practice for updating inetd.conf with a user-chosen port?

Hi,

On Donnerstag, 12. März 2009, Eric Cooper wrote:
> I'm packaging approx, which for compatibility with apt-proxy defaults
> to port 9999 (not in /etc/services). That was fine when approx, like
> apt-proxy, was run as a standalone daemon from an initscript. But I
> just changed it to run (only) from inetd, hence this thread.

So why not keep it running on 9999? That approx uses the same port is not
really an argument, many webservers share port 80

And even you want a different port, I think it's better if you choose a port,
say 9998, instead of letting the user choose (as a default thing to do).


regards,
Holger
 

Thread Tools




All times are GMT. The time now is 12:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org