Solved

Files to edit to setup DNS

Posted on 2003-10-23
8
656 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
 

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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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…
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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now