DNS help!

Discussion in 'HOWTO-Related Questions' started by crazy_guy, Jul 22, 2008.

  1. crazy_guy

    crazy_guy New Member

    Hi,

    I setup DNS on Redhat and I can ping from client ns1.example.com, ns1, www.example.com but not example.com

    nslookup also look fine except example.com

    Anyone here can help me solve the problem.
    I suspect it's to do with resolv.conf or named..etc

    Thanks
     
  2. topdog

    topdog Active Member

    post your zone file .
     
  3. crazy_guy

    crazy_guy New Member

    Thanks for quick respond
    #/var/named/chroot/var/named/
    db.example.com
    $TTL 86400
    example.com. SOA ns1.example.com. root.example.com. (
    2007080900 ; serial no YYMMDDXX, XX is 01,02...etc
    28800 ; Refresh in 28800 = 8 hours
    14400 ; Retry in 7200=2 hours
    3600000 ; Expire 3600000 = 1 week
    86400 ; Minimum TTL (Time To Live) 86400 = 24 hour
    )
    IN NS ns1
    ns1 IN A 192.168..1.1
    IN MX 10 mail.example.com.
    mail IN CNAME ns1.example.com.
    ftp IN CNAME ns1.example.com.
    www IN CNAME ns1.example.com.
    squid IN CNAME mars1.marsindo.com.

    Recursion db.1.168.192.rev
    $TTL 86400
    example.com. IN SOA ns1.example.com. root.example.com. (
    2007080900 ; serial no
    28800 ; Refresh in 28800 = 8 hours
    14400 ; Retry in 7200=2 hours
    3600000 ; Expire 3600000 = 1 week
    86400 ; Minimum TTL (Time To Live) 86400 = 24 hour
    )
    IN NS ns1.example.com.
    1 IN PTR example.com.

    #/etc/hosts
    127.0.0.1 localhost.lcoaldomail localhost
    192.168.1.1 ns1.example.com example.com example.com www.example.com

    #/etc/resolv.conf
    search example.com
    nameserver 192.168.1.1
     
  4. topdog

    topdog Active Member

  5. zcworld

    zcworld New Member

    i hope its just an typeo and that you fix it but here

    the two .. between the 168 and the 1.1
    ns1 IN A 192.168..1.1
     
  6. crazy_guy

    crazy_guy New Member

    Hi,

    Thanks for the advice.
    I'd make changes as you'd recommended but unfortunately the result was the same.

    db.example.com
    @ IN SOA ns1.example.com. hostmaster.example.com.
    (.....)

    IN NS ns1.example.com.
    ns1 IN A 192.168.1.1
    www IN A 192.168.1.1

    when I do
    #nslookup example.com
    Server: 192.168.1.1
    Address: 192.168.1.1#53
    *** Can't find example.com : No answer

    if I do #dig example.com
    return "Status: NOERROR" but "ANSWER: 0"

    why here I get answer:0 but if I do #dig ns1.example.com got answer:1
    any idea where I've done wrong?
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Please add this to your zone file:
    Code:
       IN A 192.168.1.1
     

Share This Page