Link to home
Start Free TrialLog in
Avatar of nerbie
nerbie

asked on

Files to edit to setup DNS

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.
ASKER CERTIFIED SOLUTION
Avatar of paullamhkg
paullamhkg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nerbie
nerbie

ASKER

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.
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.
Avatar of nerbie

ASKER

I dont have firewall. ahhh this is still now working. I read lot of stuff but still its not working.
Avatar of nerbie

ASKER

DNS2 can be now ping. the main problem all stuff relatede to name servers its not working only IP.
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?
Avatar of nerbie

ASKER

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!
Happy to hear you over come your problem :)