Skip to main content

Configuring and Deploying DNS servers (primary, secondary, root and cache on centos 6.5) - Part 2 - Secondary DNS

This walk-through assumes that you have initial deployment of Primary DNS server. Look at my previous post for that.

Configuration on Primary DNS server:

  • edit /etc/named.conf
add the allow transfer statement in your zone declaration(both forward and reverse)

 zone "msm.net" {
        type master;
        file "msm.net.db";
        allow-transfer { 192.168.12.3; };
};

zone "12.168.192.in-addr.arpa" {
        type master;
        file "msm.net.rev.db";
        allow-transfer { 192.168.12.3; };
};

  •  Allow firewall to communicate on tcp/udp port 53
    • iptables -I INPUT -p tcp --dport 53 -j ACCEPT
    • iptables -I INPUT -p udp --dport 53 -j ACCEPT
  • Restart the named deamon
    • service named restart

Configuration on Secondary DNS server:

Make sure you have internet access.
  • Install Bind packages
    • yum install bind bind-utils bind-chroot bind-libs
  • edit /etc/named.conf
 listen-on port 53 { 192.168.12.3; }; //Ip address of the machine
*Remove the allow-query line
*Optional: remove recursion statement and the "." zone to disable recursion and caching.

 zone "msm.net" { //your forward zone statement, same as primary
        type slave; //slave sets this server as slave
        file "msm.net.db"; //the file name that you created in primary
        masters { 192.168.12.2; }; //this is telling the server that this ip is my primary dns's ip
        allow-transfer { none; };
};

zone "12.168.192.in-addr.arpa" { //reverse lookup zone statement, same as primary
        type slave; //this sets this server as a slave of this reverse zone
        file "msm.net.rev.db";  //the file name that you created in primary for reverse  zone
        masters { 192.168.12.2; }; //primary server's ip address
        allow-transfer { none; };
};




  • Add exception in SELINUX
    •  setsebool -P named_write_master_zones 1
  • make name the owner of /var/named directory
    • chown named:named /var/named
  • Start the named daemon
    • service named start
  • Check logs if everything went well. It should say zone loaded and file transfered
    • tail -30 /var/log/messages
 named[21296]: transfer of 'msm.net/IN' from 192.168.12.2#53: Transfer completed: 1 messages, 7 records, 206 bytes, 0.001 secs (206000 bytes/sec)


If everything went fine then you should see your zone files under /var/named automatically transferred by starting the named daemon, this transfer of file is called a zone transfer.

Prefer a video walk-through? have a look...

Comments

Popular posts from this blog

ASUS RT N16 + OpenWRT + nodogsplash = WiFi Hotspot (For beginners)

1.Make sure you are directly connected to the router through a cable ·Take an ethernet cable from your ASUS modem and plug it into your pc/laptop
2.Now access your modem by going into the browser and typing: 192.168.1.1 ·Go to administration tab and click on Firmware upgrade/update NOTE: Please use internet explorer for all of these configurations. There are some issues reported in other browsers. 3.You will have to load a DD-WRT basic image first to load the openWRT image. You cannot directly load openWRT image for some reason I dont know of ·Download the image by clicking on the link: www.dd-wrt.com/routerdb/de/download/Asus/RT-N16/-/dd-wrt.v24-14896_NEWD-2_K2.6_mini_RT-N16.trx/3763
4.Once the image is downloaded just click on browse on the ASUS firmware upgrade page and browse to the DDWRT image and upload it
5.

How to Install GTK-RecordMyDesktop on RHEL 7 (best screen recording software imo)

If you want to record your screen to make tutorials or something else, GTK-recordmydesktop is capable of doing it. Most of the screen-recording programs that I have come across requires you to record your audio separately, however this software is also capable of recording audio without any extra step. It can also work with JACK audio server.

PART 1 - Install EPL repository for RHEL 7:
Open a terminalInstall epel using the following command: yum -y install epel-release.Refresh repo by typing the following commad: yum repolist.PART 2 - Install GTK-RecordMyDesktop: yum install gtk-recordmydesktop That's it, it should work right away. If it doesn't, it is possible that you might be missing some codecs as I installed them from nux and epel repos earlier.

Create isolated network on Virtual Machine Manager - Centos 6.5

Since most of the Linux administration practice is done in a virtual environment, I thought I should create a video about it, as I am aware that some students at my college struggle with it in their labs. Please let me know if I missed anything or did not explain anything clearly.

Thanks,