2015年9月14日 星期一

Build a DNS server in linux...master and slave

http://www.tecmint.com/setup-master-slave-dns-server-in-centos


Setup Master-Slave DNS Server Using “Bind” Tools in RHEL/CentOS 6.5

If you have any questions or problems regarding this article and want help within 24 Hours?  Ask Now 
Babin Lonston
I'm Working as a System Administrator for last 10 year's with 4 years experience with Linux Distributions, fall in love with text based operating systems.
Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.
Receive Your Free Complimentary eBook NOW! - Linux Kernel In A Nutshell - Configuration and Building

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

YOU MAY ALSO LIKE...

25 RESPONSES

  1. Prakash
    Turn on the recursion in named.conf. This will be turned off only for dedicated masters which has many slaves.
    recursion yes;
    Cheers,
    Prakash
  2. mitesh
    Sir ,what is the meaning of $ sign in /etc/named.conf file ?
  3. hello!,
    will it work as my outside facing DNS if I configure it inside my NAT router. (I mean, Will it be accessible from outside my network)?
  4. Geethu
    Thank you….
    This site is really helpful….
    Can understand all about dns master slave setup….
  5. Amrutha
    Thank you so much for building such a good and elaborate website.Its very useful for beginners like us…….
  6. Vippin Sinhmar
    Fantastic Job!!!!! Awesome work sir!!!!! appreciated….
  7. raksmey
    Hello, I am a fresh system engineer that working with Linux Distribution. I follow your guide, it is work well! thank you
  8. vicky
    Hello,
    I have configured the DNS in my test lab. Reverse lookup is working fine for me but facing issue with name(forward) lookup.
    node1 : 192.168.111.160 (Master)
    node2 : 192.168.111.161 (Slave)
    node3 : 192.168.111.162 (client)
    *****************Successful response for reverse lookup.
    [root@Node3 ~]# dig -x 192.168.111.162 +noquestion
    ; <> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <> -x 192.168.111.162 +noquestion
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2681
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
    ;; WARNING: recursion requested but not available
    ;; ANSWER SECTION:
    162.111.168.192.in-addr.arpa. 259200 IN PTR node3.ganesh.com.
    ;; AUTHORITY SECTION:
    111.168.192.in-addr.arpa. 259200 IN NS node1.ganesh.com.
    111.168.192.in-addr.arpa. 259200 IN NS node2.ganesh.com.
    ;; ADDITIONAL SECTION:
    node1.ganesh.com. 259200 IN A 192.168.111.160
    node2.ganesh.com. 259200 IN A 192.168.111.161
    ;; Query time: 0 msec
    ;; SERVER: 192.168.111.160#53(192.168.111.160)
    ;; WHEN: Mon Mar 16 03:04:42 2015
    ;; MSG SIZE rcvd: 148
    ****************Unsuccessful response for forward lookup. This is happening on all nodes.
    [root@Node3 ~]# dig -x node3 +noquestion
    ; <> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <> -x node3 +noquestion
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 2333
    ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    ;; WARNING: recursion requested but not available
    ;; Query time: 1 msec
    ;; SERVER: 192.168.111.160#53(192.168.111.160)
    ;; WHEN: Mon Mar 16 03:05:30 2015
    ;; MSG SIZE rcvd: 36
    ****************************Master Forward lookup file
    [root@Node1 ~]# cat /var/named/chroot/var/named/ganesh.com.zone
    $TTL 3D
    @ IN SOA node1.ganesh.com. root.ganesh.com. (
    20021115413 ; serial#
    1D ; refresh, seconds
    1H ; retry, seconds
    1W ; expire, seconds
    3H ) ; minimum, seconds
    ; Name servers
    @ IN NS node1.ganesh.com.
    @ IN NS node2.ganesh.com.
    ;Hosts in the domain
    @ IN A 192.168.111.160
    @ IN A 192.168.111.161
    @ IN A 192.168.111.162
    node1 IN A 192.168.111.160
    node2 IN A 192.168.111.161
    node3 IN A 192.168.111.162
    ****************named.conf file from master node.
    [root@Node1 ~]# cat /var/named/chroot/etc/named.conf
    options{
    directory "/var/named/";
    listen-on port 53 { 127.0.0.1; 192.168.111.160; };
    allow-transfer { localhost; 192.168.111.161; };
    recursion no;
    };
    zone "ganesh.com" {
    type master;
    file "ganesh.com.zone";
    allow-update {none;};
    allow-query { any; };
    };
    zone "111.168.192.in-addr.arpa" {
    type master;
    file "192-168-111.zone";
    allow-update {none;};
    allow-query { any; };
    };
    Any help will be highly appreciated. Checked configuration couple of times not sure where I am doing the mistake.
    Regards,
    Vicky

LEAVE A REPLY

沒有留言:

張貼留言