Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Feb 2004 18:26:52 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Marty Landman <MLandman@face2interface.com>
Cc:        Rob <nospam@users.sourceforge.net>
Subject:   Re: Is inetd a proxy server?
Message-ID:  <20040222182652.GB2372@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <6.0.0.22.0.20040222114940.06a3bc70@pop.face2interface.com>
References:  <4038C549.1020702@users.sourceforge.net> <20040222161215.GA1165@happy-idiot-talk.infracaninophile.co.uk> <6.0.0.22.0.20040222114940.06a3bc70@pop.face2interface.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--ZfOjI3PrQbgiZnxM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Feb 22, 2004 at 11:58:10AM -0500, Marty Landman wrote:
> At 11:12 AM 2/22/2004, Matthew Seaman wrote:
>=20
> >A proxy listens to all of your request, and then opens up a second=20
> >connection to the real server (or another
> >proxy) for you and replays your request to it -- so all of the traffic i=
s=20
> >relayed through the proxy.
>=20
> Newbie here Matthew. Could you please explain how a proxy differs from a=
=20
> router? Or are they in many ways intersecting in their functionality? e.g=
=2E=20
> I've got a class c network in my office and recently learned how to use=
=20
> apache to reverse proxy a request so that http://my-ip-adr/fbsd becomes t=
he=20
> same as http://fbsd, where the latter is mapped to the ip addr for my fbs=
d=20
> box on the lan by apache. (which btw is kind of cool)

Sure.  A router deals with network traffic at the IP level --
sometimes described as Layer 3 on the OSI 7 layer model.  In plain
English, the router doesn't care what's inside the packets: it just
looks at the IP numbers in the headers and relays the packets
appropriately.  A router will work for all sorts of traffic -- HTTP,
FTP, SSH, SMTP, whatever (unless you've deliberately added a packet
filter) -- unlike a proxy, which works at the protocol level: thus
you'll get an HTTP proxy or a FTP proxy or a SMTP relay or a DNS
recursive server -- the names vary, but they all do proxy service.
It's also common for proxies to cache previous traffic and reply out
of cache instead of going all the way back to the originating server,
but that's not a requirement.  Sometimes the software used to
implement a proxy is actually identical to the software you'ld use to
implement the originating server -- as commonly seen with most MTAs
and BIND and occasionally Apache HTTPD as you've done -- although
specialised proxying software is more generally used for HTTP and FTP
and the like.
=20
> >The point of having inetd(8) is that it provides is a mechanism so that=
=20
> >you don't have to have umpty-dozen different small servers running all o=
f=20
> >the time and taking up your process space.
>=20
> I notice that mingetty runs ~ half a dozen instances on my box, waiting f=
or=20
> console users that will never come since as a rule I do everything thru s=
sh=20
> on my windows workstation. And httpd, though I've cut the child process=
=20
> spec down on the apache conf since it's not needed. Of course the saved=
=20
> cycles aren't needed either in my current environment. :)

getty(8) is pretty light weight, and it doesn't take much extra memory
to run multiple copies of it.  It's also the case that while you may
not need to log in via the console during normal usage, when you do
need console access then you generally need it very badly. =20
=20
> Could httpd be set up to run via inetd instead of on its own? If so, is i=
t=20
> not typically done this way because it is usually the biggie app on=20
> servers? Following that reasoning, if a server were primarily used for ft=
p=20
> would it make sense to remove ftpd from inetd's conf file and instead sta=
rt=20
> it as a service, assuming that were possible?

You can run apache 1.3.x through inetd -- see the 'ServerType'
directive in httpd.conf:

    http://httpd.apache.org/docs/mod/core.html#servertype

As it says in bright red letters: "Inetd mode is no longer recommended
and does not always work properly. Avoid it if at all possible."
ServerType no longer exists in apache 2.0.x.

If you are running a busy FTP site, then yes, running a standalone FTP
daemon would be a good idea.  However, the server side configuration
for most FTP daemons is a lot simpler than for Apache, so it's
feasible to run ftpd out of inetd for much higher traffic than it
would be for apache.  Another common server where there's an option of
running under inetd is Samba -- however I think the trend nowadays is
to assume that the Samba daemons will run standalone.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--ZfOjI3PrQbgiZnxM
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAOPRsdtESqEQa7a0RAhzxAJ9cMDbTY5e0LErtAmoHsIS/ibQv5gCfeA1e
suYhGAlRO4kGBgL55WABfsA=
=j3Bd
-----END PGP SIGNATURE-----

--ZfOjI3PrQbgiZnxM--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040222182652.GB2372>