Low Resource DNS NAME SERVER Using NSD

if we have Very Cheap VPS thats mean we only have low memory. with low memory we didnt need big resource and we must optimize memory VPS. this is tutorial for centos how to configuration DNS NameServer using NSD.

Before we start install NSD we use EPEL REPO First.

CentOS 6: rpm -Uvh
CentOS 5: rpm -Uvh

Now install IPTABLES if you dont have and then install NSD :

yum install nsd iptables
chkconfig nsd on

after we have installation IPTABLES now configure

iptables -A INPUT -p udp --dport 53 -j ACCEPT

Save your NSD.CONF before continue this :

cp /etc/nsd/nsd.conf /etc/nsd/nsd.conf.dist
edit nsd.conf
# The 'server:' section is the configuration for the DNS server
    # this is the IP address it will listen on for DNS requests
    # change this to the public-facing IP address of your VPS

    # no need to tell people what version we're running
    hide-version: yes

    # the database to use
    database: "/var/lib/nsd/nsd.db"

    # log file
    logfile: "/var/log/nsd.log"

    # Number of NSD servers to fork.
    server-count: 1

# we'll use a separate "zone list" file to make rsync easier
include: "/etc/nsd/zones/my_zone.conf"
check the last text, that’s saying my_zone.conf, now we must create that file location and configure this. use nano editor
mkdir /etc/nsd/zones

nano /etc/nsd/zones/my_zone.conf
MY_ZONE.CONF like this
    zonefile: /etc/nsd/zones/
now you have zone domain configuration dns. but you dont have zonefile and we must create /etc/nsd/zones/ next step is :
nano /etc/nsd/zones/

copy this script to /etc/nsd/zones/

$TTL 3600

@    IN     SOA (
           2011102301  ; serial number
           28800       ; Refresh
           7200        ; Retry
           864000      ; Expire
           86400       ; Min TTL

                IN    NS
                IN    NS

ns1           IN     A
ns2           IN     A
vps       IN     A
www         IN     CNAME vps

Centos 5 :

now rebuild and start nsd :

nsdc rebuild
/etc/init.d/nsd start

now we have done. this is very basic and simply how to install NSD also how to using NSD as your DNS with low resource memory and cpu

Leave a Reply:

You must be logged in to post a comment.