[vox-tech] I'm setting up a DNS server...
Rick Moen
vox-tech@lists.lugod.org
Mon, 19 Jan 2004 09:47:41 -0800
Quoting William Perdue (william@williamperdue.com):
> It's my first time setting up a DNS server and I bought a book to help.....
> in the line
>
> @ IN SOA @ root.localhost (
>
> is the "root.localhost" part where you would you replace that with the name
> of the DNS server?
If memory serves, it's where you identify the master authoritative
nameserver for that zone. Here's a snippet from an example zonefile:
$TTL 86400
$ORIGIN linuxmafia.COM.
@ IN SOA linuxmafia.COM. rick.deirdre.NET. (
2004010900 ; serial
10800 ; refresh 3 hours
3600 ; retry 1 hour
3600000 ; expire 1000 hours
86400 ; minimum 24 hours
)
;
IN NS myrddin.imat.COM.
IN NS ns1.valinux.com.
@ IN A 198.144.195.186
IN MX 10 linuxmafia.COM.
IN HINFO P3/500 Linux-v.2.4.24
IN TXT "v=spf1 a mx -all"
LOC 37 25 53.825 N 122 11 52.128 W 15m
nsa IN CNAME www.bxa.doc.gov.
> and then there's a
>
> ; servers
> atlas IN A 192.168.1.255
> www CNAME atlas
>
> is the "atlas" part the name of the server your hosting? and does the "www"
> "CNAME" and "atlas" part is the www the extention for the beginning like
> in www.bob.net or talk.whatever.org?
Your name "www" is declared to be an alias name (CNAME) within the zone
you're speaking of. You're specifying that it should be an alternate
name for "atlas". Both of these will get $ORIGIN appended to them,
whatever value that is for your zonefile.
Notice the last line in my snippet: "nsa" within zone "linuxmafia.com."
(note ending period!) is declared to be another name for the
"www.bxa.doc.gov." (note ending period!) hostname.
Whenever you specify a hostname and fail to fully qualify it (provide a
specifier with a dot at the end), BIND will append $ORIGIN to it. Thus,
in my snippet, "nsa" in the zonefile becomes the "nsa.linuxmafia.com." FQDN,
after processing by BIND.
By contrast, notice that "myrddin.imat.COM." ends in a dot, preventing
that treatment. I'm saying "This is already a FQDN, thanks. Please
don't append $ORIGIN to it."
I declare $ORIGIN at the top of every zonefile for clarity's sake.
That's not strictly necessary, as it defaults to the "zone" declaration
value used to reach the zonefile in /etc/bind/named.conf . Here's the
named.conf snippet in question:
zone "linuxmafia.com" {
type master;
file "/etc/bind/linuxmafia.com.zone";
allow-transfer {
207.214.84.142;
66.47.251.130;
198.186.202.135;
};
};
So, $ORIGIN automatically is "linuxmafia.com." (getting a period to make
it fully qualified) by virtue of how the zonefile is called, but I
define that variable anyway just to remind myself what's going on.
(Normally, you define $ORIGIN during zonefiles only for your convenience
in subsequent references to subdomains.)
--
Cheers, I've been suffering death by PowerPoint, recently.
Rick Moen -- Huw Davies
rick@linuxmafia.com