[lug] DNS and a thanks for the DSL info.

Sean Reifschneider jafo at tummy.com
Sun Aug 27 00:17:30 MDT 2000

On Sun, Aug 27, 2000 at 01:28:02AM -0400, John Starkey wrote:
>Ok, now here's where I really get confused. Mostly due to lack of
>experience, and adequate time off :} Or at least that's what I'd like to

DNS is subtle and quick to anger.

>This week I will obtain 5 working IP@'s from, yes, an ISP. :}

If you want to deal with reverse on those addresses, you'll have to spend
a lot of time on the phone with US West.  Last time I called with such a
change, it took nearly an hour before I was actually able to speak with
somone who had a clue about reverse DNS.  You couldn't have any worse
luck mailing hostmaster at uswest.net, but I don't know what the official
story on getting those sorts of changes made is...

>What is the least I have to have for BIND to happen? I need resolv.conf to

resolv.conf is for the DNS resolver, not the DNS server.  Whenever you do
a lookup, you use the resolver.  The DNS server is for port 53 requests
from remote and local hosts (for example, another host asking your host
to look up a name).  The resolver is always there, even if you don't
have BIND installed...

You will probably WANT to set up the resolver to point at your local BIND

	search example.com

Then in /etc/named.conf you want:

	zone "example.com" { type master; file "db.example.com"; };

Now create /var/named/db.example.com:

	$TTL            1d
	@       IN      SOA     ns1 hostmaster (
						 2000082700 ; Serial number yyyymmddnn
						 30m   ; Refresh
						 15m    ; Retry
						 1w  ; expire
						 1d ) ; Minimum TTL

				IN     NS      ns2.example.com.
				IN     NS      ns1.example.com.

											  IN A
	www                             IN A

	ftp        IN CNAME www

Then restart the name server:

	killall -HUP named

Now look in /var/log/messages to make sure there aren't any errors:

	guin:named# tail /var/log/messages
	Aug 27 00:10:49 guin named[14366]: reloading nameserver
	Aug 27 00:10:50 guin named[14366]: master zone "example.com" (IN) loaded
	(serial 2000082700)
	Aug 27 00:10:50 guin named[14366]: Forwarding source address is
	Aug 27 00:10:50 guin named[14366]: Ready to answer queries.

Looks cool.  So, let's run some tests:

	[2] guin:named# host example.com
	example.com has address
	[2] guin:named# host -t mx example.com   #  we didn't set up MX
	[2] guin:named# host www.example.com
	www.example.com has address
	[2] guin:named# host ftp.example.com
	ftp.example.com is a nickname for www.example.com
	www.example.com has address
	[2] guin:named# 

As an experiment, you can set up records for "example.com" just as I did
above (example.com is allocated for use as an example).

I don't know why your setup wasn't working, but my first guess is: Did you
actually use "serial" in the SOA record, or did you put a real number in
those fields?  It should look something like my SOA above.

 Home is where your source is.  -- Sean Reifschneider, 1999
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python

More information about the LUG mailing list