Setting up named dns server

Jump to navigationJump to search


Because I'm setting up a new server and didn't get the chance to post a "how to" on how I do it. I'm sure there are stuff I do wrong, but .. the basics work.


My named runs as a chroot. My zone files are in /var/named/chroot/var/named/pri . My named.conf is in /var/named/chroot/etc/named.conf .

The new domain I'll set up is named . First, edit /var/named/chroot/etc/named.conf:

zone "" {
        type master;
        file "pri/"; // Relative path to chroot
        notify no;

Now I edit /var/named/chroot/var/named/pri/ like this:

@       IN      SOA ( ; ns space admin mail separated by . instead of @
                        2009112401 ; Serial, todays date + todays serial ; serial, be sure to increment it when you change stuff
                        8H      ; Refresh
                        2H      ; Retry
                        4W      ; Expire
                        1D)     ; Minimum TTL
@               NS      ns1
@               NS      ns2 ; name server
@               MX      1 ; mail pointer to the main ip with priority 1.
@               TXT     "d3xt3r01 main" ; txt description
@               A ; domain without www pointer
ns1             A ; normal host -> ip pointer
ns2             A
www             A
mail            A

Reboot the named and set up ns1 and ns2 to those ips in your dns config panel and wait 24-72 hours for the changes to commit.