[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Files to edit to setup DNS

Posted on 2003-10-23
8
Medium Priority
?
676 Views
Last Modified: 2013-12-15
I have a practice server. I have Ip address let say 209.111.112.16

I'm trying to setup something like

dns1.nerbie.com (209.111.112.16)  and dns2.nerbie.com (209.111.112.17)

For the last 4 days still not working. Anybody can walk me to proper configuration? I did read several tutorials but still not working.

Are these the only files to edit etc/named.conf and var/named/nerbie.com.db    ???? I did some dns lookup but my dns1 and dns2 cannot be found meaning its not working.
0
Comment
Question by:nerbie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 12

Accepted Solution

by:
paullamhkg earned 1600 total points
ID: 9612338
is those IP os real IP?? is the dns2.nerbie.com will be the slave DNS? have you set the /etc/named.conf something like below

[root@dns2 /etc]# more named.conf
// generated by named-bootconf.pl

options {
        directory "/var/named";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;
};

//
// a caching only nameserver config
//
zone "." {
        type hint;
        file "/var/named/named.ca";
};

zone "0.0.127.in-addr.arpa" {
        type master;
        file "/var/named/named.local";
};

zone "nerbie.com" in {
        type slave;
        file "/var/named/nerbie.com.db";
        masters { 209.111.112.16; };
};

zone "112.111.209.in-addr.arpa" in {
        type slave;
        file "/var/named/209.111.112.db";
        masters { 209.111.112.16; };
};


and DNS1 is your master DNS, should have something like below /etc/named.conf and /var/named/nerbie.com.db and /var/named/209.111.112.db

[root@dns named]# more /etc/named.conf
// generated by named-bootconf.pl

options {
        directory "/var/named";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
        // query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
        type hint;
        file "/var/named/named.ca";
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "/var/named/named.local";
        allow-update { none; };
};

zone "nikoyo.com" IN {
        type master;
        file "/var/named/db.nikoyo.com";
        allow-transfer {209.111.112.17;};
};

zone "0.168.192.in-addr.arpa" IN {
        type master;
        file "/var/named/db.192.168.0";
        allow-transfer {209.111.112.17;};
};

include "/etc/rndc.key";


nerbie.com.db

@ IN SOA dns1.nerbie.com.  root.nerbie.com. (
                    2001062501 ; Serial
                    10800      ; Refresh after 3 hours
                    3600       ; Retry after 1 hour
                    86400      ; Expire after 1 day
                    86400   )  ; Minimum TTL of 1 day

                 IN       NS      dns1.nerbie.com.
                 IN       NS      dns2.nerbie.com.
localhost        IN       A       127.0.0.1
dns1              IN       A       209.111.112.16
dns2              IN       A       209.111.112.17

[root@dns1 named]# more 209.111.112.db
@    IN    SOA   dns.nerbie.com. root.nikoyo.com. (
                         2001062501 ; Serial
                         10800      ; Refresh after 3 hours
                         3600       ; Retry after 1 hour
                         86400      ; Expire after 1 day
                         86400  )   ; Minimum TTL of 1 day
           IN    NS      dns1.nerbie.com.
           IN    NS      dns2.berbie.com.

16         IN    PTR     dns1.nerbie.com.
17         IN    PTR     dns2.nerbie.com.


After you set those files, have you restart the named service? try /etc/rc.d/init.d/named restart (you should log in as root)
0
 

Author Comment

by:nerbie
ID: 9618724
Hi thanks for the reply.

I'm done what you are asking me to do.

controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
        type hint;
        file "/var/named/named.ca";
};

zone "0.0.127.in-addr.arpa"{
        type master;
        file "/var/named/named.local";
        allow-update { none; };


/etc/named.conf content  :

zone "mhivehosting.com" in {
        type slave;
        file "/var/named/mhivehosting.com.db";
        masters { 209.120.238.14; };
};

zone "112.111.209.in-addr.arpa" in {
        type slave;
        file "/var/named/209.120.238.db";
        masters { 209.120.238.15; };
};

zone "mhivehosting.com" {
        type master;
        file "/var/named/mhivehosting.com.db";
};

--------------------------------------------------------------------------------------

for mhivehosting.com.db

@ IN SOA dns1.mhivehosting.com.  root.mhivehosting.com. (
                    2001062501 ; Serial
                    10800      ; Refresh after 3 hours
                    3600       ; Retry after 1 hour
                    86400      ; Expire after 1 day
                    86400   )  ; Minimum TTL of 1 day

                 IN       NS      dns1.mhivehosting.com.
                 IN       NS      dns2.mhivehosting.com.
localhost        IN       A       127.0.0.1
dns1              IN       A       209.120.238.14
dns2              IN       A       209.120.238.15

--------------------------------------------------------------------------------------

for 209.120.238.db

@    IN    SOA   dns.mhivehosting.com. root.mhivehosting.com. (
                         2001062501 ; Serial
                         10800      ; Refresh after 3 hours
                         3600       ; Retry after 1 hour
                         86400      ; Expire after 1 day
                         86400  )   ; Minimum TTL of 1 day
           IN    NS      dns1.mhivehosting.com.
           IN    NS      dns2.mhivehosting.com.

16         IN    PTR     dns1.mhivehosting.com.
17         IN    PTR     dns2.mhivehosting.com.



I did run /etc/rc.d/init.d/named restart . somehow I got an error  rndc: connect failed: connection refused then I run /scripts/fixndc and re run the restart. oh by the way this is a real ip and domain.

I did already register dns1.mhivehosting.com(209.120.238.14) and dns2.mhivehosting(209.120.238.15) this to my registrar by mhivehosting.com on the internet still not working.
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9624595
There may be a firewall setting in DNS2 which made the connection refused error, if yes, try disable the DNS2 firewall 1st and restart the DNS service again, at lease let both NS can sync the data 1st.

is there firewall disallow to connect your DNS1 and DNS2? if yes, you will got cannot be found error also, I will suggest you turn off the firewall and try again, if it work, try to apply the firewall setting again.

Have a check here http://www.siliconvalleyccie.com/linux-hn/iptables-intro.htm#_Toc51299457 for using the iptable firewall to allow DNS access.

Hope this info can help :) BTW, the http://www.siliconvalleyccie.com/#Linux is for setup a home networking include DNS service with the static IP, which I think will give you some hints.
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 

Author Comment

by:nerbie
ID: 9624690
I dont have firewall. ahhh this is still now working. I read lot of stuff but still its not working.
0
 

Author Comment

by:nerbie
ID: 9624694
DNS2 can be now ping. the main problem all stuff relatede to name servers its not working only IP.
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9624738
Do you mean now you can ping dns2 and dns2.mhivehosting.com?? how abt the dns1 can you ping??

Can  you give me more specify/detail, what you have been trying?
0
 

Author Comment

by:nerbie
ID: 9631278
Its working now. Thanks for the help. Somehow all of the setup you mentioned works excepts some local ip setup which I mess up when I started configuring the server.

Thanks a lot!
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9631294
Happy to hear you over come your problem :)
0

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month14 days, 16 hours left to enroll

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question