I seem to be having trouble resolving my web domain with bind9, I'll use the domain name example.com, I can connect to any other website that's not configured in my bind9 zone file, i know this should be the problem because when i enter nameserver 8.8.8.8 in the /etc/resolv file example.com comes up with no issues
This is my progress
My /etc/resolv.conf file
nameserver 192.168.1.112
Bind9 /etc/named.conf.options
options { directory "/var/cache/bind";
recursion yes;
allow-recursion {localnets; 192.168.1.0/16;};
forwarders {
192.168.1.1;
};
dnssec-enable yes;
dnssec-validation auto;
dnssec-lookaside auto;
auth-nxdomain yes;
listen-on { 192.168.1.112; 127.0.0.1; };
// listen-on-ipv6 { any; };
};
Bind9 /etc/bind/named.conf.local file
zone "example.com" IN { type master; file "/etc/bind/dbb.example.zone"; };
Bind9 /etc/bind/dbb.example.zone file
@ IN SOA ns1.example.com. root@.my-email.com. (
1
3h
1w
3w
3h
)
IN NS ns1.example.com.
IN NS ns2.example.com
ns1.example.com. 221 IN A 93.184.216.34
ns2.example.com. 221 IN A 93.184.216.34
What i get back is after running dig example.com | sed 's/;.*//g' is empty
but without sed i receive
; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 38603
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 1f65dfc5c2809726eb48d6805b9ecd12c2d28287c22188a4 (good)
;; QUESTION SECTION:
;example.com. IN A
;; Query time: 0 msec
;; SERVER: 192.168.1.112#53
;; WHEN: Sun Sep 16 16:37:22 CDT 2018
;; MSG SIZE rcvd: 82
and with a name server not configured, for example: mocospace.com
dig mocospace.com
mocospace.com. 18830 IN A 208.95.216.41
;; Query time: 144 msec
;; SERVER: 192.168.1.112#53
;; WHEN: Sun Sep 16 16:39:46 CDT 2018
;; MSG SIZE rcvd: 310