Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If anyone can help me troubleshoot this, I would very much appreciate it!!

The tests work. It's just that when I do the manual ping/nslookup test, nothing is working. By the way, I followed everything in this tutorial.

This is my /etc/bind/zones/master/main.com.db file:

;
; BIND data file for main.com
;
$TTL    604800
@       IN      SOA     main.com. info.main.com. (
                            2007011501         ; Serial
                                  7200         ; Refresh
                                   120         ; Retry
                               2419200         ; Expire
                                604800)        ; Default TTL
;
@       IN      NS      ns1.main.com.
@       IN      NS      ns2.main.com.
main.com.    IN      MX      10      mail.main.com.
main.com.    IN      A       174.143.182.58
www                     IN      CNAME   main.com.
mail                    IN      A       174.143.182.58
ftp                     IN      CNAME   main.com.
main.com.            IN      TXT     "v=spf1 ip4:174.143.182.58 a mx ~all"
mail                    IN      TXT     "v=spf1 a -all"

This is my reverse DNS (/etc/bind/zones/master/174.143.182.rev) file:

$TTL 1d ;
$ORIGIN 182.143.174.IN-ADDR.ARPA.
@       IN      SOA     ns1.main.com.   info.main.com. (
                                       2007011501
                                       7200
                                       120
                                       2419200
                                       604800
)
        IN      NS      ns1.main.com.
        IN      NS      ns2.main.com.
1       IN      PTR     ns1.main.com.
2       IN      PTR     ns2.main.com.

This is my named.conf.local file for BIND:

zone "main.com" {
       type master;
       file "/etc/bind/zones/master/main.com.db";
};

zone "182.143.174.IN-ADDR.ARPA" {
       type master;
       file "/etc/bind/zones/master/174.143.182.58.rev";
};

When I do my named-checkzones, it works.

named-checkzone main.com main.com.db
zone main.com/IN: NS 'ns1.main.com' has no address records (A or AAAA)
zone main.com/IN: NS 'ns2.main.com' has no address records (A or AAAA)
zone main.com/IN: loaded serial 2007011501
OK

However, something is wrong when I restart BIND9.

/etc/init.d/bind9 restart
Stopping domain name service...: bind9rndc: connect failed: 127.0.0.1#953: connection refused
.
Starting domain name service...: bind9.

When I do a ping test, it does not work:

ping ns1.main.com
PING ns1.main.com (72.16.146.146) 56(84) bytes of data.
64 bytes from ns1.main.com (72.16.146.146): icmp_seq=1 ttl=52 time=20.0 ms

I expect the ping test to show my IP (174.143.182.58) instead of 72.16.146.146.

I even tried to edit my resolve.conf to the same IP:

nameserver      174.143.182.58

If anyone can help figure out why it's not detecting my own IP when I ping it...please help me!

share|improve this question
    
Describing what's actually going wrong would be a mighty fine start. Use the standard template: What you expect to see versus what you actually see. –  womble Nov 6 '09 at 11:04
    
I expect the ping test to show my IP (174.143.182.58) instead of 72.16.146.146. –  Alex Nov 6 '09 at 11:17
    
I think the example in the tutorial you followed is broken but works for them because they have an A record for example.com that happens to be the IP for the name server. –  Sim Nov 6 '09 at 11:56

2 Answers 2

up vote 5 down vote accepted

You haven't got A records for your nameservers ns1.main.com and ns2.main.com. The named-checkzones hasn't worked as it is warning you that you haven't got A records for your nameservers:

zone main.com/IN: NS 'ns1.main.com' has no address records (A or AAAA)

zone main.com/IN: NS 'ns2.main.com' has no address records (A or AAAA)

So you need to add the following to your main.com.db file:

ns1           IN    A    174.143.182.1
ns2           IN    A    174.143.182.2

Without these glue records the whole thing won't work.

Also your SOA record for main.com is wrong. It should be:

@       IN      SOA     ns1.main.com. info.main.com.

It didn't fail in the named-checkzones because you have a main.com A record and BIND assumed that was the name server record.

share|improve this answer
    
Hi Sim. Thanks for the answer. I made the changes, and the name-checkzones did not give the "no address records" warning anymore. However, when I do a ping...it still does not go to my IP? Is it because when I started the BIND9, it had a warning: Stopping domain name service...: bind9rndc: connect failed: 127.0.0.1#953: connection refused? –  Alex Nov 6 '09 at 21:39
    
Instead of restarting bind have you tried to stop and then start it? Don't use ping to troubleshoot DNS, nslookup or better still dig are your friends e.g. dig @localhost main.com. You need to establish if it is your DNS server you are talking to first. Did you remember to increment the SOA number after the changes? –  Sim Nov 7 '09 at 2:47
    
Hang on a second. What are the IPs for your DNS server(s) are they 174.143.182.1 and 174.143.182.2 or should it be 174.143.182.58 and ? At the moment the authoritative name servers for your main.com domain are 174.143.182.1 and 174.143.182.2 - is that right? –  Sim Nov 7 '09 at 2:50
    
If you are doing this just to learn then as Zoredache points out in his comment you should be using example.com or example.net or example.org as that is what they are explicitly designed for. See en.wikipedia.org/wiki/Example.com –  Sim Nov 7 '09 at 2:54

"I expect the ping test to show my IP (174.143.182.58)"

Why do you expect that? There are no records in those files which would cause that to happen.

Are you really the DNS administrator for main.com? That site appears to be up and working despite this. If not, why are you using main.com?

share|improve this answer
1  
perhaps he was using it as an example, and he didn't know 'example.com' is the reserved name for this purpose. –  Zoredache Nov 6 '09 at 17:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.