[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: going inetd



Sebastiaan <S.Breedveld@ITS.TUDelft.NL> writes:

> is it possible to let inetd handle certain daemons? I would like
> rlinetd to control the squid daemon, because rlinetd let you choose if
> the ports are visible/usable from the outside world.  Can you let
> inetd start any program, or do they have to be inetd programmed?

Programs have to be inetd-aware to be launched by inetd. This is not
difficult; inetd just sets up the TCP socket as stdin/stdout for the
program, so the program doesn't have to do anything. 

The most important thing about choosing whether to use inetd or
long-lived standalone daemon is the number of times the program will be
called and the amount of startup time required by the program. Squid has
a relatively long startup time, and will be launched a lot, so is not
really suitable for calling out of inetd.

Note that you could use something like ipchains or netfilter to control
whether or not you can connect to squid (or any service) from the
outside world. In addition, squid has configuration options that let you
specify which network ports it will listen on, so if you don't want it
listening on an external address, you can just tweak the
configuration. Assuming that you only want to allow squid connections
from localhost, then (depending on the squid version), you would use
either:

  http_port 127.0.0.1:3128

 or

  tcp_incoming_address 127.0.0.1

-- 
Dave Carrigan (dave@rudedog.org)            | Yow! Hey!!  Let's watch the'
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-DNS | ELEVATOR go UP and DOWN at th'
Seattle, WA, USA                            | HILTON HOTEL!!
http://www.rudedog.org/                     | 



Reply to: