Own DNS server not working (SERVFAIL when trying to find out host's IP)
bind, dns, linux, ubuntu
Solution
You're defining zone home.lan, specify hosts ubuntu.home.lan as MX and NS, but have no A record for ubuntu.home.lan in your home.lan zone.
Problem
I've set up a DNS server on VM. When I'm using `host` with an IP addres, it works well (`101.48.168.192.in-addr.arpa domain name pointer s1.home.lan.`), but when I try to get domain's IP (eg. `host s1.home.lan`), I get `Host s1.home.lan not found: 2(SERVFAIL) `. What has been configured wrong? Config files: named.conf.local: ``` zone "home.lan" { type master; file "/etc/bind/zones/home.lan.db"; }; zone "48.168.192.in-addr.arpa" { type master; file "/etc/bind/zones/rev.48.168.192.in-addr.arpa"; }; ``` home.lan.db: ``` $ORIGIN . $TTL 3600 home.lan. IN SOA ubuntu.home.lan. hostmaster.home.lan ( 2002010101 ; serial 8H ; refresh 4H ; retry 4W ; expire 1D ; minimum ) home.lan. IN NS ubuntu.home.lan. home.lan. IN MX 10 ubuntu.home.lan. $ORIGIN home.lan. localhost IN A 127.0.0.1 s1 IN A 192.168.48.101 s2 IN A 192.168.48.102 s3 IN A 192.168.48.103 ``` rev.48.168.192.in-addr.arpa: ``` @ IN SOA ubuntu.home.lan. hostmaster.home.lan. ( 2002010101 ; serial 8H ; refresh 4H ; retry 4W ; expire 1D ; minimum ) IN NS ubuntu.home.lan. 101 IN PTR s1.home.lan. 102 IN PTR s2.home.lan. 103 IN PTR s3.home.lan. ```