-->

DEVOPSZONES

  • Recent blogs

    How add a Zone to bind_DNS?

    How add a Zone to bind_DNS?

    1. Create a Zone File.

    [root@DNSServer ~]# cd /var/named/chroot/var/named/
    [root@DNSServer named]# vi manastripathy.com.dns
    [root@DNSServer named]# more manastripathy.com.dns
    $ORIGIN .
    $TTL 3600       ; 1 hour
    manastripathy.com              IN SOA  dns.balada-sw.com. hostmaster.balada-sw.com. (   --- Define SOA
                                    2016031201 ; serial
                                    3600       ; refresh (1 hour)
                                    600        ; retry (10 minutes)
                                    86400      ; expire (1 day)
                                    3600       ; minimum (1 hour)
                                    )
                            NS      dns.balada.eu. ---- Name Server
                            NS      dns.balada.se.  ---- Name Server
                            NS      dns.balada-sw.com. ---- Name Server
                            TXT     "MS=xxxxxxxx"

    2. Make an entry in "named.conf" file.

    [root@DNSServer named]# vi ../../etc/named.conf
    zone "manastripathy.com" {
            type master;
            file "/var/named/chroot/var/named/manastripathy.com.dns";
    };

    3. Check the Config file syntax.

    [root@DNSServer named]# named-checkzone manastripathy.com manastripathy.com.dns
    zone manastripathy.com/IN: loaded serial 2016031201
    OK
    [root@DNSServer named]#

    4. Reload the Config.

    [root@DNSServer named]# /etc/init.d/named reload
    Reloading named:                                           [  OK  ]
    [root@DNSServer named]# ps aux | grep -i named
    named     4058  1.3 10.4  90156 53816 ?        Ssl   2015 6167:08 /usr/sbin/named -u named -t /var/named/chroot
    root     27378  0.0  0.1   5124   688 pts/0    R+   11:27   0:00 grep -i named
    [root@DNSServer named]#

    5. Check if the changes the effected.

    [root@cobblerbalada ~]# dig -t txt manastripathy.com

    ; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7_2.3 <<>> -t txt manastripathy.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25876
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4000
    ;; QUESTION SECTION:
    ;manastripathy.com.            IN      TXT

    ;; ANSWER SECTION:
    manastripathy.com.     3600    IN      TXT     "MS=xxxxxxxx"

    ;; Query time: 18 msec
    ;; SERVER: 10.242.78.1#53(10.242.78.1)
    ;; WHEN: Sat Oct 15 15:50:00 MSK 2016
    ;; MSG SIZE  rcvd: 73

    [root@cobblerbalada ~]#


    No comments