Find the answer to your Linux question:
Results 1 to 7 of 7
im setting up a DNS for my domains to run on my own apache server. here is my zone file: $TTL 86400 @ IN SOA mydomain.com. hostmaster.mydomail.com. ( 00023 3H ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Posts
    6

    Name Server NightMare, Plz HELP!


    im setting up a DNS for my domains to run on my own apache server. here is my zone file:

    $TTL 86400

    @ IN SOA mydomain.com. hostmaster.mydomail.com. (
    00023
    3H
    15M
    1W
    1D
    )

    ; Name Servers
    IN NS ns1.mydomain.com.
    IN NS ns2.mydomain.com.

    ; CNAME
    www.mydomain.com. IN CNAME www.mydomain.com.

    ; Public
    ns1 IN A 127.0.0.1
    ns2 IN A 127.0.0.1
    www IN A xx.x.xxx.xxx


    well there is the file. now here is the log report:

    loading configuration from '/etc/named.conf'
    no IPv6 interfaces found
    dns_master_load: mydomain.zone:20 www.mydomain.com: CNAME and other data
    zone mydomain.com/IN: loading master file mydomain.zone: CNAME and other data

    when i try to ping www.mydomain.com it returns this:

    Ping: unknown host www.mydomain.com

    any advice on this would be very helpfull, im at my witts end with this thing.

  2. #2
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    Ok I made a few changes to your SOA and NS definitions

    Code:
    $ORIGIN .
    $TTL 86400
    @ IN SOA mydomain.com. hostmaster.mydomain.com. (
       2005030401
       3H
       15M
       1W
       1D
    )
    
    ; Name Servers
                NS ns1.mydomain.com.
                NS ns2.mydomain.com.
    
    $ORIGIN mydomain.com.
    ; Public
    ns1      A     nnn.nnn.nnn.nnn     <- Should be yout servers IP
    ns2      A     nnn.nnn.nnn.nnn     <-  Should be your servers IP
    www    A     xxx.xxx.xxx.xxx
    First of all, there is no point of creating a CNAME that is eq to the A record.
    But more important, your nameserver can't be 127.0.0.1, how would the rest of the world find you? The IP should be your external IP.

    A small suggestion, but it's just my $.05 oppinion, when you set the serial number of your SOA, keep a good numbering system so you really can trouble shoot your config in an easy maner. My principle is that I use the date of today, with a postfix of NN, which would representate the number of changes I made during this day.
    Also make shure that you spell everything correctly, otherwise you will end up in trouble.

    Finaly, how about your "/etc/named.conf" file?
    How have you configured that one?

  3. #3
    Just Joined!
    Join Date
    Mar 2005
    Posts
    6
    thank you VERY much for your input. im giving this a try right now and well see how it goes

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Mar 2005
    Posts
    6
    ok i tried what was suggested and i got all kinds of out-of-zone errors.
    then i removed the $ORIGIN tag and most went away, not sure why. anyway what i am left with is these three things in the log file:

    1. no IPv6 interfaces found
    2. zone mydomain.com/IN: loaded serial 1
    3. zone insomniabox.com/IN: sending notifies (serial 1)

    and i still cannot ping www.mydomain.com

    any ideas?

  6. #5
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    Could you please cut and paste /etc/named.conf and your SOA file here
    (usually /var/named/<your-own-file-name-defined-in-named.conf>)

  7. #6
    Just Joined!
    Join Date
    Mar 2005
    Posts
    6
    sure, here is what i have at present.

    (named.conf):

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

    and here is the other file
    (mydomain.zone)


    Code:
    $TTL 86400 
    $ORIGIN localhost.
    @   SOA  mydomain.com. root.mydomain.com. &#40;
     			       420012
    				3H
    				15M
    				1W
    				1D
                                          &#41;
                            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.

  8. #7
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    Ok! I did just answer this in another thread.
    http://www.linuxforums.org/forum/topic-35928.html
    It do looks like you have it wuite correct, but try the changes I suggested in the other thread, and do the testings I suggested as well.

    DNS as service is quite a distinct on how it works.
    If your domain is not configured in Root DNS servers, you shall/should keep your domain as a local domain, and all client should point to your DNS server only!

Posting Permissions

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