LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DNS Tweak (https://www.linuxquestions.org/questions/linux-networking-3/dns-tweak-273798/)

viniosity 01-04-2005 01:45 PM

DNS Tweak
 
I have a dns server (bind) working and everything is ok except one minor problem. When I ping my A records things work but the TLD doesn't respond.

That is, ping mail.foo.com is ok but ping foo.com says unknown host.

Any idea where I went wrong?

Here is my file for foo
Code:

$TTL    604800
@      IN      SOA    foo.com. root.foo.com. (
                              1        ; Serial
                        604800        ; Refresh
                          86400        ; Retry
                        2419200        ; Expire
                        604800 )      ; Negative Cache TTL
;
@      IN      NS      foo.com.
1.0.0  IN      PTR    localhost.
        IN      MX      10 dns.mail.foo.com  ; mail server
;
#www    CNAME  dns
ftp    CNAME  dns
smtp    CNAME  dns
pop    CNAME  dns
proxy  CNAME  dns
news    CNAME  dns
;
www    A      192.168.1.5
mail    A      192.168.1.2
;


amfoster 01-04-2005 05:30 PM

there is no A record for foo.com

also,
You have NS as foo.com. I am surprised that even works since the nameserver is typically a host machine.

scowles 01-04-2005 07:06 PM

Re: DNS Tweak
 
Quote:

Originally posted by viniosity
I have a dns server (bind) working and everything is ok except one minor problem. When I ping my A records things work but the TLD doesn't respond.

That is, ping mail.foo.com is ok but ping foo.com says unknown host.

Any idea where I went wrong?


I'm surprised anything is working. Along with amfoster's comments, add the following

1) SOA record is referring to a domain name, not a fully qualified domain name. i.e.
Code:

@      IN      SOA    foo.com. root.foo.com.
  should be...
@      IN      SOA    dns.foo.com. root.foo.com.

2) The NS record is pointing to a domain name, not a fully qualified domain name. i.e.
Code:

@      IN      NS      foo.com.
  should be...
@      IN      NS      dns.foo.com.

3) There is no glue record (A) for the NS record. i.e.
Code:

dns      IN      A      192.168.1.4
Note: Change the IP address above to meet your requirements

4) What the hell is a PTR record doing in a forward zone definition? Localhost should always point to 127.0.0.1
Code:

1.0.0  IN      PTR    localhost.
  should be...
localhost    IN      A      127.0.0.1

5) Your MX record is pointing to a FQDN that does not exist. For simplicaity sake, group the MX record with the NS record and add the @ sign. i.e.
Code:

        IN      MX      10 dns.mail.foo.com  ; mail server
should be... Note the trailing period
@      IN      NS      dns.foo.com.
@      IN      MX      10 mail.foo.com.  ; mail server

6) All the CNAME's <groan> point to a non-existant A record. i.e. the "dns" address record does not exist. Item 3 above should fix this problem.
Code:

#www    CNAME  dns
ftp    CNAME  dns
smtp    CNAME  dns
pop    CNAME  dns
proxy  CNAME  dns
news    CNAME  dns

7) If you want to ping the domain name (foo.com), then an Address record is required. i.e.
Code:

@              IN      A      192.168.1.4
Note: Change the above IP address to the address that you want to assign to the domain name. Possibly your web server IP address?


All times are GMT -5. The time now is 06:20 PM.