Solved

Files to edit to setup DNS

Posted on 2003-10-23
8
670 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
  • 4
  • 4
8 Comments
 
LVL 12

Accepted Solution

by:
paullamhkg earned 400 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unix process listing into CSV format 3 46
error log using ftp 7 75
Moving from Mcrypt to OpenSSL 18 63
Upgraded from Debian 7 to 8.7 and got black screen 20 93
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Fine Tune your automatic Updates for Ubuntu / Debian
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

685 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