LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-03-2019, 11:41 AM   #1
DenisAndreevich
LQ Newbie
 
Registered: Nov 2018
Posts: 14

Rep: Reputation: Disabled
Question configure bind9 on debian 10


Hi there!
I try configure bind9 inside two virtual machines. I made this config for my zone
named.conf.option
Code:
options {
forwarders {
        8.8.8.8;
     };

    listen-on {
      127.0.0.1;
      192.168.2.1;
    };
};
named.conf.local
Code:
zone "network.local" 
{
	type master;
	file "/etc/bind/network.local";
	allow-update { any; };
};

zone "10.168.192.in-addr.arpa"  {
        type master;
        file "/etc/bind/reverse.local";
    allow-update { any; };
};
network.local
Code:
$TTL 86400      ;       1 day
example.net.    IN      SOA     server.example.net. admin.example.net. (
                                20110103        ; Serial
                                10800           ; Refresh
                                3600            ; Retry
                                604800          ; Expire
                                86400           ; Minimum TTL
                        )

                IN      NS      server.example.net.
                IN      A       192.168.2.1
localhost       IN      A       127.0.0.1
server          IN      A       192.168.2.1
reverse.local
Code:
$TTL 86400      ;       1 day
10.168.192.in-addr.arpa. IN SOA server.example.net. admin.example.net. (
                        20110104        ; Serial
                        10800           ; Refresh
                        3600            ; Retry
                        604800          ; Expire
                        3600 )          ; Minimum

        IN      NS      server.example.net.
1       IN      PTR     example.net.
1       IN      PTR     server.example.net.
After restart bind9 and networking i get:
Code:
nslookup server
Server:         192.168.1.1
Address:        192.168.1.1#53

** server can't find server: NXDOMAIN
Where i wrong?
 
Old 12-04-2019, 01:57 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,590

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Hi,

For starters, you have some errors in your setup.
Your test zone name is "network.local" in named.conf while the SOA and the RR records in the zonefile refer to "example.net"...


Regarding the following error:
Quote:
After restart bind9 and networking i get:

nslookup server
Server: 192.168.1.1
Address: 192.168.1.1#53


** server can't find server: NXDOMAIN
You get a response from 192.168.1.1, that apparently knows nothing about the host "server".
Check /etc/resolv.conf to see what nameserver(s) are listed there
Also running nslookup without a FQDN, it uses the domain and/or search keywords in /etc/resolv.conf in order to compose the FQDN and do the lookup

Regards
 
Old 12-04-2019, 08:19 AM   #3
DenisAndreevich
LQ Newbie
 
Registered: Nov 2018
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,
For starters, you have some errors in your setup.

Regards
Hi. Thansk for the answer.
In fact, server resolve normal now:
Code:
nslookup server
Server:		192.168.2.1
Address:	192.168.2.1#53

Name:	server.network.local
Address: 192.168.2.1
But, if i use this command from another vbox machine, i get this message:
Code:
nslookup pc1
Server:		192.168.2.1
Address:	192.168.2.1#53

can't find pc1: SERVFAIL
 
Old 12-04-2019, 01:02 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,590

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Quote:
But, if i use this command from another vbox machine, i get this message:

nslookup pc1
Server: 192.168.2.1
Address: 192.168.2.1#53

can't find pc1: SERVFAIL
What you get when you run the same query from the nameserver itself. (Note that there is no pc1 A RR in the zonefile you posted in your OP).
If you get an answer from the nameserver, then there should be a firewall perhaps dropping some packets resulting in the SERVFAIL.

You may use the dig command using the syntax below, to see more details about the query and the server answer:
Code:
dig pc1.network.local @192.168.2.1
 
  


Reply

Tags
bind, debian 10, dns


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configure BIND9 for Ubuntu 12.04.1 Server with Two NICs Tangles Linux - Networking 1 12-13-2012 02:50 PM
Configure subdomain alias in bind9 Gianni Valenti Linux - Networking 1 01-12-2012 09:52 AM
[SOLVED] few question about configure bind9 on Ubuntu. yy885 Linux - Server 5 11-17-2011 01:25 AM
BIND9 -> configure rndc.key cccc Debian 1 06-24-2009 06:15 AM
Bind9 Configure tandre Linux - Software 2 04-09-2003 04:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration