Date: Thu, 25 Jul 2002 23:02:47 +0100 From: Daniel Bye <dan@slightlystrange.org> To: freebsd-questions@FreeBSD.ORG Subject: Re: Help needed with DNS reolving Message-ID: <20020725220246.GA87732@catflap.home.slightlystrange.org> In-Reply-To: <54o0ku82evjq6m5acvb1ehd0v34hk5iaef@4ax.com> References: <54o0ku82evjq6m5acvb1ehd0v34hk5iaef@4ax.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <name server IP address> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020725220246.GA87732>