Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 May 95 08:13:17 -0700
From:      Sean McGee <smmcgee@ncbc.edu>
To:        questions@FreeBSD.org
Subject:   WWW without httpd
Message-ID:  <199505180814.IAA23219@localhost>

next in thread | raw e-mail | index | archive | help
To avoid having to buy, install, and maintain a http server, yet have 
the ability to respond to http request, I did the following.
Please tell me if there are any potential security risks.

(I run FreeBSD 2.0R (4.2BSD))

My /etc/services listens to port 80(default) for http requests.  So in my
inetd.conf I simply add a line:
www  stream  tcp  nowait  root   /bin/cat    cat /filename.html

Now, when an http client contacts that port, the file 'filename.html'
is catted back to them and is performing the function of a
'poor man's http server'

I have now assigned several ports to do the same thing in order to layer
pages.
I have even assigned a .gif file to a port and as long as the http client
is told that it is a gif, then it has no problems displaying it as a gif.
example:
http://some.place.com:80   and   http://some.place.com:80/bogusfile.gif
do the exact same thing, but the client sees the 'bogusfile.gif' and
displays the file as a gif.

My questions are:
What is the catch?  Have I missed something?

Yes, I know.  This is very CHEAP. But it costs nothing.

TIA,

-sean
smmcgee@ncbc.edu
sysadmin@ncbc.edu







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