From owner-freebsd-questions Mon Sep 14 11:14:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA17119 for freebsd-questions-outgoing; Mon, 14 Sep 1998 11:14:38 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from awfulhak.org (awfulhak.force9.co.uk [195.166.136.63]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA17069 for ; Mon, 14 Sep 1998 11:14:30 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from woof.lan.awfulhak.org (root@woof.lan.awfulhak.org [172.16.0.7]) by awfulhak.org (8.8.8/8.8.8) with ESMTP id TAA19162; Mon, 14 Sep 1998 19:07:53 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from woof.lan.awfulhak.org (brian@localhost [127.0.0.1]) by woof.lan.awfulhak.org (8.9.1/8.9.1) with ESMTP id MAA10231; Mon, 14 Sep 1998 12:53:08 +0100 (BST) (envelope-from brian@woof.lan.awfulhak.org) Message-Id: <199809141153.MAA10231@woof.lan.awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: "Francisco Reyes" cc: "FreeBSD questions" Subject: Re: Need pointer. How to have name for dynamic IP? In-reply-to: Your message of "Mon, 14 Sep 1998 01:40:10 EDT." <199809140540.WAA05294@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 14 Sep 1998 12:53:05 +0100 From: Brian Somers Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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 , , 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