Subject: Re: More than one hostname assigned to a machine
To: Colin J. Raven <colin@kozy-kabin.nl>
From: D'Arcy J.M. Cain <darcy@NetBSD.org>
List: netbsd-help
Date: 11/07/2004 05:06:54
On Sun, 7 Nov 2004 10:28:20 +0000 (UTC)
"Colin J. Raven" <colin@kozy-kabin.nl> wrote:
> Greetings all!
> 
> Crazy though this sounds, I need my little qube to answer to more than

Not crazy at all.  I can't think of one machine that I run that answers
to only one host name.

> one machine name....or something like that :) Let me give you an
> example of what I mean:
> 
> The current FQDN is bosch.bonkers.nl
> (bonkers.nl is in DNS and assigned to my DSL router IP.) All currently
> works as it should absent any problems.

I assume that you mean some sort of wild card or do you mean that
bosch.bonkers.nl points to your DSL bonkers.nl, router.  Also, can I
assume that your router sends all the IP traffic directly to your
machine?

> I also have a DNS entry for noodle.nl and *it* too has the IP of my
> DSL router.
> How can I make my box answer to bosch.noodle.nl - as well as
> bosch.bonkers.nl.

If this name points to the same IP as the first you should have nothing
else to do.  It's really that simple.  However, I checked both of the
above names and although they exist, there doesn't seem to be any
address associated with them.  There is an address for noodle.nl but not
for bonkers.nl, bosch.bonkers.nl or bosch.noodle.nl.  I think that your
issue is more DNS based than operating system based.  You should contact
whoever does your domain hosting and ask them.  This seems to be this
organization:

   Registrar:
      XS4ALL Internet B.V. *)
      Eekholt 42
      1112 XH  DIEMEN
      Netherlands

> For that matter of it, could I even assign a different
> hostname for any transactions involving noodle.nl?

If the IP address really is the same then once it reaches your machine
there is no difference between the two.  That's from a routing point of
view.  Note that web servers can do different things based on host name
but that is at the http protocol layer and you should look at that
software for details.  If this is your real question (and you are using
Apache) then look in the docs (www.Apache.org) for the VirtualHost
directive.

You also have the option of using two different IPs but that depends on
the people doing your DNS as well as the people routing packets to you. 
What happens on your machine in that case is completely dependent on
your application.  You would need to give us more details about exactly
what you want to do.

-- 
D'Arcy J.M. Cain <darcy@NetBSD.org>
http://www.NetBSD.org/