Hi all, I am new to this forum and relatively new to linux. I have recently acquainted myself with Ubuntu and Debian and find them fascinating, as I have been using Windows most my life.
I have installed Ubuntu Server and been able to successfully complete a couple of tasks such as setting up a PXE, Print and DNS server. My current struggle has been with setting up Bind DNS server. I have followed the instructions on https://www.digitalocean.com/commun...-a-private-network-dns-server-on-ubuntu-18-04 to set up a primary DNS server, yet when I assign this Bind DNS server as the DNS server for one of my virtual PCs running the Ubuntu OS, the NS lookups are not successful (its reports server can't find "so-and-so" SERVFAIL). Yet, when I specify my DNS server in the NS lookup it works fine. For instance if I type "nslookup ubuntuweb.example.home.local" it will report back 127.0.0.53 as the server, 127.0.0.53#53 as the address and the domain will not be resolved (I will get a SERVFAIL message); yet if I type "nslookup ubuntuweb.example.home.local 192.168.1.204" (where 192.168.1.204 is my BIND DNS server) it is able to resolve the domain name successfully.
Please find my BIND DNS server configuration below. I would greatly appreciate any help to try and establish where it is I have gone wrong.
/etc/default/bind9
/etc/bind/named.conf.local
/etc/bind/named.conf.options
/etc/bind/zones/db.example.home.local (forward zone file)
/etc/bind/zones/db.1.168.192 (reverse zone file)
Thank you!
I have installed Ubuntu Server and been able to successfully complete a couple of tasks such as setting up a PXE, Print and DNS server. My current struggle has been with setting up Bind DNS server. I have followed the instructions on https://www.digitalocean.com/commun...-a-private-network-dns-server-on-ubuntu-18-04 to set up a primary DNS server, yet when I assign this Bind DNS server as the DNS server for one of my virtual PCs running the Ubuntu OS, the NS lookups are not successful (its reports server can't find "so-and-so" SERVFAIL). Yet, when I specify my DNS server in the NS lookup it works fine. For instance if I type "nslookup ubuntuweb.example.home.local" it will report back 127.0.0.53 as the server, 127.0.0.53#53 as the address and the domain will not be resolved (I will get a SERVFAIL message); yet if I type "nslookup ubuntuweb.example.home.local 192.168.1.204" (where 192.168.1.204 is my BIND DNS server) it is able to resolve the domain name successfully.
Please find my BIND DNS server configuration below. I would greatly appreciate any help to try and establish where it is I have gone wrong.
/etc/default/bind9
Code:
#
# run resolvconf?
RESOLVCONF=no
# startup options for the server
OPTIONS="-u bind -4"
/etc/bind/named.conf.local
Code:
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "example.home.local" {
type master;
file "/etc/bind/zones/db.example.home.local";
// allow-transfer { };
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/db.1.168.192";
// allow-transfer { };
};
/etc/bind/named.conf.options
Code:
acl "trusted" {
192.168.1/24;
localhost;
};
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
recursion yes;
allow-recursion { trusted; };
listen-on { 192.168.1.204; 127.0.0.1; };
allow-transfer { none; };
forwarders {
192.168.1.254;
};
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation auto;
//listen-on-v6 { any; };
};
/etc/bind/zones/db.example.home.local (forward zone file)
Code:
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ubuntuserver.example.home.local. admin.example.home.local. (
2019061308 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
; name servers - NS records
IN NS ubuntuserver.example.home.local.
; name servers - A records
ubuntuserver.example.home.local. IN A 192.168.1.204
ubuntuweb.example.home.local. IN A 192.168.1.208
/etc/bind/zones/db.1.168.192 (reverse zone file)
Code:
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA example.home.local. root.example.home.local. (
2019061304 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; name servers
IN NS ubuntuserver.example.home.local.
; PTR Records
204 IN PTR ubuntuserver.example.home.local. ;
208 IN PTR ubuntuweb.example.home.local. ;
Thank you!