Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: name server not working

  1. #11
    Join Date
    Aug 2008
    Beans
    37

    Re: name server not working

    I don't think the name server is even being used. I changed the IP address of hofmann.local (the name server itself) in local.zone to a different IP address, restarted the server, and ran dig hofmann.local and it still gave me the old IP address.

    /etc/host.conf contains:
    Code:
    order hosts,bind
    multi on
    /etc/resolv.conf contains:
    Code:
    search hsd1.co.comcast.net.
    nameserver 192.168.123.1
    nameserver 192.168.123.254
    nameserver 68.87.85.98
    nameserver 68.87.69.146
    I tried reversing the order to bind,hosts in /etc/host.conf, but that made no difference.

    When I run ps -A, I can see that the named process is running. When I start the name server no errors are reported.

    I am very new to ubuntu and this is the first ubuntu server I have set up. Does anyone know what else I can check to make sure that the system will use my local name server first.

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

    Re: name server not working

    Quote Originally Posted by sawatdee View Post
    I don't think the name server is even being used.
    Hum, is nscd running? that can do some weird things sometimes.

    EDIT: that's also what I was trying to determine with doing the 'dig @', trying to force the query to your DNS server and from what you pasted there was no answer section, so something is getting lost along the way.
    Last edited by StickyStyle; August 8th, 2008 at 01:02 PM.

  3. #13
    Join Date
    Jun 2007
    Location
    Neverland
    Beans
    894
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: name server not working

    Hello,

    Question 1: No one raised the following point: but are you running a firewall? Are ports 53 upd/tcp open?

    Question 2: are you trying to resolve to your own server from the same machine (i.e. localhost) or other machines?

    If local, then you also need the local zones (rfc1912) to properly resolve.

    Tell me if you need more help.

    Cheers,
    Dedoimedo
    Linux Systems Expert / Systems Programmer, LPIC-1, LPIC-2(WIP), GSEC, CCHD, CCHA
    http://www.dedoimedo.com - A place to learn a lot about a lot!

    Pangolin Review | Ringtail Review | Linux Games | My books

  4. #14
    Join Date
    Aug 2008
    Beans
    37

    Re: name server not working

    I am trying to set up the name server so that it works from any machine on my local network, including this machine itself. I am not familiar with rfc1912.

    I would assume the following test means that port 53 is open on 192.168.123.1
    Code:
    $sudo nmap hofmann.local
    
    Starting Nmap 4.53 ( http://insecure.org ) at 2008-08-08 17:57 MDT
    Interesting ports on hofmann.local (192.168.123.1):
    Not shown: 1712 closed ports
    PORT   STATE SERVICE
    53/tcp open  domain
    80/tcp open  http
    
    Nmap done: 1 IP address (1 host up) scanned in 0.163 seconds
    If I comment out the following line (as shown below) in my /etc/hosts file, I can not resolve hofmann.local (the host name of the name server, which is the local host in this case):
    Code:
    #192.168.123.1   hofmann.local   hofmann
    However, if I run dig hofmann.local, I still get:
    Code:
    ; <<>> DiG 9.4.2-P1 <<>> hofmann.local
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29765
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;hofmann.local.			IN	A
    
    ;; ANSWER SECTION:
    hofmann.local.		86400	IN	A	192.168.123.1
    
    ;; AUTHORITY SECTION:
    local.			86400	IN	NS	hofmann.local.
    
    ;; Query time: 0 msec
    ;; SERVER: 192.168.123.1#53(192.168.123.1)
    ;; WHEN: Fri Aug  8 18:02:32 2008
    ;; MSG SIZE  rcvd: 61
    dig mysite.local returns:
    Code:
    ; <<>> DiG 9.4.2-P1 <<>> mysite.local
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47576
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; 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.
    
    ;; Query time: 0 msec
    ;; SERVER: 192.168.123.1#53(192.168.123.1)
    ;; WHEN: Fri Aug  8 18:03:29 2008
    ;; MSG SIZE  rcvd: 86
    But ping mysite.local returns:
    Code:
    ping: unknown host mysite.local
    Whereas ping hofmann.local works fine. This is really weird. I have never seen anything like it. I can't even think of anything else to try. Any suggestions would be so much appreciated.

  5. #15
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: name server not working

    Quote Originally Posted by sawatdee View Post
    I don't think the name server is even being used. I changed the IP address of hofmann.local (the name server itself) in local.zone to a different IP address, restarted the server, and ran dig hofmann.local and it still gave me the old IP address.

    /etc/host.conf contains:
    Code:
    order hosts,bind
    multi on
    /etc/resolv.conf contains:
    Code:
    search hsd1.co.comcast.net.
    nameserver 192.168.123.1
    nameserver 192.168.123.254
    nameserver 68.87.85.98
    nameserver 68.87.69.146
    I tried reversing the order to bind,hosts in /etc/host.conf, but that made no difference.

    When I run ps -A, I can see that the named process is running. When I start the name server no errors are reported.

    I am very new to ubuntu and this is the first ubuntu server I have set up. Does anyone know what else I can check to make sure that the system will use my local name server first.
    This brings up another question. Do you really NEED a nameserver on your local network? Most people don't unless you have many many computers. You definitely don't need one to run a website, you just use your domain registrar's name servers.

    If I'm wrong and you have a large network, I apologize and just disregard what I said.

    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

  6. #16
    Join Date
    Aug 2008
    Beans
    37

    Re: name server not working

    It would be much easier to have a name server because I have a lot of web sites that change often and I test them from different machines/platforms on my network. I really would like to get the name server working.

    I originally installed the system as a desktop installation and added the bind9 package later, but that shouldn't matter. At this point, I am convinced that bind9 is working fine actually. But it seems like ping and apache are not checking the name server at all. If I add one of my web sites to /etc/hosts, ping works for that site. /etc/resolv.conf seems to be set up fine. There is also a file called /etc/nsswitch.conf, but I don't know if I need to change that. Are there any other files that might need to be changed to make the system check the name server first?

  7. #17
    Join Date
    Aug 2008
    Beans
    37

    Re: name server not working

    The following test is further proof that my name server is working. So ping and apache must not even be using the name server to resolve domains.
    Code:
    $ named-checkzone mysite.local /etc/bind/local.zone
    zone mysite.local/IN: loaded serial 200808091
    OK
    
    $ named-checkzone mysite.local /etc/bind/123.168.192.in-addr.arpa.zone
    zone mysite.local/IN: loaded serial 19
    OK

Page 2 of 2 FirstFirst 12

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
  •