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

Thread: Bind dns resolving local servers

  1. #1
    Join Date
    Oct 2009
    Beans
    136
    Distro
    Ubuntu 12.04 Precise Pangolin

    Bind dns resolving local servers

    Hello - I have had bind9 installed and running on my server for some time now. However, I have never been able to do a lookup on a specific server on my network to get the IP or vise verse. I have looked at multiple forums and seems that there are so many different configurations. Thank you in advance for any guidance.

    Here is my setup

    server001.linux-network.home - 192.168.1.105 (Bind DNS Server) {Ubuntu 16.04 with latest updates}
    server002.linux-network.home - 192.168.1.110 (Virtual testing server) {Centos7 }
    server003.linux-network.home - 192.168.1.111 (Virtual testing server) {Centos7}

    All my devices on the network use server001 IP for DNS and able to access the internet without a problem. using dig to find name servers for google.com for example works great.

    The issues I am having is when I do a lookup for server001,2 or 3 weather it is hostname or fqdn I am not getting an IP address. I am also not getting a host name when I lookup the IP address of one of the servers.

    Here is what I get when I dig the ip of server002


    Here is what I get when I dig the hostname or fqdn



    Here is what I get when I run nslookup from my windows box.



    Here are my bind config files.

    db.192



    db.linux-network.home



    named.conf.local



    named.conf.options

    Last edited by brent1975; May 24th, 2018 at 03:58 AM.

  2. #2
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,852
    Distro
    Ubuntu Development Release

    Re: Bind dns resolving local servers

    Any chance that you could fix the formatting of your listings?
    Your db.192 file looks incorrect.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  3. #3
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,796
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Bind dns resolving local servers

    Hi brent1975.

    A few thoughts:

    I think you want to use zone "linux-network.home" instead of "linux-master.com" in named.conf.local.

    In order for client to resolve hostnames (no domain, like server002), they need to have the proper 'search' and/or 'domain'. These are passed by the DHCP server. Who is handling DHCP?

    The zone "1.168.192.in-addr.arpa" (file /etc/bind/db.192) should resolve single digits, like 101 for server001. For example:
    Code:
    ; PTR Records
    105           IN      PTR      server001.linux-network.home.
    Could you please paste again the files so spaces and newlines are respected?

    Regards.

  4. #4
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,390
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Bind dns resolving local servers

    It doesn't hurt reading little basic documentation too: https://help.ubuntu.com/lts/servergu...ion.html.en-GB

    In your forward zone file, in the IN SOA line, the domain and admin email address need to finish with a DOT. In your case they don't. This will prevent correct zone functioning.

    And your CNAMEs are wrong. You can't make a CNAME saying server1 is alias to server1.domain.com. That is the point of the zone file, the domain.com part is automatically added.

    Follow the instructions in my link, make a basic zone file first, fix the DOTs you are missing and delete the CNAME records. Restart bind and check if it worked.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  5. #5
    Join Date
    Oct 2009
    Beans
    136
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Bind dns resolving local servers

    Quote Originally Posted by papibe View Post
    Hi brent1975.

    A few thoughts:

    I think you want to use zone "linux-network.home" instead of "linux-master.com" in named.conf.local.

    In order for client to resolve hostnames (no domain, like server002), they need to have the proper 'search' and/or 'domain'. These are passed by the DHCP server. Who is handling DHCP?

    The zone "1.168.192.in-addr.arpa" (file /etc/bind/db.192) should resolve single digits, like 101 for server001. For example:
    Code:
    ; PTR Records
    105           IN      PTR      server001.linux-network.home.
    Could you please paste again the files so spaces and newlines are respected?

    Regards.
    Thanks for the response. I corrected the zone. my understanding for the zone file db.192 "105" for example is supposed to be the last octet of the device IP. I don't use dhcp on my network.

  6. #6
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,390
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Bind dns resolving local servers

    I will try one more time because you don't seem to be reading all the replies. Your db.linux-network.home has major errors. Did you see my previous post and read the document?

    You need to fix that. The reverse zone is the least of your problems, it is rarely used anyway. The nslookup you posted is for the forward zone. And that still needs fixing if it looks like your post #1.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  7. #7
    Join Date
    Oct 2009
    Beans
    136
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Bind dns resolving local servers

    Quote Originally Posted by darkod View Post
    I will try one more time because you don't seem to be reading all the replies. Your db.linux-network.home has major errors. Did you see my previous post and read the document?

    You need to fix that. The reverse zone is the least of your problems, it is rarely used anyway. The nslookup you posted is for the forward zone. And that still needs fixing if it looks like your post #1.
    I read your post. I created a new one and this what I have.




    When I do a dig on ns now I get:


    I am at least getting answers now. However, I was thinking it should have my server listed. not root-servers.net.

  8. #8
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,852
    Distro
    Ubuntu Development Release

    Re: Bind dns resolving local servers

    "dig" does not auto append the dns-search stuff (the rest of the FQDN). nslookup does.
    Example:

    Code:
    doug@DOUG-64:~$ dig s15
    
    ; <<>> DiG 9.10.3-P4-Ubuntu <<>> s15
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 6290
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;s15.                           IN      A
    
    ;; AUTHORITY SECTION:
    .                       10800   IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2018052500 1800 900 604800 86400
    
    ;; Query time: 200 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Fri May 25 07:21:41 PDT 2018
    ;; MSG SIZE  rcvd: 107
    
    doug@DOUG-64:~$ nslookup s15
    Server:         127.0.0.1
    Address:        127.0.0.1#53
    
    Name:   s15.smythies.com
    Address: 192.168.111.112
    
    doug@DOUG-64:~$ dig s15.smythies.com
    
    ; <<>> DiG 9.10.3-P4-Ubuntu <<>> s15.smythies.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45975
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
    
    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 4096
    ;; QUESTION SECTION:
    ;s15.smythies.com.              IN      A
    
    ;; ANSWER SECTION:
    s15.smythies.com.       604800  IN      A       192.168.111.112
    
    ;; AUTHORITY SECTION:
    smythies.com.           604800  IN      NS      ns1.smythies.com.
    
    ;; ADDITIONAL SECTION:
    ns1.smythies.com.       604800  IN      A       192.168.111.1
    
    ;; Query time: 0 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Fri May 25 07:24:03 PDT 2018
    ;; MSG SIZE  rcvd: 95
    
    doug@DOUG-64:~$
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  9. #9
    Join Date
    Nov 2009
    Location
    Catalunya, Spain
    Beans
    14,390
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Bind dns resolving local servers

    The IN SOA line is still wrong. It should contain the domain name, not the FQDN of the server. It should be:
    Code:
    @   IN   SOA   linux-network.home. root.linux-network.home. (
    Then, the A record for server001 should be:
    Code:
    server001   IN   A   192.168.1.105
    You don't need to have the ns A record you set up now if you don't need it. In the documentation they use ns because that is what they call the server. Yours is server001.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 18.04 LTS 64bit

  10. #10
    Join Date
    Oct 2009
    Beans
    136
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Bind dns resolving local servers

    I changed the A record




    I restarted bind and ran nslookup

    Last edited by brent1975; May 25th, 2018 at 05:28 PM.

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
  •