From owner-freebsd-questions Thu Jul 25 15: 2:59 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E7C137B400 for ; Thu, 25 Jul 2002 15:02:55 -0700 (PDT) Received: from catflap.home.slightlystrange.org (host217-39-153-84.in-addr.btopenworld.com [217.39.153.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id A64C043E6E for ; Thu, 25 Jul 2002 15:02:54 -0700 (PDT) (envelope-from dan@slightlystrange.org) Received: from danielby by catflap.home.slightlystrange.org with local (Exim 3.36 #1) id 17Xqh5-000MxQ-00 for freebsd-questions@FreeBSD.ORG; Thu, 25 Jul 2002 23:02:47 +0100 Date: Thu, 25 Jul 2002 23:02:47 +0100 From: Daniel Bye To: freebsd-questions@FreeBSD.ORG Subject: Re: Help needed with DNS reolving Message-ID: <20020725220246.GA87732@catflap.home.slightlystrange.org> Reply-To: dan@slightlystrange.org Mail-Followup-To: freebsd-questions@FreeBSD.ORG References: <54o0ku82evjq6m5acvb1ehd0v34hk5iaef@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54o0ku82evjq6m5acvb1ehd0v34hk5iaef@4ax.com> User-Agent: Mutt/1.4i X-Scanner: exiscan *17Xqh5-000MxQ-00*9fz1uvAnmkU* (SlightlyStrange.org, Using NOD32 http://www.nod32.com) 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 Thu, Jul 25, 2002 at 09:46:59PM +0100, Dave wrote: > "User" install of 4.6-Release > > Still a standard install, nothing new added as yet, but the box can't > won't resolve DNS. It can ping or FTP using IP address. > > I'm not even sure what info I need to give to help get this sorted, so > here's some basic stuff. If you want to help and need more info, reply to > list please or see sig below. > > Ok then, the problem > > Smoothwall firewall running a DHCP server. Two other FreeBSD4.6 boxes > both worked "out of the box" as far as DNS is concerned. They are > assigned IP addresses, see the Smoothy as a DNS server, all ok. > > Now, this new box just can't seem to see the DNS server on the smoothwall > box. Smoothwall is set to give out IP address in the range > 192.168.1.10-30. The new box was assigned 192.168.1.15. It can ping both > internal and external 'net address's. It can even FTP into > ftp.uk.freebsd.org if I use the IP address. If I use the URI, I get: > > ftp: ftp.uk.freebsd.org: No address associated with hostname > > I tried assigning IP and router addresses manually in /etc/rc.conf: > > #ifconfig_ed0="DHCP" > ifconfig_ed0="inet 192.168.1.19 netmask 255.255.255.0" > defaultrouter="192.168.1.1" > > Exactly the same results. I have no idea how to manually set up FreeBSD > to use specific DNS addresses. The file /etc/resolv.conf contains instructions for resolving DNS. (I guess this isn't configured on your new box, as you don't mention it in your post - but forgive me if I am teaching you to suck eggs!). /etc/resolv.conf looks something like this: domain mydomain.com search search.domain.co.uk example.com nameserver You only really need the name server lines - I would supply at least two, preferably on different networks to provide some sort resiliency. The domain and search lines add a bit of convenience. If you try to resolve a name by just the host portion (i.e., with no domain part attached), first the value under domain is appended, and if no match is found, the values in the search lines are appended, in order. If a match is still not found, then the name servers are consulted. There are a couple of other directives, but I have never needed to use them. Check out man 5 resolv.conf for completeness. If your two other boxes can resolve names, they evidently get nameserver details from the dhcp server (or they have /etc/resolv.conf file in place) Look for a file called /etc/dhclient.conf - it contains directives that can determine what information you get from the DHCP server. Of particular interest will the "require" directive - there is a good example in man 5 dhclient.conf. HTH Dan -- Daniel Bye PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc PGP Key fingerprint: 3D73 AF47 D448 C5CA 88B4 0DCF 849C 1C33 3C48 2CDC _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message