DNS Not able to resolve http://domainname.com

Discussion in 'Server Operation' started by nidhintomson, Jun 25, 2008.

  1. nidhintomson

    nidhintomson New Member

    Hi All
    I have configured DNS as per DNS how to in howtoforge.com
    http://howtoforge.com/linux_bind9_and_caching_nameserver

    I configured DNS for the domain domainname.net. My setup works perfectly fine other than in one palce.

    If i ping www.domainname.net it responds fine

    If i ping domainname.net it says ping cannot find host name.



    I am herewith attaching the zone entry for domainname.net in /etc/named.conf

    zone "domainname.net" IN {
    type master;
    file "domainname.net.zone";
    allow-update { none; };
    };


    and /var/named/chroot/var/named/domainname.net.zone is as follows :-




    $TTL 86400
    @ IN SOA @ root.nameserver.domainname.net. (
    42 ; serial (d. adams)
    3H ; refresh
    15M ; retry
    1W ; expiry
    1D ) ; minimum
    @ IN NS nameserver.domainname.net.
    nameserver IN A 192.168.0.19
    www IN A 192.168.0.19
    IN A 192.168.0.19




    what is wrong with my setup ? how do we setup www.domainname.net as well as domainname.net ?


    I tried this setup on an FC8 Machine and installed all the packages required using yum.

    Looking forward to hear from you

    Thanks and Regards
    Nidhin Tomson
     
  2. Acidus

    Acidus New Member

    hi there..
    check this line:

    should look like:

    @ IN SOA yourhostname.yourdomain.net. root.yourhostname.yourdomain.net.

    same for reverse zones.

    also check yours resolv.conf file.

    regards,!
     
  3. nidhintomson

    nidhintomson New Member




    Hi Acidus
    Thanks for the response. I changed the zone file as per ur instructions . but still ti doesnt work. This is my updated zone file.


    $TTL 86400
    @ IN SOA nameserver.domainname.net root.nameserver.domainname.net. (
    42 ; serial (d. adams)
    3H ; refresh
    15M ; retry
    1W ; expiry
    1D ) ; minimum
    @ IN NS nameserver.domainname.net.
    nameserver IN A 192.168.0.19
    www IN A 192.168.0.19
    IN A 192.168.0.19



    My /etc/resolve.conf is as follows :-

    nameserver 127.0.0.1


    My hostname is nameserver



    But still the same error is getting

    Looking forward to hear from you

    Thanks and Regards
    Nidhin Tomson
     
  4. c4rdinal

    c4rdinal New Member

    check DNS service if it is running.
    what's in the logs?
     
  5. topdog

    topdog Active Member

    You need to add this to your zone file
    Code:
    @   IN A 192.168.0.19
     
  6. nidhintomson

    nidhintomson New Member

    Thanks topdog
    Your help worked for me. now www.domain.net and domain.net is pinging fine.

    I have one more doubt related to this.

    How to we do if we have to ping www.nameserver.domain.net or www.mail.domainname.net ?

    Like in real world scenarios where we have to get the mail login page if we browse

    mail.domainname.net or
    www.mail.domainname.net

    How do we setup this ?

    Looking forward to hear from you

    Thanks and Regards
    Nidhin Tomson
     
  7. topdog

    topdog Active Member

    Code:
    mail.domainname.net  IN  A ip_address
    www.mail.domainname.net  IN  A ip_address
     
  8. nidhintomson

    nidhintomson New Member

    Hi Topdog
    Thanks for help. Now almost my problems are solved. Thanks again for the help. I am herewith pasting my latest zone file again.

    $TTL 86400
    @ IN SOA nameserver.domainname.net root.nameserver.domainname.net. (
    42 ; serial (d. adams)
    3H ; refresh
    15M ; retry
    1W ; expiry
    1D ) ; minimum
    @ IN NS nameserver.domainname.net.
    @ IN A 192.168.0.19
    nameserver IN A 192.168.0.19
    www IN A 192.168.0.19
    www.mail IN A 192.168.0.19
    ftp IN A 192.168.0.19


    Is there a better way of doing this (I doubt wether what i have done is a professional config) ? I mean like using CNAME and all.

    If any one can reconfigure the same with using CNAME and all it would be of great help to me as well as newbies like me.


    Looking forward to hear from you

    Thanks and Regards
    Nidhin Tomson
     
  9. topdog

    topdog Active Member

    It seems fine to me.
     
  10. nidhintomson

    nidhintomson New Member

    Thanks to all who helped me out of this trouble..

    Thanks to one and all
     

Share This Page