From owner-freebsd-questions Thu Dec 20 10:26:34 2001 Delivered-To: freebsd-questions@freebsd.org Received: from rush.telenordia.se (mail.telenordia.se [194.213.64.42]) by hub.freebsd.org (Postfix) with SMTP id D443E37B405 for ; Thu, 20 Dec 2001 10:26:30 -0800 (PST) Received: (qmail 14375 invoked from network); 20 Dec 2001 19:26:28 +0100 Received: from bb-62-5-36-29.bb.tninet.se (HELO there) (62.5.36.29) by mail.telenordia.se with SMTP; 20 Dec 2001 19:26:28 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Mark Rowlands To: "Ciro Maietta" , Subject: Re: DHCP and DNS hostname resolution: A better way? Date: Thu, 20 Dec 2001 19:27:21 +0100 X-Mailer: KMail [version 1.3.2] References: <000d01c1808a$11471d80$6400a8c0@dominion.us> In-Reply-To: <000d01c1808a$11471d80$6400a8c0@dominion.us> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20011220182630.D443E37B405@hub.freebsd.org> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sunday 09 December 2001 9:18 am, Ciro Maietta wrote: > I'm running a FreeBSD 4.2 - Release (until I can figure out how to make > decent backups before going STABLE) firewall/DHCP server. I've got named > and dhcpd running just fine and dandy (named is local only, outside access > is blocked totally in ipfw.rules) but with one snafu. Several of my > clients are laptops that I and a few other users on the network bring > between our respective home networks and the college network, all of which > operate a dhcp server (to prevent reconfiguring whenever we travel). > > According to dhcpd.leases, dhcpd can pick up the hostname of the client > when an ip is leased (the line 'client-hostname: HOST' shows up in the > lease file), but the clients can only be referenced by IP. i.e. 'ping > ASGARD' returns "Cannot resolve host: ASGARD" whereas pinging the IP works > fine. So far, I have only come across two ways that I can make this work. > One is assigning IP/Hostname depending on MAC address, and the other is > using a script (probably perl, in my case) to parse the dhcpd.leases file > and dynamically create /etc/hosts (and I have my doubts on whether that > would even actually WORK!). My question is this: Since dhcpd obviously > KNOWS the clients' hostnames, is there any way to reference the clients > without hard-coding the information in? > > Sorry if I seem masochistic, but the path of least resistance also reaps > the least satisfaction. :) > bind9 and dynamic dns is the path of greatest resistance ;-) and clearly most fun...... yes hacking the hosts file via the leases file would work, but then you have to distribute the new hosts file to all the machines involved :-( I personally use the hardware ethernet / fixed address approach even though I am using bind9 simply because I haven't made time to fix it and there are only half a dozen machines involved. New Years Resolutions :- I will implement secure DDNS in the first two weeks of January...work permitting. I will stop smoking I will drink less I will exercise more...sorry that should read : I will exercise. hhmm.... well maybe I'll hit one out of four -- The Great Movie Posters: They hungered for her treasure! And died for her pleasure! SEE Man-Fish Battle Shark-Man-Killer! -- The Golden Mistress (1954) See Jane Russell in 3-D; She'll Knock Both Your Eyes Out! -- The French Line (1954) See Jane Russell Shake Her Tamborines... and Drive Cornel WILDE! -- Hot Blood (1956) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message