[3113] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Virtual hosts (was Re: Virtual Machines, 2.x kernel...)

daemon@ATHENA.MIT.EDU (Eric Smith)
Thu Nov 7 02:58:45 1996

Date: 7 Nov 1996 08:46:25 -0000
From: Eric Smith <eric@brouhaha.com>
To: Allen Francom <afrancom@numedics.transport.com>
CC: redhat-list@redhat.com
In-reply-to: <Pine.LNX.3.91.961107011355.22553D-100000@numedics.transport.com>
	(message from Allen Francom on Thu, 7 Nov 1996 01:18:54 -0800 (PST))
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

Allen Francom <afrancom@numedics.transport.com> wrote:
> It would appear that there are applications where it might be nice if you 
> could have one machine ACTUALLY perform as if it were more than one machine,
> AND NOT JUST IN THE WAY OF WEB SERVICE WHICH IS AUGMENTED BY HTTP.
> 
> Has anyone set up a machine this way ?  Basically a machine that has
> fake roots, and more than one /etc/passwd, possibly inittab, etc., ?

The Apache web server can deal with virtual hosts with separate IP addresses
by using its <virtualhost> feature.

I'm told that the latest version of wuftpd does this too.

For my other servers, I hacked inetd to allow the host to be specified in
the inetd.conf as well as the service.  It is then possible to run multiple
instances of the same service on different IP addresses.  You will probably
have to use different comands to invoke the services if you want them to do
different things, such as serve from different root directories.

My patch (against the version of inetd that came with RH 2.1) is
available at
	ftp://ftp.brouhaha.com/pub/eric/inetd/inetd.multihome.patch

The biggest problem I am having with IP aliasing is that sockets that are
bound to INADDR_ANY (or aren't explicitly bound) wind up bound to the last
IP alias I've configured.  For instance, I have 10 IP addresses on my machine,
one of which is the "real" address of the machine.  When I telnet to another
machine, it sees the source IP address as one of the aliases.  This is
really agravating when I add another IP address.  The news server I connect
to will only let me in from one configured IP address, so it has to be
changed.

For this reason I had to patch named (part of the bind package), as it was
sending UDP responses from a different IP address than it received the
requests on!  Also, the code in named that enumerates the interfaces made
a bad assumption about the size of a structure, so it only found every other
interface.  I can make these patches available too if anyone wants them.

I'd really prefer that the kernel use the "real" address of the interface
when it decides to bind a default address.  I spent about two hours staring
at the networking code trying to figure out where this happens, but so far I
haven't found it.

Hope this helps!
Eric


--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post