Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Sep 1998 12:53:05 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        "Francisco Reyes" <reyesf@newsguy.com>
Cc:        "FreeBSD questions" <questions@FreeBSD.ORG>
Subject:   Re: Need pointer. How to have name for dynamic IP? 
Message-ID:  <199809141153.MAA10231@woof.lan.awfulhak.org>
In-Reply-To: Your message of "Mon, 14 Sep 1998 01:40:10 EDT." <199809140540.WAA05294@newsguy.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Is it possible to have a domain name on a box using dynamic IP?
> 
> I already have a web hosting company, hosting the domain, but I would
> like to have my home computer as a name under that domain. Example:
> Domain natserv.com. I would like to have my computer at home as
> "quisqueya.natserv.com"
> 
> Commands/man pages? Do I have to have static IP for this?

It depends on what you're trying to do.

You can call your machine absolutely anything you want as long as 
that name doesn't conflict with other names, so if you own your own 
domain (natserv.com), you can call your machine quisqueya.natserv.com 
and be certain of no conflicts.

However, you machine doesn't have a DNS A record.  This will cause 
problems.....

You can avoid the main problems my simply putting an entry for 
quisqueya in your /etc/hosts file (and making sure /etc/host.conf is 
correct).  If you've got your own network, configure your own DNS 
and add an entry.

If you want email to come from natserv.com, simply add a 
MASQUERADE_AS line to your .mc mail config file and regenerate 
sendmail.cf.


If you want outside machines to be able to connect to quisqueya or if 
you want mail to come from there, you're out of luck.  For this, 
you'll need a static IP and an entry in natserv.com's NS machines 
database.

Take a look at the headers of this message.  I'm posting from 
woof.lan.awfulhak.org - a made up machine name on my laptop that 
has a SMART_HOST of gate.lan.awfulhak.org.  gate is my internet 
connected machine.  When I next plug the laptop into my home network, 
it'll send this mail to gate which will send it to the outside world. 

gate is the NS for lan.awfulhak.org (a made-up domain) and woof is a 
secondary.

As you'll see from the headers, awfulhak.force9.co.uk is gate's 
external interface.  This happens to be a static IP number, but it 
started life as a dynamic one.

This is the bit of the picture that people get most confused with.  A 
machines hostname does *NOT* have to represent any of the machines 
interfaces, although convention says that the base host name is used 
on all interfaces and the interface domain is the only bit that 
changes....

Of course  things like X are horribly broken in this respect as it 
expects the machine ``hostname'' to be accessible from all of the 
machines interfaces rather than (correctly) looking up the IP of the 
interface that's being used for a given connection and using that 
name instead.  So in my setup, I can't connect to an external machine 
and set DISPLAY to my host name as it will not match the machine 
``hostname''.... but then, I don't want to do that over a dialup 
connection anyway !

You must be careful with things like news posting too.  For example, 
knews has a compile time option for tweaking the domain name to use 
when writing ``From:'' lines.

-- 
Brian <brian@Awfulhak.org>, <brian@FreeBSD.org>, <brian@OpenBSD.org>
      <http://www.Awfulhak.org>;
Don't _EVER_ lose your sense of humour....



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



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