Setting up a Bind Server

Posted on 24 Feb 2015 by Eric Oestrich

I've done this a few times before, but everytime I forget how to do it and refinding the information is generally a time consuming process. Below is the bind configuration I have for a local DNS server.

zone "" {
  type master;
  file "/etc/bind/";

Make sure the domain inside of the first line zone "" { is spell correctly. I spent a good deal of time trying to figure out why a domain was not being loaded and it was just a simple spelling error.

; BIND data file for
$TTL    604800
@       IN      SOA (
                     2015022001         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
        IN      A
@       IN      NS
@       IN      A
ns      IN      A

host    IN      A
alias   IN      CNAME

Make sure the serial number increments each time the file changes. I use the date plus a number "01" that increments. I use two digits because I tend to edit it a lot when first figuring things out.

The line with "SOA" should have your nameserver and the an email address that has a period instead of the "@" sign. The other numbers I took from the example file.

comments powered by Disqus
Eric Oestrich
I am:
All posts
Creative Commons License
This site's content is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License unless otherwise specified. Code on this site is licensed under the MIT License unless otherwise specified.