Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: name server not working

  1. #1
    Join Date
    Aug 2008
    Beans
    37

    name server not working

    I have a very simply name server setup that has worked on other systems, but won't resolve on ubuntu. My machine's static IP address is 192.168.123.1 on the local network. I use .local instead of .com or .net to test websites on my local server. The machine's hostname is hofmann.local and I also want mysite.local to resolve to the same IP address. Very simple, right?

    Here is my named.conf.local:
    Code:
    zone "local"
    {
            type master;
            file "/etc/bind/local.zone";
    };
    
    zone "123.168.192.in-addr.arpa"
    {
            type master;
            file "/etc/bind/123.168.192.in-addr.arpa.zone";
    };
    In the file local.zone I have:
    Code:
    $TTL 86400
    @               IN      SOA     hofmann.local.  root.local. (
                                    18 ; serial
                                    28800 ; refresh
                                    7200 ; retry
                                    604800 ; expire
                                    86400 ; ttl
                                    )
    
    @               IN      NS      hofmann.local.
    
    hofmann         IN      A       192.168.123.1
    
    ; my site
    mysite              CNAME   hofmann
    www.mysite          CNAME   mysite
    dig mysite.local returns:
    Code:
    ;; QUESTION SECTION:
    ;mysite.local.			IN	A
    
    ;; ANSWER SECTION:
    mysite.local.		86400	IN	CNAME	hofmann.local.
    hofmann.local.		86400	IN	A	192.168.123.1
    
    ;; AUTHORITY SECTION:
    local.			86400	IN	NS	hofmann.local.
    ping mysite.local returns:
    Code:
    ping: unknown host mysite.local
    I have also tried using
    Code:
    mysite	IN	A	192.168.123.1
    but ping still can not resolve it, and more importantly my web server can't either.

    However, it finds hofmann.local just fine, both forward (dig) and backward (host). I have restarted the name server more times than I can count, changed the serial number, and everything else I can think of.

    What in the world is going on here? Any clues???

  2. #2
    Join Date
    May 2008
    Location
    Indiana
    Beans
    64
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: name server not working

    mysite CNAME hofmann
    www.mysite CNAME mysite
    Try putting a dot after those CNAMEs

    mysite CNAME hofmann.
    www.mysite CNAME mysite.
    Also when you do ping, see if there is a difference between

    ping mysite.local

    and

    ping mysite.local.

    (basically all I did was add a dot)

    good luck

  3. #3
    Join Date
    May 2008
    Location
    Indiana
    Beans
    64
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: name server not working

    and make sure you change your serial when you update!

    I tend to use something like 20080806XX but it's up to you.

  4. #4
    Join Date
    Aug 2008
    Beans
    37

    Re: name server not working

    Neither of those things worked unfortunately. And I did change the serial number.

  5. #5
    Join Date
    Jan 2005
    Location
    Miami, FL
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: name server not working

    This may sound silly, but is your /etc/resolv.conf pointing to the name server you built?

  6. #6
    Join Date
    Aug 2008
    Beans
    37

    Re: name server not working

    Yes, it is. I can access the Internet just fine, and my host hofmann.local (which is the name server I built) resolves with no problem.

  7. #7
    Join Date
    Jan 2005
    Location
    Miami, FL
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: name server not working

    You DNS server is 192.168.123.1 right?

    What does the following return...
    Code:
    $dig @192.168.123.1 hofmann.local
    and
    Code:
    $dig @192.168.123.1 mysite.local

  8. #8
    Join Date
    Aug 2008
    Beans
    37

    Re: name server not working

    dig @192.168.123.1 hofmann.local
    Code:
    ;; QUESTION SECTION:
    ;hofmann.local.			IN	A
    
    ;; Query time: 0 msec
    ;; SERVER: 192.168.123.1#53(192.168.123.1)
    ;; WHEN: Wed Aug  6 15:24:01 2008
    ;; MSG SIZE  rcvd: 31
    dig @192.168.123.1 mysite.local
    Code:
    ;; QUESTION SECTION:
    ;mysite.local.		IN	A
    
    ;; Query time: 0 msec
    ;; SERVER: 192.168.123.1#53(192.168.123.1)
    ;; WHEN: Wed Aug  6 15:24:09 2008
    ;; MSG SIZE  rcvd: 34

  9. #9
    Join Date
    Apr 2007
    Beans
    54

    Re: name server not working

    I can't duplicate your error with bind 9.3.4-P1. I copied your files and everything works.

    dig +short mysite.local
    hofmann.local.
    192.168.123.1

    ping mysite.local
    PING hofmann.local (192.168.123.1): 56 data bytes
    ^C

    What version of bind are you using?

  10. #10
    Join Date
    Aug 2008
    Beans
    37

    Re: name server not working

    rndc identifies it as version 9.4.2-P1. I installed it as part of a new installation of ubuntu 8.04.1.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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