Here's a quick howto on setting up a nameserver. I did this in a bit of a hurry, so I've accepted defaults for just about everything - it should be obvious how to select non-default options.
This is the first screen of the BIND control module in Webmin (my preferred administration interface). The first thing to note is that this display is a little more complex than the default installation - I have multiple views defined. These aren't overly-relevant to this discussion - it just complicates the screens a little. I'll be adding the bsac.com domain to my external view so that it can be seen from the Internet.
A Master Zone is one for which the original zone records are held on this server. BIND also supports slave zones (where the records are transferred from a remote server which holds the zone files), but I don't currently serve up any slave data.
Most of this form is default; I added the domain name ("bsac.com"), the Master Server name ("ns1.bsac.com"), the email address ("[email protected]"), and ticked the box marked "Add NS record for Master Server". All the times at the bottom can be altered if desired - but this is just an example, so I didn't.
Pressing the "Create" button builds the (empty) zone :
bsac.com has three A records of which I'm aware: bsac.com, www.bsac.com, and mail.bsac.com. I'll also add a fourth, ns1.bsac.com, because that was defined as the Master Server when the zone was created. A records are added by clicking the "A" icon in the "Edit Master Zone" screen above.
Firstly, I'll add bsac.com :
Note the trailing dot - absolute names need a trailing dot. Relative names (see later) don't. It's easy to forget this, but the mistake is easily visible!
The next record is www.bsac.com. I could add this in just the same way as above, but it's more usual to add it as a relative record - i.e. it is the "www" record, relative to the domain of "bsac.com" :
Note that there is not a trailing dot after "www". This is what makes it a relative record.
The "mail" and "ns1" records are added in exactly the same way :
MX records are added by clicking the "MX" icon in the "Edit Master Zone" screen, but otherwise are just like adding A records :
Clicking the "Apply Changes" in the main control screen makes this data live. This server will now respond to requests for information about the bsac.com domain according to the records we've just given it. So now it is a good idea to test it!
Because this server has separate views according to whether the client is inside my firewall or not, and because I've only created this zone in the external view, I need an external client to test it. I've used d236, as that is readily available:
It's a little sparse, with only one nameserver, but correct.
Having just one nameserver is a bad idea, as a failure of that server would take the whole domain down. To prevent this, we run multiple nameservers, slaved from this master. I'll use the ones at everydns.net, as they are fast, robust, geographically-dispersed, and completely free.
The first task is to add the slave nameservers to the list of nameservers in the zone. This is performed by clicking the "NS" icon in the "Edit Master Zone" screen, and the records are added just like the "A" and "MX" records created earlier.
Note that ns1.bsac.com was created when the zone was originally created (that's the purpose of the "create NS" tickbox). And remember that absolute names (like "ns1.everydns.net") need a trailing dot (or else they become "ns1.everydns.net.bsac.com"!)
By default, zone transfers are not allowed. This is for security reasons - if a hostile machine can read your zone file, it can determine which machines are worth attacking. So the next step in creating our slave servers is to permit them access to the zone file. This is achieved by clicking the "Edit Zone Options" in the "Edit Master Zone" screen.
I've allowed zone transfers from 64.158.219.3 (which is ns1.everydns.net), and also told this server to notify the same machine if anything changes.
Lastly, we need to set up the service with EveryDNS. I've done this on my account, which is why some of my other domains are listed on the page.