Setting up named dns server

From D3xt3r01.tk
Revision as of 22:49, 24 November 2009 by Admin (talk | contribs) (New page: ==WHY== 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. ==HOW== My named ru...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

WHY

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.

HOW

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 d3xt3r01.tk . First, edit /var/named/chroot/etc/named.conf:

zone "d3xt3r01.tk" {
        type master;
        file "pri/d3xt3r01.tk.zone"; // Relative path to chroot
        notify no;
};

Now I edit /var/named/chroot/var/named/pri/famouswhy.com.zone like this:

$TTL 3D
@       IN      SOA     ns1.d3xt3r01.tk. dexter.d3xt3r01.tk. (
                        2009112401 ; Serial, todays date + todays serial
                        8H      ; Refresh
                        2H      ; Retry
                        4W      ; Expire
                        1D)     ; Minimum TTL
@               NS      ns1
@               NS      ns2
@               MX      1       mail.d3xt3r01.tk
@               TXT     "d3xt3r01 main"
ns1             A       174.120.208.202
ns2             A       174.120.208.201
www             A       174.120.208.203
mail            A       174.120.208.204

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.