Find the answer to your Linux question:
Results 1 to 2 of 2
i have been struggling with this DNS setup on Red Hat 9 for about 3 days now and i just can seem to get things working. any advice would be ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Posts
    6

    DNS help PLEASE!!


    i have been struggling with this DNS setup on Red Hat 9 for about 3 days now and i just can seem to get things working. any advice would be a great help here. here is what i have as of now:

    (named.conf):



    Code:
    options { 
    directory "/var/named"; } 
    
    controls { 
    inet 127.0.0.1 allow { localhost; } keys { rndckey; }; 
    }; 
    
    zone "." IN { 
    type hint; 
    file "named.ca"; 
    } 
    
    zone "localhost" IN { 
    type master; 
    file "localhost.zone"; 
    allow-update { none; }; 
    }; 
    
    zone "mydomain.com" IN { 
    type master; 
    file "mydomain.zone"; 
    allow-update { none; }; 
    }; 
    
    zone "0.0.127.in-addr.arpa" IN { 
    type master; 
    file "named.local"; 
    allow-update { none; }; 
    }; 
    
    include "/etc/rndc.key";


    and here is the other file
    (mydomain.zone)



    Code:
    $TTL 86400 
    $ORIGIN localhost. 
    @   SOA  mydomain.com. root.mydomain.com. ( 
                     420012 
                3H 
                15M 
                1W 
                1D 
                                          ) 
                            NS      ns1.mydomain.com. 
              NS      ns2.mydomain.com. 
                            A       xxx.xxx.xxx.xxx 
    ftp                     CNAME   mydomain.com. 
    mail                    CNAME   mydomain.com. 
    ns                      CNAME   mydomain.com. 
    www                     CNAME   mydomain.com.

  2. #2
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    First of all, is it really "mydomain.com" you are trying to configure?
    And are you the owner of it?

    Anyhow, you have to configure ns1 and ns2 as well.

    I.e.

    Code:
             NS      ns1.mydomain.com.
              NS      ns2.mydomain.com.
                            A       xxx.xxx.xxx.xxx
    ns1                   A       xxx.xxx.xxx.xxx
    ns2                   A       xxx.xxx.xxx.xxx
    ftp                     CNAME   mydomain.com.
    mail                    CNAME   mydomain.com.
    ns                      CNAME   mydomain.com.
    www                     CNAME   mydomain.com.
    Important that you do NOT use CNAME on those two records!
    When you have done so, can you use another computer on the same network, pointing it's DNS server to this server, and try to ping "www.mydomain.com"
    Or from this server you should try

    Code:
    dig @127.0.0.1 mydomain.com any any
    The result should be something like
    Code:
    ; <<>> DiG 9.2.4 <<>> @127.0.0.1 mydomain.com any any
    ;; global options&#58;  printcmd
    ;; Got answer&#58;
    ;; ->>HEADER<<- opcode&#58; QUERY, status&#58; NOERROR, id&#58; 6864
    ;; flags&#58; qr aa rd ra; QUERY&#58; 1, ANSWER&#58; 6, AUTHORITY&#58; 0, ADDITIONAL&#58; 4
     
    ;; QUESTION SECTION&#58;
    ;mydomain.com.                    IN      ANY
     
    ;; ANSWER SECTION&#58;
    mydomain.com.             14400   IN      SOA     ns1.mydomain.com. root.mydomain.com. 420012 10800 900 604800 86400

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •